Skip to main content
Ivan Pletnev
Associate II
March 26, 2021
Question

LWIP HTTP Server. Packets retransmittion.

Hello, dear colleagues!

I'm trying to build http server based on LWIP on Nucleo F429 board. An example from Cube repository works fine, also with my custom http data and paths, which I have included in example project. But, another CubeIDE generated project with same or, even, greater settings in lwipopts.h works much slower and generate lot of packet retransmittions. I have checked all interrupts priorities in both projects, priorities of tasks, turn on lwip_stats, which shown absence of errors and so on. It's enough of memory and buffers. But have no result. There is the same problem on F746 DISCO. Please, indicate me direction for my eyes. Thank you in advance.0693W000008xyvvQAA.png 0693W000008xyzdQAA.png 

This topic has been closed for replies.

5 replies

Ivan Pletnev
Associate II
March 30, 2021

I don't know why, but problem is gone when I have generated project in STM32CubeMX instead of STM32CubeIDE. Now my server works perfect. Have you any ideas?

Pavel A.
March 30, 2021

Using different versions of the Cube F4 library?

Have you tried to compare the generated sources and project settings?

-- pa

Piranha
Principal III
April 2, 2021
  • We cannot see your application code - it probably isn't thread safe, especially if it follows ST's broken examples.
  • ST's link state and DHCP management code is not thread safe and can break just about anything.
  • ETH HAL driver is missing compiler barriers around setting OWN bit in descriptors, therefore compiler optimization can break the order of accesses.
  • Cortex-M7 in F7 series has a D-cache memory and that adds another layer of mayor and fatal flaws in ST's code.

> Please, indicate me direction for my eyes.

All of that and more is documented long ago in this topic:

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32

Ivan Pletnev
Associate II
April 19, 2021

Hello, dear colleagues!

The same problem has been detected with STM32F427.

LWIP Stack doesn't work properly in STM32Cube F4 Package Version 1.26.1 with CubeMX Version 6.2.1.

With STM32Cube F4 Version 1.25.2 with CubeMX 6.1.1 and 6.1.2 everything works fine!

My dynamic html page (chunked) 60kb in total (with font, images and scripts) loading 200-250ms without any retransmits.