cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS + LwIP on STM32F407VG Discovery

didattica2
Associate II
Posted on March 11, 2015 at 20:34

Hi,

I'm new to LwIP and I'm trying to run it on STM32F4 Discovery with FreeRTOS. I'm using STM32CubeMX for generating default code and System Workbench (AC6) as IDE. I use DP83848 PHY in RMII mode. 

All the software works great (e.g pinging the board, or run the web server demo) if no FreeRTOS is used. But when I add FreeRTOS the board does not acquire a valid IP (either via DHCP or with static IP) so it is not possible to ping the board. This even if I do not add any code to the STM32Cube generated code 

Thanks in advance if you can help me

3 REPLIES 3
didattica2
Associate II
Posted on March 15, 2015 at 19:35

Problem solved.

Simply add this line to lwipopts.h (1000 or whatewer value but > 0):

 #define TCPIP_THREAD_STACKSIZE          1000

If not specified, the default value is 0 (see opt.h) but in that case no lwIp threads is created: this not seems normal for me if I want to use an RTOS.

Comments are welcome

Davydenko.Sergey
Associate II
Posted on April 18, 2015 at 16:19

Faced with a similar problem ...

STM32F429 + RTOS + LWIP

Helped.

My thanks :)

Half a day trying to deal with the problem ...

Yes, I agree.

It would be necessary in the cube to fix something for default settings LWIP + RTOS.

Bino
Senior
Posted on April 23, 2015 at 14:42

You are right, in the next STM32CubeMX release, the default value of TCPIP_THREAD_STACKSIZE will be different than zero to avoid the problem you encountered.