cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 with Ethernet and LwIP stack working - What is the need for FreeRTOS?

ARaid.1
Associate III

Both example and KB article depends on FreeRTOS.

Is there any real need to use FreeRTOS? In past I used LwIP without FreeRTOS just calling MX_LWIP_Process(). What do I need to do to get rid of FreeRTOS, is it enough to just disable it in STM32CubeMX and disable Ethernet Global Interript? I am afraid I run into some kind of Ethernet driver hidden problem.

5 REPLIES 5
Pavel A.
Evangelist III

If I remember correctly, after the last "rework" the HAL ETH driver should be used only with the interrupt. Polling variant of RX/TX functions (without _IT) has some issues.

ARaid.1
Associate III

Just tried to turn off "FreeRTOS": (FreeRTOS -> Interface: Disable) in STM32CubeMX.

Generated code doesn't even compile.

Is it even meant to run STM32H7 LwIp without FreeRTOS?

ARaid.1
Associate III

Pavel A. thank you.

I started with "just-worked" (ping worked ok) FreeRTOS + LwIP project

(CubeIDE 1.12.1, CubeMX Version: 6.8.1-RC4 Build: 20230419-1431)

  1. Re-enabled interrupt,
  2. Removed Tim allocated for FreeRTOS to SysTick use.
  3. Removed sync/lock code bodies (code depends on FreeRTOS sync primitives)

void sys_lock_tcpip_core(void){}

void sys_unlock_tcpip_core(void){}

void sys_check_core_locking(void){}

void sys_mark_tcpip_thread(void){}

3) Added MX_LWIP_Process() in main loop...

No ping in result. For now.

Compared both codebases, looked for "ETH_CODE"... nothing suspicious... seems need to double-check entire Piranha list (?)...

Year ago I just ignored "modern reworked drivers" for Stm32F4 using CubeMX 6.4.0 with STM32Cube_FW_F4_V1.26.2

it all worked ok.

In which version for H7 eth HAL driver breaked?

Yes, LwIP can be used without FreeRTOS and in Cube firmware packages there are ETH examples without FreeRTOS.

Pavel A.
Evangelist III

Unfortunately all new STM32H7 examples at https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/ use FreeRTOS.

The first H7 library release after "rework" is 1.10.0.