Keil Logo

Idle Task

When no task is ready to run, the RTX kernel executes the idle task os_idle_demon, which is simply an endless loop. For example:

  for (;;);

ARM devices provide an idle mode that reduces power consumption by halting program execution until an interrupt occurs. In this mode, all peripherals, including the interrupt system, still continue to work.

os_idle_demon is an RTX kernel system task created by the system. The RTX kernel initiates idle mode when no other task is ready for execution. When the RTX kernel timer tick interrupt or any other interrupt occurs, program execution is resumed.

You can add your own code to the os_idle_demon that can be configured in the file RTX_Config.c (for example the default stack size).


  • Do not use idle mode if you are using the JTAG interface for debugging. Some ARM devices may stop communicating over the JTAG interface when idle.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.