Problem with LwIP and EMAC

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Mar 29, 2018 by Tony Morgan
Content originally posted in LPCWare by jackandrews on Tue Sep 10 07:42:57 MST 2013

I've been testing the TCP echo FreeRTOS demo and everything is working.  I'm now trying to connect a server and stream data out.  I've added the following task which is created with priority 2 after an IP address has been assigned:

I have a python script listening on port 8000.  The above code successfully connects and I see the data in the python script, however after a few iterations it hangs.  I've noticed that if I place a breakpoint on netconn_write and allow it to slowly execute it works.  It also works by adding a 10 ms delay.

However, without a delay it gets stuck waiting for free tx descriptors to become available (i.e. semaphore: xSemaphoreTake(lpc_enetif->xtx_count_sem, 0) is never taken).  It would appear that the tx IRQ is never firing and/or the tx_cleanup task is not working properly.

Any ideas on how to debug this?

Thanks very much,