cancel
Showing results for 
Search instead for 
Did you mean: 

Move LWIP from barebone to FreeRTOS

debug
Associate III

Hi,

I'm able to configure LWIP with my Nucleo-F439 board so that it responds to pings as expected. I however want to be able to transport some useful information to a socket (telnet or similar) and I want to use FreeeRTOS for that. I however am unable to get it working, in my Default Task, it always gets stuck in MX_LWIP_Init(), in particular here:

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

{

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

}

#endif

which appears to be an issue with the clock config. I duplicated my clock configuration from the working barebones appliaction 1:1 but it still doesn't appear to work.

The GPIO config looks to be correct too. What else might I be missing?

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @debug 

When using an RTOS, the RTOS is configured by default to use the SysTick timer for managing the timing of its threads. Since the default configuration for the HAL libraries is to also use the SysTick for its timing operations, we need to change the timebase for the system so that only FreeRTOS uses the SysTick. this can be done using cubeMX . you can also find a working example with LWIP FreeRTOS in this link which correctly configures the Clock sources for both HAL and FreeRTOS.

BR

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
STea
ST Employee

Hello @debug 

When using an RTOS, the RTOS is configured by default to use the SysTick timer for managing the timing of its threads. Since the default configuration for the HAL libraries is to also use the SysTick for its timing operations, we need to change the timebase for the system so that only FreeRTOS uses the SysTick. this can be done using cubeMX . you can also find a working example with LWIP FreeRTOS in this link which correctly configures the Clock sources for both HAL and FreeRTOS.

BR

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.