Keil Logo

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 (MDK v4).

Last Reviewed: Friday, September 7, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.