C28 General-Purpose Input/Output (GPIO)
386
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
General-Purpose Input/Output (GPIO)
If the pin will be used as an input, specify the required input qualification, if any. The input qualification
is specified in the GPACTRL, GPBCTRL, GPCCTRL, GPECTRL, GPAQSEL1, GPAQSEL2,
GPBQSEL1, GPBQSEL2, GPCQSEL1, and GPEQSEL1 registers. By default, GPIO Port A, B, and C
are synchronized to SYSCLKOUT only, and GPIO Port E is synchronized to the analog subsystem
clock.
5.
Select the pin function:
Configure the GPxMUXn or AIOMUXn registers such that the pin is a GPIO or one of three available
peripheral functions. By default, all GPIO-capable pins are configured at reset as general purpose input
pins.
6.
For digital general purpose I/O, select the direction of the pin:
If the pin is configured as an GPIO, specify the direction of the pin as either input or output in the
GPADIR, GPBDIR, GPCDIR, GPEDIR, or AIODIR registers. By default, all GPIO pins are inputs. To
change the pin from input to output, first load the output latch with the value to be driven by writing the
appropriate value to the GPxCLEAR, GPxSET, or GPxTOGGLE (or AIOCLEAR, AIOSET, or
AIOTOGGLE) registers. Once the output latch is loaded, change the pin direction from input to output
via the GPxDIR registers. The output latch for all pins is cleared at reset.
7.
Select low power mode wake-up sources:
Specify which pins, if any, will be able to wake the device from HALT and STANDBY low power
modes. The pins are specified in the GPIOLPMSEL1 and GPIOLPMSEL2 registers.
8.
Select external interrupt sources:
Specify the source for the XINT1 - XINT3 interrupts. For each interrupt you can specify one of the
GPIO (0-63) signals as the source. This is done by setting the correct bits in GPTRIP4SEL for XINT1,
GPTRIP5SEL for XINT2, and GPTRIP6SEL for XINT3. The polarity of the interrupts can be configured
in the XINTnCR register.
NOTE:
There is a 2-SYSCLKOUT cycle delay from when a write to configuration registers such as
GPxMUXn and GPxQSELn occurs to when the action is valid