cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with ISR priority and ethernet (STM32CubeMX + FreeRTOS + lwIP )

crt
Associate II
Posted on July 25, 2014 at 15:13

Hi,

recently I have used STM32CubeMX to generate framework (FreeRTOS, LwIP) for our platform based on STM32F429. Every except ethernet is working out pf the box.

When ethernet connector is not connected everything is running fine. Ethernet status gets from HAL_ETH_STATE_RESET to HAL_ETH_STATE_READY and the FreeRTOS is running just fine.

However, when I connect ethernet to the MCU board the FreeFROS will hang at

configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ) in file port.c. Looking at the PC I can see that an ARP packet (with correct MAC and IP address) has been received from the MCU. Therefore I assume that ethernet is from the electrical point of view working.

Could this be a bug in configuration generated by STM32CubeMX?

Thanks, Crt

#stm32cubemx #ethernet #freertos
1 REPLY 1
crt
Associate II
Posted on July 26, 2014 at 08:25

Hi,

I think I have found the problem (http://www.freertos.org/RTOS-Cortex-M3-M4.html). CubeMX leaves interrupt priority at default value. However, when we are using FreeRTOS functions from ISR the priority of interrupt should be lower (higher numerical value) than

configMAX_SYSCALL_INTERRUPT_PRIORITY. Setting ETH interrupt priority to 6 has solved the problem.

Crt