cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS - TICK_RATE_HZ

chriskuku
Senior II

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).

1 REPLY 1
KnarfB
Principal III

> 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