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