[En-Nut-Discussion] TCP Sockets hang on certain occasions (Harald Kipp)

Harald Kipp harald.kipp at egnite.de
Wed Aug 22 09:22:41 CEST 2012


On 22.08.2012 03:49, Adeel Ahmed Nafos wrote:
> OK, did not try that. Would require some engineering to bring out the 
> comm port, as currently it is not used.

Getting a new board up and running without stdout device is like catching a mosquito in a pitch-dark room.

> Apart from that had to do some changes to the at91_emac.c driver to make 
> it work.
> The problem, was that if the cable was not plugged in EmacInit() took a 
> long time to return, and this caused the watchdog to kick in and reset. 
> So we reduced the EMAC_LINK_LOOPS from 1000000 to 100, to make it return 
> faster, and put in the NutWatchDogRestart() calls to stop from reset.

Reducing the loop count may work for you, but may fail on other boards. The link negotiation depends on the PHY and the connected switch/HUB. Adding a call to NutWatchDogRestart would force all AT91 based implementation to include the extra watchdog code.

You may either temporarily increase the watchdog time. Or you may link a local copy at91_emac.c to your application.

Regards,

Harald



More information about the En-Nut-Discussion mailing list