sdcandy wrote on Friday, November 02, 2018:
Hello,
I am having some performance and reliability issue with the FreeRTOS-TCP stack on a NXP LPC1768.
I am using FreeRTOS v10.1.0 and the NetworkInterface.c file from the download here https://interactive.freertos.org/hc/en-us/community/posts/210030166-FreeRTOS-TCP-Labs-port-and-demo-for-Embedded-Artists-LPC4088-Dev-Kit which in turn requires LPCOpen v2.10.
FreeRTOS is configured with 8 priority levels. The Ethernet Rx Task is created as priority 7 (configMAX_PRIORITIES - 1) and the IP task then becomes priority 6.
The network stack is running and gets an IP address from a DHCP server. If I then ping the device from a PC elsewhere on the network then I get a reply time of 0.3ms.
I am trying to integrate the Minnow WebSockets server (and utlimately SharkSSL security layer) from Real Time Logic. When I start the task that runs the WebSockets server (currently at priority 4), even when no browser is trying to connect the ping response time goes out to between 3 and 5 seconds!
When a browser tries to make the initial connection to the server to get the static content (index.hml, some Javascript files and images) the transfers all start to time out. When I look at the network traffic with Wireshark then I see lots of reset and TCP retransmission entries.
With the debug output enabled in the driver it seems that there are lots of receive interrupts occurring with no data associated.
I am at a loss as to how to debug this from here. I tried looking at the LPC17xx NetworkInterface.c file that ships with FreeRTOS v10.1.0 but it doesn’t appear to compile against the FreeRTOS-TCP and LPCOpen files.
-Andy.