Thanks for these clarifying answers.
Another option would be use the same priority (0) as the idle task also for my lowest priority task and set configIDLE_SHOULD_YIELD to 1. Is that right? Then the lowest priority task could use xQueueReceive and ulTaskNotifyTake with a blocking time > 0 ?
Are there any drawbacks from this?
In case the lowest priority tasks has prriority 1 (greater than idle task) and never blocks, will idle task ever run ? What does that mean to FreeRTOS kernel? (It seems to work for me. While thinking about other options I came across this question)
Thanks for any help.
The only drawback is the more RAM but if you want to use blocking time > 0, that is the only option.
No, the Idle task will starve.
The idle task does some housekeeping stuff and that won’t happen. For example, when a task deletes itself, its memory is freed in the Idle task. If the Idle task never runs, that memory will never be freed.
CURRENTLY the only functions the idle task does is clean up deleted tasks and provide hooks for low power idle, so if you don’t need them, letting it starve is ok.
Putting your task that would be currently using up all the spare time at task priority 0, and enabling time slicing will say that the system will run the idle task alternating with your task, so it will not actually starve, but it also will not be using up much time as it will quickly see that there is nothing for it to do. This is the normal recommendation.
Hey @Mr_M_from_K, I hope you’re doing well!
I wanted to reach out to see if you needed any additional help with this, or if the answers you’ve gotten in this thread answered your question. If you’re unsure about anything or facing any problems feel free to ask so we can help you with them! Additionally if you’re unblocked on your current project if you could let us know that’d be great!
thanks for coming back to this case.
And thanks also for the explanations of aggarg and richard-damon. I have a clearer understanding now and changed the FreeRTOS setting in my project according to your recommendation.