I/O Configuration
682
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Digital I/O
capability. Not all inputs with interrupt capability may offer wake-up from low-power modes. See the
device-specific data sheet for details on which ports have this feature. To wake up the device, a port
pin must be configured properly before entering the low-power modes. Each port should be configured
as general-purpose input. Pulldowns or pullups can be applied if required. Setting the PxIES bit of the
corresponding register determines the edge transition that wakes up the device. Last, the PxIE for the
port must be enabled.
NOTE:
It is not possible to wake up from a port interrupt if the respective port interrupt flag is
already asserted. TI recommends clearing the flag before entering LPM3, LPM4, LPM3.5, or
LPM4.5. Any pending flags in this case could then be serviced before the low-power mode
entry.
This completes the operations required for the I/Os before entering LPM3.5 or LPM4.5.
As described above, during LPM3.5, or LPM4.5 modes, the I/O pin states are held and locked based on
the settings before the low-power mode entry. Note that only the pin conditions are retained. All other port
configuration register settings such as PxDIR, PxREN, PxOUT, PxIES, and PxIE contents are lost.
Upon exit from LPM3.5 or LPM4.5 modes, all peripheral registers are set to their default conditions but the
I/O pins remain locked while the LOCKLPM5 bit in the PCM is set. Keeping the I/O pins locked ensures
that all pin conditions remain stable when entering the active mode, regardless of the default I/O register
settings.
When back in active mode, the I/O configuration and I/O interrupt configuration such as PxDIR, PxREN,
PxOUT, and PxIES should be restored to the values before entering LPM3.5 or LPM4.5. The LOCKLPM5
bit can then be cleared, which releases the I/O pin conditions and I/O interrupt configuration. Any changes
to the port configuration registers while LOCKLPM5 is set have no effect on the I/O pins.
After enabling the I/O interrupts by configuring PxIE and port interrupt enable configuration at NVIC, the
I/O interrupt that caused the wake-up can be serviced as indicated by the PxIFG flags. These flags can be
used directly, or the corresponding PxIV register may be used. Note that the PxIFG flag cannot be cleared
until the LOCKLPM5 bit has been cleared.
NOTE:
It is possible that multiple events occurred on various ports. In these cases, multiple PxIFG
flags are set, and it cannot be determined which port caused the I/O wake-up.