Principles for Low-Power Applications
61
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
System Resets, Interrupts, and Operating Modes, System Control Module
(SYS)
Any exit from LPM3.5 causes a BOR. The program execution starts at the address the reset vector points
to. PMMLPM5IFG = 1 indicates a wakeup from LPM3.5, or the System Reset Vector Word register
(SYSRSTIV) can be used to decode the reset condition (see the device data sheet).
After the wakeup from LPM3.5, the state of the I/Os and the modules connected to the RTC LDO are
locked and remain unchanged until the application clears the LOCKLPM5 bit in the PM5CTL0 register.
Do the following steps after a wakeup from LPM3.5:
1. Initialize the registers of the modules connected to the RTC LDO exactly the same way as they were
configured before the device entered LPM3.5 but do not enable the interrupts.
2. Initialize the port registers exactly the same way as they were configured before the device entered
LPM3.5 but do not enable port interrupts.
3. If the LF-crystal-oscillator was used in LPM3.5 the corresponding I/Os must be configured as LFXIN
and LFXOUT. The LF-crystal-oscillator must be enabled in the clock system (see the clock system CS
chapter).
4. Clear the LOCKLPM5 bit in the PM5CTL0 register.
5. Enable port interrupts as necessary.
6. Enable module interrupts.
7. After enabling the port and module interrupts the wake-up interrupt will be serviced as a normal
interrupt.
1.4.3.3
Exit and Wake up From LPM4.5
The following conditions will cause an exit from LPM4.5:
•
A wakeup 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 wakeup from the RST pin.
•
A power-cycle. Either the SVSHIFG or none of the PMMIFGs is set.
Any exit from LPM4.5 causes a BOR. The program execution starts at the address the reset vector points
to. PMMLPM5IFG = 1 indicates a wakeup from LPM4.5, or the System Reset Vector Word register
(SYSRSTIV) can be used to decode the reset condition (see the device data sheet).
After the wake-up from LPM4.5 the state of the I/Os are locked and remain unchanged until the
application clears the LOCKLPM5 bit in the PM5CTL0 register.
Do the following steps after a wakeup from LPM4.5:
1. Initialize the port registers exactly the same way as they were configured before the device entered
LPM4.5, but do not enable port interrupts.
2. Clear the LOCKLPM5 bit in the PM5CTL0 register.
3. Enable port interrupts as necessary.
4. After enabling the port interrupts the wake-up interrupt will be serviced as a normal interrupt.
If a crystal oscillator is needed after a wakeup from LPM4.5, configure the corresponding pins and start
the oscillator after clearing the LOCKLPM5 bit.
1.5
Principles for Low-Power Applications
Often, the most important factor for reducing power consumption is using the device clock system to
maximize the time in LPM3 or LPM4 modes whenever possible.
•
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 lookups should be used in place of flag polling and long software
calculations.