Keil Logo

Idle Task

When no tasks are ready to run RTX51 Tiny executes an Idle Task. The Idle Task is a simple loop that does nothing—it only waits for an RTX51 Tiny Timer Tick Interrupt to switch to a task that is ready. The following EQUates allow you to configure different aspects of the RTX51 Tiny Idle Task.

  • CPU_IDLE is a macro that specifies the code to execute in the Idle Task. The default instructions set the Idle Mode bit in the PCON register (available on most 8051 devices). This saves power by halting program execution until an interrupt occurs. For example:
    CPU_IDLE MACRO
    ORL PCON,#1 ; set 8051 CPU to IDLE
    ENDM
    
  • CPU_IDLE_CODE specifies whether or not the CPU_IDLE macro is executed in the Idle Task. The default setting is 0, so the CPU_IDLE macro is not included in the Idle Task.
  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.