HALT is a global low-power mode that gates almost all system clocks and allows for power-down of oscillators and analog blocks. HALT can be used for additional power savings over putting the CPU in STANDBY, although the options for wakeup are more limited.
Similar to STANDBY, any of GPIO0-63 can be configured to wake up the system from HALT. No other wakeup option is available. However, CPU1's watchdog can still be clocked, and can be configured to produce a watchdog reset if a timeout mechanism is needed. On wakeup, the CPU receives a WAKEINT interrupt.
To enter HALT mode:
- Disable all interrupts with the exception of the WAKEINT interrupt . The other interrupts can be reenabled after the device is brought out of HALT mode.
- Set LPMCR.LPM to 0x2. Set GPIOLPMSEL0 and GPIOLPMSEL1 to connect the chosen GPIOs to the LPM module.
- Set CLKSRCCTL1.WDHALTI to 1 to keep the CPU1 watchdog active and INTOSC1 and INTOSC2 powered up in HALT.
- Set CLKSRCCTL1.WDHALTI to 0 to disable the CPU1 watchdog and power down INTOSC1 and INTOSC2 in HALT.
- Execute the IDLE instruction on CPU1 to enter HALT.
If an interrupt or NMI is received while the IDLE instruction is in the pipeline, the system begins executing the WAKEINT ISR. After HALT wakeup, ISR execution resumes where the execution left off.
Note: Before entering HALT mode, if the system PLL is locked (SYSPLL.LOCKS = 1), the system PLL must also be connected to the system clock (PLLCTL1.PLLCLKEN = 1). Otherwise, the device never wakes up.
To wake up from HALT mode:
- Drive the selected GPIO low for a minimum 5 µs. This activates the CPU1.WAKEINT PIE interrupt.
- Drive the wake-up GPIO high again to initiate the powering up of the SYSPLL and AUXPLL
- Wait 16 µs plus 1024 OSCLK cycles to allow the PLLs to lock and the WAKEINT ISR to be latched.
- Execute the WAKEINT ISR.
The device is now out of HALT mode and can resume normal execution.
Table 3-10 LPM Entry and Exit Criteria
LPM Mode |
Entry Sequence |
Exit Criteria |
CPU1 IDLE |
- CPU1 configures CPU1.LPMCR.LPM
to 00b
- CPU1 Executes IDLE
instruction
|
- POR/BOR
- IORSn
- Any enabled CPU1 interrupt
- CPU1 NMI
|
CPU1 STANDBY
|
- CPU1 configures CPU1.LPMCR.LPM
bits to 01b
- CPU1 programs CPU1.LPMCR.QUAL
bits to configure appropriate OSCCLK qualification for GPIO wakeup pin
- CPU1 programs
CPU1.GPIOLPMSEL0/1 register to select GPIO0 to GPIO63 pin for wake
- CPU1 Executes IDLE
instruction
|
- POR/BOR
- IORSn
- CPU1.WDINTn
- GPIO0.async to GPIO63.async
selected using CPU1.GPIOLPMSEL0/1 (after OSCCLK qualification)
- CPU2toCPU1IPCINT1
- CPU1.POWERABORT
|
HALT |
- CPU1 configures CPU1.LPMCR.LPM
bits to 10b
- CPU1 programs
CPU1.GPIOLPMSEL0/1 registers to select GPIO0 to GPIO63 pin for wake
- CPU1 software confirms whether
CPU2 has gone to IDLE or not using LPMSTAT register
- CPU1 Executes IDLE
instruction
|
- POR/BOR
- IORSn
- CPU1.WDRSn
- GPIO0.async to GPIO63.async
selected using CPU1.GPIOLPMSEL0/1 (kept low until XTAL, INTOSCx, and PLL powers
up)
- CPU1.POWERABORT
|