Product Information
Community and Support

High Resolution Time

One of the most exciting features in ChibiOS/RT 3.0 is the ability to run with very high system time frequencies, for example 4MHz or above.

Have you ever dreamed things like adding a 22.25uS delay to your code? this is now possible and, note, not using polling, the task is actually put to sleep and woken after 22.25uS.

How is this even possible?

Such small delays are made possible by two important characteristics of the RT 3.0 kernel.

Fast Context Switch Time

Task-to-task context switch is extremely efficient in the RT kernel, for example it takes less than 400nS on an STM32F4. Such a fast context switch pushes the boundaries of what is possible to do at task level.

Tickless Mode

Thanks to a real tick-less mode there is no real limit to the system time operating frequency because the system time never generates interrupts unless those strictly required for scheduling.

Where is the real limit?

The real limit is dictated by the intrinsic jitter of your system, when delays get smaller and smaller you get close to jitter uncertainty zone. The time scale of this uncertainty zone depends mainly by the design of your application:

  • IRQs execution time and priorities.
  • Tasks execution time and priorities.
  • Size and number of your critical zones.

The intrinsic jitter of the kernel is very limited, for reference you may expect 1-2uS of jitter on a 120MHz Cortex-M.

More articles and guides are available on the technical wiki.

learn more

Need Tutorials?

Try the video tutorials and guides on Play Embedded.

learn more

Need Support?

The forums is the best place, registration required.

learn more