Functions xSemaphoreGiveFromISR() and xQueueSendToBackFromISR() called in an ISR cause a system crash and never return. Here is a simple program that illustrates this condition. It is based on your demo code “Blank” and uses the EasyMx PRO v7 for STM32 board with STM32F407VGT6. All explanations and switch settings are given in the example.
These 2 functions are essential to FreeRTOS and should be fixed quickly.
Essential functions of FreeRTOS crash the system.
-
- Posts: 19
- Joined: 16 Apr 2012 22:01
- Location: Whitby, Ontario, Canada
Essential functions of FreeRTOS crash the system.
- Attachments
-
- FreeRTOS_STM32F407_Blank.zip
- (348.64 KiB) Downloaded 151 times
- petar.suknjaja
- mikroElektronika team
- Posts: 683
- Joined: 05 Mar 2018 09:44
- Location: Belgrade
Re: Essential functions of FreeRTOS crash the system.
Hi Val,
I will review it.
Kind regards,
Petar
I will review it.
Kind regards,
Petar
-
- Posts: 19
- Joined: 16 Apr 2012 22:01
- Location: Whitby, Ontario, Canada
Re: Essential functions of FreeRTOS crash the system.
Hello Petar
Is there any news with respect to this problem in FreeRTOS? I know this software does not generate any revenue for Mikroelektronika but it may result in additional hardware purchases. I, and the user community would like an answer soon.
Val Gretchev
Is there any news with respect to this problem in FreeRTOS? I know this software does not generate any revenue for Mikroelektronika but it may result in additional hardware purchases. I, and the user community would like an answer soon.
Val Gretchev
- petar.suknjaja
- mikroElektronika team
- Posts: 683
- Joined: 05 Mar 2018 09:44
- Location: Belgrade
Re: Essential functions of FreeRTOS crash the system.
Hi Val,
I'm sorry, I haven't had time to review it, but I promise I will do it as soon as I finish some previous projects and assignments.
Kind regards,
Petar
I'm sorry, I haven't had time to review it, but I promise I will do it as soon as I finish some previous projects and assignments.
Kind regards,
Petar
-
- Posts: 19
- Joined: 16 Apr 2012 22:01
- Location: Whitby, Ontario, Canada
Re: Essential functions of FreeRTOS crash the system.
OK Petar
Thanks for the update
Val
Thanks for the update
Val
-
- Posts: 19
- Joined: 16 Apr 2012 22:01
- Location: Whitby, Ontario, Canada
Re: Essential functions of FreeRTOS crash the system.
Hi Petar
I believe I found the problem. It appears that FreeRTOSConfig.h file has a trap that checks for interrupt priority 0. See:
#define configASSERT(x) if ((x) == 0) { taskDISABLE_INTERRUPTS(); while (1); }
If you don’t set the priority of an interrupt vector, it defaults to 0.
Solving this problem can be done in 2 ways:
Set the interrupt priority to a non-zero value:
e.g. –
// Set up interrupt vector
NVIC_IntEnable(IVT_INT_EXTI0); // Enable EXTI0 interrupt vector
// Set interrupt priority other than 0
NVIC_SetIntPriority(IVT_INT_EXTI0,_NVIC_INT_PRIORITY_LVL1);
Or, remove the trap in the configASSERT(x) statement.
e.g. –
#define configASSERT(x) if ((x) == 0) {}
Now I can proceed with writing more complicated code. Thanks,
Val
I believe I found the problem. It appears that FreeRTOSConfig.h file has a trap that checks for interrupt priority 0. See:
#define configASSERT(x) if ((x) == 0) { taskDISABLE_INTERRUPTS(); while (1); }
If you don’t set the priority of an interrupt vector, it defaults to 0.
Solving this problem can be done in 2 ways:
Set the interrupt priority to a non-zero value:
e.g. –
// Set up interrupt vector
NVIC_IntEnable(IVT_INT_EXTI0); // Enable EXTI0 interrupt vector
// Set interrupt priority other than 0
NVIC_SetIntPriority(IVT_INT_EXTI0,_NVIC_INT_PRIORITY_LVL1);
Or, remove the trap in the configASSERT(x) statement.
e.g. –
#define configASSERT(x) if ((x) == 0) {}
Now I can proceed with writing more complicated code. Thanks,
Val
- petar.suknjaja
- mikroElektronika team
- Posts: 683
- Joined: 05 Mar 2018 09:44
- Location: Belgrade
Re: Essential functions of FreeRTOS crash the system.
Hi Val,
Thank you for letting us know!
Kind regards,
Petar
Thank you for letting us know!
Kind regards,
Petar