Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Dynamic Tick Mode is a power-saving feature that was first introduced in μC/OS-III V3.05.00 and later revised in µC/OS-III V3.07.00. It is a compromise between the approaches outlined in the sections on Tickless Mode and Periodic Tick Mode in that it gives low power applications the option to utilize timing services, without the drawback of waking the system up periodically.

Benefits

  • The full set of time services is available for use.
  • Power consumption is reduced by allowing the system to stay asleep through idle periods.

Implications

  • Support for this mode is more involved than for Periodic Tick Mode.
  • Round-robin scheduling cannot be used. A build error will be generated if it is enabled.

System Behavior

Compared to Periodic Tick Mode, the system behavior changes drastically while using dynamic tick. It more closely resembles an application using tickless mode with a hardware timer, as was shown in that section. The major difference between the two cases is that dynamic tick operates alongside the kernel's timing API. For code making use of those APIs, there should be no difference between a properly-implemented Dynamic Tick BSP and the simpler Periodic Tick BSP.

Dynamic Tick

Requirements

Dynamic Tick requires a programmable hardware timer. A down-counting timer can be used, but we will assume an up-counter for the remainder of this document.

The timer must have the following characteristics:

  • A programmable ceiling value which:
    • Generates an interrupt on match
    • Sets a status bit on match
  • A counter that can be read while the timer is running
  • A frequency that is an integer multiple of the OS Tick rate

For an optimal implementation of Dynamic Tick, the following constraints are included:

  • A timer frequency which matches the OS Tick frequency.
  • A register width with matches the width of the OS_TICK type (32-bit by default).

Dynamic Tick Model

Dynamic tick is most easily understood as a best-effort service which fulfills timeout requests from the kernel. The service can only handle one request at any given time, so the kernel must ensure that the current request is valid for the nearest task delay or pend timeout.

Dynamic Tick Control Flow

Dynamic tick is most easily understood as a best-effort service which fulfills timeout requests from the kernel. The service can only handle one request at any given time, so the kernel must ensure that the current request is valid for the nearest task delay or pend timeout. For simplicity, let us assume that we have two tasks in our system which are delayed; T1 should wake up in N ticks and T2 should wake up in N+1 ticks.

 

 

Description

  • No labels