Keil™, An ARM® Company

Technical Support

RL-ARM: USING IDLE MODE ON STR9 WITH RTX KERNEL


Information in this article applies to:

  • RL-ARM RTX Kernel any Version
  • ST Microelectronics STR9 devices

QUESTION

I am using the RTX Kernel together with a STR9 device. I want to put the controller into power-saving mode during the RTX idle state. Is this possible?

ANSWER

Yes this is possible. You can use the power-saving idle mode if RTX enters idle state. You need to make the following changes to your project:

  1. Change os_idle_demon task in file RTX_Config.c.

    Add a macro to put the controller in power-saving mode.

    void os_idle_demon (void) __task {
       /* The idle demon is a system task. It is running when no other task is   */
       /* ready to run (idle situation). It must not terminate. Therefore it     */
       /* should contain at least an endless loop.                               */
    
       for (;;) {
         _idle_();    /* enter low-power mode */
       }
    } /* end of os_idle_demon */
    
    
  2. Initialize SCU_MGR registers in your application.

    Initialize SCU_MGR registers to enable clock in idle mode.

    SCU->MGR0 = 0x00000020;   /* VIC          clock enabled in idle mode */
    SCU->MGR1 = 0x00000003;   /* TIM23, TIM01 clock enabled in idle mode */
    

With these changes the controller enters the idle mode if the RTX idle task is running and exits the idle mode with the next OS timer interrupt.

MORE INFORMATION

  • Refer to Idle Task in the RL-ARM User's Guide.

Last Reviewed: Friday, September 07, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure