AnsweredAssumed Answered

Low TCP/IP transmit perormance with STM32CubeMX and STM32F429ZG

Question asked by Michael Steinecke on Aug 28, 2014
Latest reply on May 12, 2015 by b.m.001
Hello,

currently I'm porting a STM32F103ZG / Wiznet W5300 Ethernet and SPL based  to a STM32F429ZG / STM32CubeMX / LwIP based application. Both versions using FreeRTOS. In both cases its a custom board.

I'm struggling on a quite low performance of the Ethernet part. The application transmits a large amount of data from the SD Card to a remote PC using the TCP RAW API of LwIP. The transmit rate is about 20 kB/s. Currently, I guess the biggest berformance gain would be optimizing the low level Ethernet device driver.
low_level_output() needs about 25 us for 60 bytes and 200us for 1524 bytes. This indicates a limitation to ~45 MBit/s just by writing data to the output. And then, the device would had no time to do anything else.

low_level_output() uses memcpy() to copy the data. Is this an actual DMA transfer or CPU bound work?

In my case, the copy wouldn't necessary at all. With LwIP, all the data is statically in the RAM, as long as the package hasn't been acknowledged. Is there a zero-copy driver implementation around? There is a big thread in the ChibiOS forums, regarding that topic. Has someone already tried to use their findings together with the CubeMX driver and FreeRTOS? Unfortunately, I'm unable to download the Dropbox stuff from work.

Any other tips to increase the performance?

Versions used:
STM32F429ZG 180 MHz clock
IM2516SDBATG 16 MB SDRAM holding the buffered data
STM32CubeMX V4.3.0 together with FW lib 1.3.0
FreeRTOS 7.60
LwIP V4.1.? (provided by Cube)

Outcomes