cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP and FreeRTOS using Nucleo-144 F429zi

SSala.3
Associate III

Hi, I am using STM32f429zi nucleo-144 board to configure Ethernet using LWIP and FreeRTOS. 

But my program doesn't execute after "MX_LWIP_Init();" in the StartDefaultTask. What could be the issue? It halts on the below function inside queue.c.

Function:

BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait )

Line :

#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )

{

/*****Excecution waits here while debugging.****************/

configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );

}

Note: Ethernet works fine without using RTOS. I have tested UDP, TCP protocols.

Thank you.

4 REPLIES 4

Hello @SSala.3​ ,

You can refer to the following examples provided under our F4 Firmware Package:

  • Projects\STM32469I_EVAL\Applications\LwIP\LwIP_UDPTCP_Echo_Server_Netconn_RTOS
  • Projects\STM32F429ZI-Nucleo\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS

I hope this helps you.

BeST Regards,

Walid

SSala.3
Associate III

Hello Walid,

Thank you. I have gone through the example shared. My query is about configuring my project right way using the device configuration tool in STMCube IDE. In my case "MX_LWIP_Init()" has some issue which is blocking the program execution as stated above.

Hello Walid,

Thank you. I have gone through the example shared. My query is about configuring my project right way using the device configuration tool in STMCube IDE. In my case "MX_LWIP_Init()" has some issue which is blocking the program execution as stated above.

SHers
Associate III

FWIW, I have run into the same issue with the latest CubeMX / IDE, and I have found a solution. I tried using both CMSIS V1 and CMSIS V2 options for FreeRTOS. With V1, I get the same fault described here; with V2, I get a semaphore failure in the LwIP TxCpltCallback (it looks as though there's a clash there between CMSIS semaphores and FreeRTOS semaphores).

At least with V1, this is an insufficient memory issue.

I was able to make V1 work by raising the heap memory and default task stack sizes in the RTOS, as suggested here: 

https://community.st.com/t5/stm32-mcus/how-to-create-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308/

-- Steve