2023-03-22 03:13 AM
I'm wondering about the influence of TICK_RATE_HZ in FreeRTOS. If I understand correctly, this is the "granularity" by which RTOS can switch between tasks. So within an interval of 1ms a task cannot be released and another task which would have to process an event has to idle until it gets control? Can I raise the TICK_RATE to a higher value (STM32F103C8T6).
2023-03-22 05:25 AM
> So within an interval of 1ms a task cannot be released and another task which would have to process an event has to idle until it gets control?
When 2 or more tasks (same priority for simplicity) are ready to run, one is picked by the scheduler in a round-robin fashion at the tick rate (pre-emptive scheduling). But, when a task is blocked (waiting for a ressource) and has the correct priority, it will be scheduled immediately when the ressource becomes available. See also https://www.freertos.org/implementation/a00008.html
hth
KnarfB