![Texas Instruments SimpleLink Ethernet MSP432E401Y Скачать руководство пользователя страница 1213](http://html1.mh-extra.com/html/texas-instruments/simplelink-ethernet-msp432e401y/simplelink-ethernet-msp432e401y_technical-reference-manual_10955781213.webp)
GPIO Registers
1213
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
General-Purpose Input/Outputs (GPIOs)
17.5.10 GPIOAFSEL Register (Offset = 0x420) [reset = X]
GPIO Alternate Function Select (GPIOAFSEL)
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.
See the device-specific data sheet for details on which functions are muxed on each GPIO pin. The reset
value for this register is 0x00000000 for GPIO ports that are not listed in
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.
(1)
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.
Table 17-16. GPIO Pins With Special Considerations
GPIO Pins
Default Reset
State
GPIOAFSEL
GPIODEN
GPIOPDR
GPIOPUR
GPIOPCTL
GPIOCR
PC[3:0]
JTAG/SWD
1
1
0
1
0x1
0
PD[7]
GPIO
(1)
0
0
0
0
0x0
0
PE[7]
GPIO
(1)
0
0
0
0
0x0
0
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
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.
NOTE:
It is possible to create a software sequence that prevents the debugger from connecting to
the MSP432E4 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.
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 for pin numbers). Writes to protected bits of the GPIO Alternate Function Select
(GPIOAFSEL) register (see
), GPIO Pullup Select (GPIOPUR) register
), GPIO Pulldown Select (GPIOPDR) register (see
), and GPIO Digital
Enable (GPIODEN) register (see
) are not committed to storage unless the GPIO Lock
(GPIOLOCK) register (see
) has been unlocked and the appropriate bits of the GPIO
Commit (GPIOCR) register (see
) have been set.
When using the I
2
C module, in addition to setting the GPIOAFSEL register bits for the I
2
C clock and data
pins, the data pins should be set to open drain using the GPIO Open Drain Select (GPIOODR) register
(see examples in
).