Operating Modes
60
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
System Resets, Interrupts, and Operating Modes, System Control Module
(SYS)
Compute Through Power Loss (CTPL) is a utility API set that leverages FRAM to enable ease of use with
LPMx.5 low-power modes and provides a powerful shutdown mode that allows an application to save and
restore critical system components when a power loss is detected. Visit
FRAM embedded software utilities
for MSP ultra-low-power microcontrollers
for details.
1.4.3.1
Enter LPMx.5
Do the following steps to enter LPMx.5:
1. Store any information that must be available after wakeup from LPMx.5 in FRAM.
2. For LPM4.5 set all ports to general-purpose I/Os (PxSEL0 = 00h and PxSEL1 = 00h).
For LPM3.5 if the LF crystal oscillator is used do not change the settings for the I/Os shared with the
LF-crystal-oscillator. These pins must be configured as LFXIN and LFXOUT. Set all other port pins to
general-purpose I/Os with PxSEL0 and PxSEL1 bits equal to 0.
3. Set the port pin direction and output bits as necessary for the application.
4. To enable a wakeup from an I/O do the following:
a. Select the wakeup edge (PxIES)
b. Clear the interrupt flag (PxIFG)
c. Set the interrupt enable bit (PxIE)
5. For LPM3.5 the modules that stay active must be enabled. For example, the RTC must be enabled if
necessary. Only modules connected to the RTC LDO can stay active.
6. For LPM3.5 if necessary enable any interrupt sources from these modules as wakeup sources. Refer
to the corresponding module chapter.
7. Disable the watchdog timer WDT if it is enabled and in watchdog mode. If the WDT is enabled and in
watchdog mode, the device does not enter LPMx.5.
8. Clear the GIE bit:
BIC #GIE, SR
9. Do the following steps to set the PMMREGOFF bit in the PMMCTL0 register:
a. Write the correct PMM password to get write access to the PMM control registers.
MOV.B #PMMPW_H, &PMMCTL0_H
b. Set PMMREGOFF bit in the PMMCTL0 register.
BIS.B #PMMREGOFF, &PMMCTL0_L
c. Optionally, disable the SVS during LPMx.5 by clearing the SVSHE bit in PMMCTL0.
BIC.B #SVSHE, &PMMCTL0_L
d. Write an incorrect PMM password to disable the write access to the PMM control registers.
MOV.B #000h, &PMMCTL0_H
10. Enter LPMx.5 with the following instruction:
BIS #SCG0+SCG1, SR
After this process, the device enters LPM3.5 if modules connected to the RTC LDO are enabled, and it
enters LPM4.5 if none of the modules connected to the RTC LDO are enabled.
1.4.3.2
Exit and Wake up From LPM3.5
The following conditions cause an exit from LPM3.5:
•
A wake-up event on an I/O if configured and enabled. The interrupt flag of the corresponding port pin is
set (PxIFG). The PMMLPM5IFG bit is set.
•
A wake-up event from a module connected to the RTC LDO if enabled. The corresponding interrupt
flag in the module is set. The PMMLPM5IFG bit is set.
•
A wake-up signla from the RST pin.
•
A power cycle. Either the SVSHIFG or none of the PMMIFGs is set.