I/O Configuration
372
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
Digital I/O
12.3.2 Configuration of Unused Port Pins
To prevent a floating input and to reduce power consumption, unused I/O pins should be configured as I/O
function, output direction, and left unconnected on the PC board. The value of the PxOUT bit is don't care,
because the pin is unconnected. Alternatively, the integrated pullup or pulldown resistor can be enabled
by setting the PxREN bit of the unused pin to prevent a floating input. See the
System Resets, Interrupts,
and Operating Modes, System Control Module (SYS)
chapter for termination of unused pins.
NOTE:
Configuring port PJ and shared JTAG pins:
The application should make sure that port PJ is configured properly to prevent a floating
input. Because port PJ is shared with the JTAG function, floating inputs may not be noticed
when in an emulation environment. Port J is initialized to high-impedance inputs by default.
12.3.3 Configuration for LPMx.5 Low-Power Modes
NOTE:
See ,
Entering and Exiting Low-Power Modes LPMx.5
, in the
System Resets, Interrupts, and
Operating Modes, System Control Module (SYS)
chapter for details about LPMx.5 low-power
modes.
See the device-specific data sheet to determine which LPMx.5 low-power modes are
available and which modules can operate in LPM3.5, if any.
With regard to the digital I/O, the following description is applicable to both LPM3.5 and
LPM4.5.
Upon entering LPMx.5 (LPM3.5 or LPM4.5) the LDO of the PMM module is disabled, which removes the
supply voltage from the core of the device. This causes all I/O register configurations to be lost, thus the
configuration of I/O pins must be handled differently to ensure that all pins in the application behave in a
controlled manner upon entering and exiting LPMx.5. Properly setting the I/O pins is critical to achieve the
lowest possible power consumption in LPMx.5, and to prevent an uncontrolled input or output I/O state in
the application. The application has complete control of the I/O pin conditions that are necessary to
prevent unwanted spurious activity upon entry and exit from LPMx.5.
Before entering LPMx.5 the following operations are required for the I/Os:
a. Set all I/Os to general-purpose I/Os (PxSEL0 = 000h and PxSEL1 = 000h) and configure as needed.
Each I/O can be set to input high impedance, input with pulldown, input with pullup, output high, or
output low. It is critical that no inputs are left floating in the application; otherwise, excess current may
be drawn in LPMx.5.
Configuring the I/O in this manner ensures that each pin is in a safe condition before entering LPMx.5.
b. Optionally, configure input interrupt pins for wake-up from LPMx.5. To wake the device from LPMx.5, a
general-purpose I/O port must contain an input port with interrupt and wakeup capability. Not all inputs
with interrupt capability offer wakeup from LPMx.5. See the device-specific data sheet for availability.
To wake up the device, a port pin must be configured properly before entering LPMx.5. 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 the device. Last,
the PxIE for the port must be enabled, as well as the general interrupt enable.
NOTE:
It is not possible to wake up from a port interrupt if its respective port interrupt flag is already
asserted. It is recommended that the flag be cleared before entering LPMx.5. It is also
recommended that GIE = 1 be set before entry into LPMx.5. Any pending flags in this case
could then be serviced before LPMx.5 entry.
This completes the operations required for the I/Os before entering LPMx.5.
During LPMx.5 the I/O pin states are held and locked based on the settings before LPMx.5 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.