2026-01-06 9:42 AM - last edited on 2026-01-07 3:45 AM by mƎALLEm
Hello everyone,
I’m looking for some help getting an Ethernet TCP server running using LwIP with FreeRTOS on an STM32.
Current status:
Hardware: NUCLEO-H723ZG
Stack: LwIP + FreeRTOS
TCP client/monitor: Hercules v3.2.8
I can ping the board successfully every time (with Windows terminal and Hercules)
However, I cannot establish a TCP connection when FreeRTOS is enabled
What’s confusing me is that:
If I disable FreeRTOS, I can successfully establish a TCP connection using the CubeMX example LwIP_TCP_Echo_Server
Once FreeRTOS is enabled, the TCP connection attempt from Hercules fails (no connection established)
What I’ve tried so far:
Multiple CubeMX LwIP + FreeRTOS example configurations
Both Netconn and Socket-style APIs
Adjusting task priorities and stack sizes
Verifying IP address, subnet, gateway, and port settings
Confirmed Ethernet link is up and LwIP responds to ping
At this point, it feels like I’m missing something fundamental about:
LwIP threading model with FreeRTOS
Proper placement of TCP server code (tcpip thread vs user task)
FreeRTOS task priorities or blocking behavior affecting LwIP
I’m still fairly new to STM32 development and the STM32Cube/HAL/LwIP ecosystem, so any guidance or common pitfalls would be greatly appreciated.
I can provide:
CubeMX configuration screenshots
Relevant code snippets
Hercules configuration screenshots
Thanks in advance for any help or direction you can provide!