cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32CubeMX] lwIP + FreeRTOS Sample Project

emeydanli
Associate II
Posted on April 23, 2014 at 16:41

Hello Everyone,

I wonder if anyone has been able to get lwIP work properly?

My platform consists of Open407-D baseboard, STM32F4 Discovery and DP83848 Ethernet PHY. SysClk is clocked at 168 MHz.

I have been struggling with generated code by STM32CubeMX for two days. During this time, I have found several issues. 

1) In sys_mutex_lock function, mutex pointer seems incorrectly dereferenced.

2) Priority of the ethernet interrupt is incorrectly configured. It is higher than configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY. That's why firmware hangs in one of FreeRTOS assertions.

3) tcpip_thread is not created due to an incorrect parameter value. (TCPIP_THREAD_STACKSIZE equals to zero)

These are the things I could find but still I cannot get it work. Even though the DHCP option is enabled, the device cannot get an IP address. Giving a static IP address does not work too.

The worst thing is it does not even respond to pings. As an experiment, I created an UDP socket and sent data over it continuously. Green Ethernet LED blinks but of course the packets do not reach to anywhere. (checked with wireshark) 

What can be the problem? Do you have any ideas?

#freertos-lwip #stm32-discovery #cube-lwip-+-stm32f107-+-lan8720a #ethernet
40 REPLIES 40
Pm77
Associate II
Posted on June 22, 2016 at 17:34

Hi Jordan,

With Cube In LWIP set checksum by hardware..to ''Enabled''

With Eth Connectivity settings no need to change any thing (Unless you are not using polling mode for reception and Do want to set interrupt in PHY[This comes under Extended PHY configuration])

If still not working there should be another initialisation issue..