GPIO
GPIO
GPIO
NOTE: The GPIO registers in this chapter are duplicated in each GPIO block; however, depending
on the block, all eight bits may not be connected to a GPIO pad. In those cases, writing to
unconnected bits has no effect, and reading unconnected bits returns no meaningful data.
See the device-specific data sheet for the GPIOs included on any given device.
The offset is a hexadecimal increment to the register's address, relative to the base address of that GPIO
port:
• GPIO Port A (AHB): 0x40058000 (ending address of 0x40058FFF)
• GPIO Port B (AHB): 0x40059000 (ending address of 0x40059FFF)
• GPIO Port C (AHB): 0x4005A000 (ending address of 0x4005AFFF)
• GPIO Port D (AHB): 0x4005B000 (ending address of 0x4005BFFF)
• GPIO Port E (AHB): 0x4005C000 (ending address of 0x4005CFFF)
• GPIO Port F (AHB): 0x4005D000 (ending address of 0x4005DFFF)
• GPIO Port G (AHB): 0x4005E000 (ending address of 0x4005EFFF)
• GPIO Port H (AHB): 0x4005F000 (ending address of 0x4005FFFF)
• GPIO Port J (AHB): 0x40060000 (ending address of 0x40060FFF)
• GPIO Port K (AHB): 0x40061000 (ending address of 0x40061FFF)
• GPIO Port L (AHB): 0x40062000 (ending address of 0x40062FFF)
• GPIO Port M (AHB): 0x40063000 (ending address of 0x40063FFF)
• GPIO Port N (AHB): 0x40064000 (ending address of 0x40064FFF)
• GPIO Port P (AHB): 0x40065000 (ending address of 0x40065FFF)
• GPIO Port Q (AHB): 0x40066000 (ending address of 0x40066FFF)
• GPIO Port R (AHB): 0x40067000 (ending address of 0x40067FFF)
• GPIO Port S (AHB): 0x40068000 (ending address of 0x40068FFF)
• GPIO Port T (AHB): 0x40069000 (ending address of 0x40069FFF)
Note that each GPIO module clock must be enabled before the registers can be programmed (see
Section 4.2.87). There must be a delay of 3 system clocks after the GPIO module clock is enabled before
any GPIO module registers are accessed.
The table below shows special consideration GPIO pins. Most GPIO pins are configured as GPIOs and
high-impedance by default (GPIOAFSEL = 0, GPIODEN = 0, GPIOPDR = 0, GPIOPUR = 0, and
GPIOPCTL = 0). Special consideration pins may be programed to a nonGPIO function or may have
special commit controls out of reset. In addition, a Power-On-Reset (POR) returns these GPIO to their
original special consideration state.
The GPIO commit control registers provide a layer of protection against accidental programming of critical
hardware signals including the GPIO pins that can function as JTAG/SWD signals and the NMI signal. The
commit control process must be followed for these pins, even if they are programmed as alternate
functions other than JTAG/SWD or NMI; see Section 17.3.4.
SLAU723A – October 2017 – Revised October 2018 General-Purpose Input/Outputs (GPIOs) 1201
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
GPIO Registers www.ti.com
NOTE: If the device fails initialization during reset, the hardware toggles the TDO output as an
indication of failure. Thus, during board layout, designers should not designate the TDO pin
as a GPIO in sensitive applications where the possibility of toggling could affect the design.
The default register type for the GPIOCR register is read-only for all GPIO pins with the exception of the
NMI pin and the four JTAG/SWD pins (see the device-specific data sheet for pin numbers). These six pins
are the only GPIOs that are protected by the GPIOCR register. Because of this, the register type for the
corresponding GPIO Ports is RW.
The default reset value for the GPIOCR register is 0x000000FF for all GPIO pins, with the exception of the
NMI and JTAG/SWD pins (see the device-specific data sheet for pin numbers). To ensure that the JTAG
and NMI pins are not accidentally programmed as GPIO pins, these pins default to noncommittable.
Because of this, the default reset value of GPIOCR changes for the corresponding ports.
Table 17-5 lists the memory-mapped registers for the GPIO. All register offset addresses not listed in
Table 17-5 should be considered as reserved locations and the register contents should not be modified.
1202 General-Purpose Input/Outputs (GPIOs) SLAU723A – October 2017 – Revised October 2018
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
www.ti.com GPIO Registers
Complex bit access types are encoded to fit into small table cells. Table 17-6 shows the codes that are
used for access types in this section.
SLAU723A – October 2017 – Revised October 2018 General-Purpose Input/Outputs (GPIOs) 1203
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated