I/O Configuration
681
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Digital I/O
12.3 I/O Configuration
12.3.1 Configuration After Reset
After a reset, all port pins are configured as inputs with their module functions disabled. To prevent floating
inputs, all port pins, including unused ones (see
), should be configured according to the
application needs as early as possible during the initialization procedure.
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.
NOTE:
Configuring port PJ and shared JTAG pins
The application should make sure that port PJ is configured properly to prevent a floating
input. Some pins of port PJ are shared with the JTAG TDI and TDO functions and are
initialized to the JTAG functionality on reset. Other pins of Port J are initialized to high-
impedance inputs by default.
12.3.3 Configuration for LPM3 and LPM4 Modes
The digital I/O configuration is retained through LPM3/LPM4 modes. The application must configure the
I/Os appropriately to avoid floating conditions and optimize current consumption in the low-power modes.
It is possible to wake-up from LPM3/LPM4 modes through wake-up capable I/Os when PxSEL1 and
PxSEL0 registers are programmed for combinations 00, 01, and 10 for the respective I/Os. It is not
possible to wake-up from LPM3/LPM4 modes when the PxSEL1 and PxSEL0 registers combination is 11.
This capability enables wake-up from LPM3/LPM4 modes upon digital peripheral input events like UART
receive, Timer capture, and DMA external trigger.
The PxIE register bits must be set to 1 for the respective I/Os to enable the LPM3/LPM4 wake-up. The
PxIES register bits are don’t care which means the wake-up is triggered upon rise edge or fall edge of the
wake-up event. The PxIFG bit is set to 1 for the I/O that triggered the wake-up. The wake-up event can be
serviced if the port interrupt is enabled at the NVIC module.
12.3.4 Configuration for LPM3.5 and LPM4.5 Modes
When the device enters LPM3.5 or LPM4.5 low-power modes of operation, the state of the I/Os is locked
and stored by the device through the low-power modes. Upon exit from these low-power modes, this state
remains locked, until explicitly unlocked by the application. In LPM3.5 or LPM4.5 modes, the configuration
registers of the digital I/Os get reset, however the locked state of the I/Os ensures that the reset values do
not impact the I/O operation. In this case, it is the responsibility of the application to re-initialize the
configuration registers appropriately before releasing the lock condition of the I/Os.
NOTE:
Refer to the
Power Control Manager (PCM)
chapter for more details on the bits that control
the locking of the state of the I/Os.
Before entering LPM3.5, or LPM4.5 modes, the following operations are required for the I/Os:
a. Set all I/Os to general-purpose I/Os (PxSEL0 = 00h and PxSEL1 = 00h) 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 the low-power mode.
Configuring the I/O in this manner ensures that each pin is in a safe condition before entering LPM3.5
or LPM4.5.
b. Optionally, configure input interrupt pins for wake-up from low-power modes. To wake the device from
low-power modes, a general-purpose I/O port must contain an input port with interrupt and wake-up