AnsweredAssumed Answered

Optimizing TCP server [LWIP]

Question asked by McCliff on Jun 25, 2015
Latest reply on Jun 29, 2015 by Michael Steinecke
In my project I use a STM32F4 Discovery with a phy adapter DP83848 to create an ethernet connection between my board and my laptop. I use it to acquire measure.

I use F4Cube as library with the stack LWIP and I don't use RTOS. I create a TCP server on my board and use a TCP  terminal as a client on my laptop. My connection works well and is stable with no paquet lost at 10Mbits.

Here is my main problem, I would like to send each measure that I acquire through one USART as soon as I get one (my STM32F4 send a command each time to get one). These measures are small (30 octets). The problem is, between two measure I get a 10ms delay due (I think) to the TCP/IP stack and I don't know where looking to reduce this one.

During this 10ms delay I can't send anoter command to acquire a new measure so my maximum acquisition frequency is stuck at 100Hz.

Any idea to reduce this delay? 

Outcomes