Datasheet
Principles for Low-Power Applications
www.ti.com
2.3.1 Entering and Exiting Low-Power Modes
An enabled interrupt event wakes the MSP430 from any of the low-power operating modes. The program
flow is:
• Enter interrupt service routine:
– The PC and SR are stored on the stack
– The CPUOFF, SCG1, and OSCOFF bits are automatically reset
• Options for returning from the interrupt service routine:
– The original SR is popped from the stack, restoring the previous operating mode.
– The SR bits stored on the stack can be modified within the interrupt service routine returning to a
different operating mode when the RETI instruction is executed.
; Enter LPM0 Example
BIS #GIE+CPUOFF,SR ; Enter LPM0
; ... ; Program stops here
;
; Exit LPM0 Interrupt Service Routine
BIC #CPUOFF,0(SP) ; Exit LPM0 on RETI
RETI
; Enter LPM3 Example
BIS #GIE+CPUOFF+SCG1+SCG0,SR ; Enter LPM3
; ... ; Program stops here
;
; Exit LPM3 Interrupt Service Routine
BIC #CPUOFF+SCG1+SCG0,0(SP) ; Exit LPM3 on RETI
RETI
2.4 Principles for Low-Power Applications
Often, the most important factor for reducing power consumption is using the MSP430 clock system to
maximize the time in LPM3. LPM3 power consumption is less than 2 µA typical with both a real-time clock
function and all interrupts active. A 32-kHz watch crystal is used for the ACLK and the CPU is clocked
from the DCO (normally off) which has a 1-µs wake-up.
• Use interrupts to wake the processor and control program flow.
• Peripherals should be switched on only when needed.
• Use low-power integrated peripheral modules in place of software driven functions. For example
Timer_A and Timer_B can automatically generate PWM and capture external timing, with no CPU
resources.
• Calculated branching and fast table look-ups should be used in place of flag polling and long software
calculations.
• Avoid frequent subroutine and function calls due to overhead.
• For longer software routines, single-cycle CPU registers should be used.
40
System Resets, Interrupts, and Operating Modes SLAU144J–December 2004–Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated