Is there a similar macro to enter LPM mode?
Also are these macros defined in IAR compiler?

-- 
Ori Idan


On 9/18/07, Mark Sutton <[email protected]> wrote:
>
>  Oops.  Corection:
>
>
>
> The macro is:  LPMx_EXIT.  (Not "EXIT_LPMx".)  Sorry about the
> brain-glitch.
>
>
>
> Mark Sutton
>
> Axonn LLC
>
> [email protected]
>   ------------------------------
>
> *From:* Mark Sutton [mailto:[email protected]]
> *Sent:* Tuesday, September 18, 2007 9:08 AM
> *To:* '[email protected]'; 'GCC for MSP430 - http://mspgcc.sf.net'
> *Subject:* RE: [Mspgcc-users] Exiting from low power mode
>
>
>
> Use the macro "EXIT_LPMx".  Replace "x" with the low power mode you were
> in.  (E. g., 2, 3, 4…).
>
>
>
> Place a call to this macro in the interrupt handler that you wish to wake
> the chip out of low power mode.
>
>
>
> I often use this macro conditionally.  E. g, when a timer interrupt hits,
> I decrement a countdown.  When the countdown hits zero, exit.
>
>
>
> Mark Sutton
>
> Axonn LLC
>
> [email protected]
>   ------------------------------
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Ori Idan
> *Sent:* Tuesday, September 18, 2007 8:55 AM
> *To:* [email protected]
> *Subject:* [Mspgcc-users] Exiting from low power mode
>
>
>
> When I enter a low power mode, I set bits in register SR
> I understand that this register is pushed on the stack when entering
> interrupt service routine.
> How do I change the SR from within the interrupt service routine so that I
> can exit low power mode when returning from the interrupt?
> I would like to do it in C without resorting to assembly.
>
> --
> Ori Idan
>

Reply via email to