Skip to main content
Graduate II
March 22, 2023
Question

FreeRTOS - TICK_RATE_HZ

  • March 22, 2023
  • 1 reply
  • 1118 views

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

    This topic has been closed for replies.

    1 reply

    Super User
    March 22, 2023

    > 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