2025-08-27 12:31 AM - edited 2025-08-27 1:27 AM
Hello,
I am experiencing an issue with LwIP on the NUCLEO-F746ZH board. I am using STM32CubeIDE 1.14.0 with the STM32F7 firmware package v1.17.3 (I also tried v1.17.0 and the latest CubeIDE version, but the errors still persist).
In the screenshots I shared, you can see my LWIP, ETH, FreeRTOS, and Cortex MPU settings. With these settings, I expect to be able to ping without adding any extra code, but unfortunately I encounter problems in the lwip_init function.
This issue has been mentioned before in the forums: when I configure the MPU as suggested (example file attached), the first configASSERT hits a breakpoint. If I try without any MPU configuration, it stops at the second configASSERT (as shown in the screenshot).
I tried many approaches but couldn’t solve it. Without RTOS, there is no problem and ping works fine, but with RTOS I face an issue related to semaphores. At this point, I am not sure what I am missing. I also attached my FreeRTOSConfig file.
Interestingly, the LWIP_HTTP_Server_Netconn_RTOS example works. I compared it and applied the same MPU_Config settings, and also defined the ETH memory regions in the flash.id file accordingly. However, when I generate code from CubeIDE, it never works.
Could you please help me figure out what I am missing?If I try without any MPU configuration
I configure the MPU as suggested
2025-08-27 5:00 AM - edited 2025-08-27 5:06 AM
Hi
check that Ethernet interrupt has lower or equal priority than FreeRTOSConfig.h 's configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY.
lower priority means higher numerical value.
if configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY = 5 , ETH IRQ can be 5, 6, 7, 8, ... but not 1,2, 3, 4.
2025-08-27 5:14 AM
Hİ @Guillaume K
I checked configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY = 5, my value is the same and ETH_IRQn value = 8 but still not pinging.
2025-08-28 12:22 AM
Well, if the interrupt priority is correct then I don't understand how the configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ) can happen. Except if some thread or ISR trashes the memory area where ucMaxSysCallPriority is computed from. Are the thread stacks large enough ? Check the FreeRTOS heap size and the LwIP PBUF pool size.
Also check the stack and heap in linker file.
2025-08-28 4:33 AM
Yes I check FreeRTOS heap size and LWIP PBUF pool size. I increased the area but it remains in configassert. I will try adding freertos without using cmsis.
2025-09-01 1:31 AM
I am also facing the same issue when i tried without RTOS its working if you find the issue please let me know