Operating Modes
2-16
System Resets, Interrupts, and Operating Modes
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:
J
The PC and SR are stored on the stack
J
The CPUOFF, SCG1, and OSCOFF bits are automatically reset
-
Options for returning from the interrupt service routine:
J
The original SR is popped from the stack, restoring the previous
operating mode.
J
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+SCG1+SCG0,SR ; Enter LPM3
;
...
; Program stops here
;
; Exit LPM3 Interrupt Service Routine
BIC
#SCG1+SCG0,0(SP)
; Exit LPM3 on RETI
RETI
Extended Time in Low-Power Modes
The negative temperature coefficient of the DCO should be considered when
the DCO is disabled for extended low-power mode periods. If the temperature
changes significantly, the DCO frequency at wake-up may be significantly
different from when the low-power mode was entered and may be out of the
specified operating range. To avoid this, the DCO can be set to it lowest value
before entering the low-power mode for extended periods of time where
temperature can change.
; Enter LPM4 Example with lowest DCO Setting
BIC
#RSEL2+RSEL1+RSEL0,&BCSCTL1
; Lowest RSEL
BIS
#GIE+SCG1+SCG0,SR ; Enter LPM4
;
...
; Program stops
;
; Interrupt Service Routine
BIC
#SCG1+SCG0,0(SR); Exit LPM4 on RETI
RETI
Summary of Contents for MSP430x1xx
Page 1: ... 2005 Mixed Signal Products User s Guide SLAU049E ...
Page 6: ...vi ...
Page 18: ...1 6 Introduction ...
Page 36: ...2 18 System Resets Interrupts and Operating Modes ...
Page 112: ...3 76 ...
Page 130: ...4 18 Basic Clock Module ...
Page 152: ...5 22 Flash Memory Controller ...
Page 160: ...6 8 Supply Voltage Supervisor ...
Page 168: ...7 8 Hardware Multiplier ...
Page 192: ...8 24 ...
Page 200: ...9 8 Digital I O ...
Page 234: ...11 24 Timer_A ...
Page 260: ...12 26 Timer_B ...
Page 291: ...13 31 USART Peripheral Interface UART Mode ...
Page 314: ...14 23 USART Peripheral Interface SPI Mode ...
Page 346: ...15 32 USART Peripheral Interface I2C Mode ...
Page 358: ...16 12 Comparator_A ...
Page 386: ...17 28 ADC12 ...
Page 418: ...18 32 ADC10 ...
Page 432: ...19 14 DAC12 ...