cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with running example described in the AN3966

kkawula
Associate II
Posted on February 05, 2014 at 12:38

Hello

I�m trying to run example project described in application note AN3966. According to the release note FreeRTOS project of web server using sockets contains:

� Cortex-M CMSIS V3.01 

� STM32F4xx CMSIS V1.1.0 

� STM32F4xx_StdPeriph_Driver V1.1.0 

� STM32F4x7 Ethernet Driver V1.1.0 

� STM32_EVAL Common drivers V5.0.2 

� STM3240_41_G_EVAL board drivers V1.1.1 

� LwIP TCP/IP V1.4.1 

� FreeRTOS V7.3.0 

� FatFs VR0.09 

Project was compiled and run under IAR development chain without any problems (maybe there were few warnings from LwIP source files). But the problem starts after board is running for couple of minutes. Board stop respond to the ping either http requests.

I have ported this example to ARM GCC compiler and problem is exactly the same. After investigation I found out that all semaphores and queues are returning timeout status. What is more the DMA interrupt is not occurring at all� I check with scope Rx lines from PHY and its seems that valid data are coming to uP�s MAC.

Does anybody have similar issue? Any tips?

Best Regards

#an3966 #stm32f407 #lwip
2 REPLIES 2
Oussema Hajjem_O
Associate III
Posted on March 12, 2014 at 14:17

Hello,

I tried to reproduce this scenario but the example works fine for hours.

Try to increase the RTOS heap size by modifying the''configTOTAL_HEAP_SIZE'', in FreeRTOSConfig.h file, to (20 * 1024) instead of (15 * 1024)

Best regards,

kkawula
Associate II
Posted on June 24, 2014 at 10:45

Sorry for late response. At the end I have solved this issue. It turns out that there was two problems: 

- Incorrect handling RBU flag. More about this problem and patch You can find here:  http://web.archiveorange.com/archive/v/fQIxzEB3WNnyNpsB0hTk

- Incorrect settings in lwipopts.h, Flag SYS_LIGHTWEIGHT_PROT have to be set to 1 while using RTOS in the project. By default is set to ''0'' which cause occasional hardfault during memory allocation.

I hope You find this information useful.

btw, Did You ever try new examples which comes with STM32F4Cube package?

All the best, Krzysztof