Register 10: GPIO Alternate Function Select (GPIOAFSEL), offset 0x420
Note:
Tamper pins enabled in the
Hibernate Tamper IO Control and Status (HIBTPIO)
register
override the
AFSEL
configuration.
The
GPIOAFSEL
register is the mode control select register. If a bit is clear, the pin is used as a
GPIO and is controlled by the GPIO registers. Setting a bit in this register configures the
corresponding GPIO line to be controlled by an associated peripheral. Several possible peripheral
functions are multiplexed on each GPIO. The
GPIO Port Control (GPIOPCTL)
register is used to
select one of the possible functions. Table 26-5 on page 1808 details which functions are muxed on
each GPIO pin. The reset value for this register is 0x0000.0000 for GPIO ports that are not listed
in the table below.
Important:
The table below shows special consideration GPIO pins. Most GPIO pins are configured
as GPIOs and tri-stated by default (
GPIOAFSEL
=0,
GPIODEN
=0,
GPIOPDR
=0,
GPIOPUR
=0, and
GPIOPCTL
=0). Special consideration pins may be programed to a
non-GPIO 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.
Table 10-8. GPIO Pins With Special Considerations
GPIOCR
GPIOPCTL
GPIOPUR
GPIOPDR
GPIODEN
GPIOAFSEL
Default Reset
State
GPIO Pins
0
0x1
1
0
1
1
JTAG/SWD
PC[3:0]
0
0x0
0
0
0
0
GPIO
a
PD[7]
0
0x0
0
0
0
0
GPIO
a
PE[7]
a. This pin is configured as a GPIO by default but is locked and can only be reprogrammed by unlocking the
pin in the
GPIOLOCK
register and uncommitting it by setting the
GPIOCR
register.
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 “Commit Control” on page 752.
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.
Caution – It is possible to create a software sequence that prevents the debugger from connecting to
the TM4C1294NCPDT microcontroller. If the program code loaded into flash immediately changes
the JTAG pins to their GPIO functionality, the debugger may not have enough time to connect and
halt the controller before the JTAG pin functionality switches. As a result, the debugger may be locked
out of the part. This issue can be avoided with a software routine that restores JTAG functionality
based on an external or software trigger. In the case that the software routine is not implemented and
the device is locked out of the part, this issue can be solved by using the TM4C1294NCPDT Flash
Programmer "Unlock" feature. Please refer to
on the TI web for more
information.
The GPIO commit control registers provide a layer of protection against accidental programming of
critical hardware peripherals. Protection is provided for the GPIO pins that can be used as the four
JTAG/SWD pins and the
NMI
pin (see “Signal Tables” on page 1772 for pin numbers). Writes to
protected bits of the
GPIO Alternate Function Select (GPIOAFSEL)
register (see page 770),
GPIO
June 18, 2014
770
Texas Instruments-Production Data
General-Purpose Input/Outputs (GPIOs)