RL-ARM User's Guide

Idle Task

When no task is ready to run, the RTX kernel executes the idle task os_idle_demon. The idle task 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.

The RTX kernel initiates idle mode in the os_idle_demon task (when no other task is ready for execution). When the RTX kernel timer tick interrupt (or any other interrupt) occurs, the microcontroller resumes program execution.

You can add your own code to the os_idle_demon task. The code executed by the idle task can be configured in the RTX_Config.c configuration file.

Note

  • The idle task os_idle_demon is an RTX kernel system task and is therefore created by the system.
  • 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.