2026-05-07 9:21 AM - last edited on 2026-05-11 2:41 AM by Gyessine
I'm using an STM32G431 with FreeRTOS.
I have a total of 5 tasks, including the default task, and all of them were set to osPriorityLow.
With this configuration, the tasks did not run properly. When creating the tasks, NULL was not returned and no error occurred.
After changing all task priorities to osPriorityNormal, the problem was fixed.
I don't really understand why this happens. Each task has a reasonable osDelay(), so I don't think any specific task is blocking the others. Also, if a task were blocking, I would expect the same problem to happen even after changing the priority.
I also tried changing the heap size and the stack size, but that did not seem to be the cause.
Has anyone experienced a similar issue, or does anyone know why changing all tasks from osPriorityLow to osPriorityNormal would make a difference?
2026-05-07 9:51 AM
@eunoia wrote:the tasks did not run properly.
What, exactly, do you mean by that ?
Please give details.
Note that there is a Windows port of FreeRTOS - perhaps use that to rule out anything STM32-specific?
2026-05-07 10:08 AM
osPriorityLow and osPriorityNormal are not priorities of FreeRTOS. They are defined in the CMSIS-RTOS wrapper. May be the behavior is caused by the CMSIS-RTOS wrapper that you use (provided by ST or custom).
2026-05-08 7:23 AM
Hello all,
From what I tested, FreeRTOS itself does not seem to have any issue running five tasks at osPriorityLow. I built a simple project with five separate low-priority tasks, kept the default task minimal, and they all ran normally as long as each task actually blocked with osDelay().
That suggests the issue may not be the Low priority itself, but rather something else in your project that remains ready and keeps consuming CPU time. In other words, one or more tasks may not be blocking as expected, which can starve lower-priority work or prevent the system from behaving as intended.
I would also ask @eunoia : how exactly are the tasks not “running properly”?
For example, are they not starting at all, not switching as expected, or appearing to stall after some time?
kind regards,
DHIF Khaled