lpcware

lwip with the LPC4350

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by gregd on Wed Oct 17 11:42:05 MST 2012
I have been having some lock up problems when stress testing the LPC lwip port for the LPC4350.  I am using in stand-alone mode without FreeRTOS.  When testing 16 simultaneous TCP connections, I am having a problem with the following code in lpc18xx_43xx_emac.c line 689:

                /* Wait until enough descriptors are available for the transfer. */
                /* THIS WILL BLOCK UNTIL THERE ARE ENOUGH DESCRIPTORS AVAILABLE */
                while (dn > lpc_tx_ready(netif))
#if NO_SYS == 0
                                xSemaphoreTake(lpc_netifdata->xTXDCountSem, 0);
#else
                                msDelay(1);
#endif

I guess when congestion occurs the tx_free_descs (Number of free TX descriptors) goes to zero.  The code is becoming stuck in the above loop and never exits.  Since I am running with NO_SYS == 1, there is no mechanism for the tx descriptors to be freed up is there?  Will the DMA transfers automatically do this? 

Can you suggest a solution to this problem. 

Are there any plans to further develop/test the lwip library to make it more robust?

Outcomes