[En-Nut-Discussion] TCP Sockets hang on certain occasions

Adeel Ahmed Nafos adeel at linkwisetech.com
Thu Aug 23 03:46:58 CEST 2012


Yeah, I understand. About the NutWatchDogRestart, so instead of it 
changed it to NutSleep() and moved the whole initialization for the EMAC 
to a separate thread. This way no extra code for the watch gets included.

diff -r 2d439fb3cdb9 nut/arch/arm/dev/atmel/at91_emac.c
--- a/nut/arch/arm/dev/atmel/at91_emac.c    Wed Aug 15 09:54:44 2012 +0800
+++ b/nut/arch/arm/dev/atmel/at91_emac.c    Thu Aug 23 09:39:25 2012 +0800
@@ -480,6 +480,7 @@ static int probePhy(uint32_t tmo)
          /* Wait for auto negotiation completed. */
          phy_inw(NIC_PHY_BMSR);  /* Discard previously latched status. */
          while (--tmo) {
+             NutSleep(50);
              if (phy_inw(NIC_PHY_BMSR) & NIC_PHY_BMSR_ANCOMPL) {
                  break;
              }





More information about the En-Nut-Discussion mailing list