lpcware

lwip_tcpecho_freertos stops responding on LPC1769

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by deffi on Tue May 19 02:58:20 MST 2015
Good Morning,

Short summary: lwip_tcpecho_freertos stops working after echoing about 4 kBytes of data. lwip_tcpecho_sa works fine in the same scenario.

Full length version: I compiled the lwip_tcpecho_freertos example project included with LPCOpen for LPCXpresso 1769 (details below). The only changes I made was to disable DHCP and change the IP address to match my local network.

I send some data using netcat, and indeed this works well for small amounts of data, for example, 5 lines:

$ seq 5 | netcat 1.1.1.2 7
1
2
3
4
5
$


For larger amounts of data, the program stops working at some point:

$ seq 10000 | netcat 1.1.1.2 7
1
2
3
[and so on]
1096
1097
10


At this point, the netcat process just sits there waiting for a response. I cannot make another connection until I reset the LPC1769, even if I close the original connection by terminating the netcat process. Wireshark shows some duplicate ACK packages from the device and some TCP retransmissions from the host. The ethernet link detection (which turns on and off the LED on the board when the link status changes) still works.

The same procedure works fine for the lwip_tcpecho_sa (standalone, i. e. without FreeRTOS) example project (I tested up to a million lines).

Some more details about the environment: I'm using LPCXpresso v7.7.2 [Build 379] [2015-03-31] on Ubuntu 15.04. The demo projects are from the lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769.zip file the the LPCXpresso examples directory. The compiler is arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]. The hardware is an LPCXpresso LPC1769 board, Revision C (with SMSC PHY).

Could this be a bug in the lwip_tcpecho_freertos, potentially a RAM issue?


Regards,
Martin

Outcomes