C28 General-Purpose Input/Output (GPIO)
376
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
General-Purpose Input/Output (GPIO)
Table 4-38. GPIO Trip Input Select Registers (continued)
Name
(1)
Address
Size (x16)
Description
GPTRIP5SEL
0x5FE4
1
GPTRIP5 (XINT2) Input Select Register (GPIO0 -
GPIO63)
GPTRIP6SEL
0x5FE5
1
GPTRIP6 (XINT3) Input Select Register (GPIO0 -
GPIO63)
GPTRIP7SEL
0x5FE6
1
GPTRIP7 (ECAP1) Input Select Register (GPIO0 -
GPIO63)
GPTRIP8SEL
0x5FE7
1
GPTRIP8 (ECAP2) Input Select Register (GPIO0 -
GPIO63)
GPIOLPMSEL1
0x5FE8
2
LPM GPIO Select 1 Register (GPIO0 - GPIO31)
GPIOLPMSEL2
0x5FEA
2
LPM GPIO Select 2 Register (GPIO32 - GPIO63)
GPTRIP9SEL
0x5FF0
1
GPTRIP9 (ECAP3) Input Select Register (GPIO0 -
GPIO63)
GPTRIP10SEL
0x5FF1
1
GPTRIP10 (ECAP4) Input Select Register (GPIO0
- GPIO63)
GPTRIP11SEL
0x5FF2
1
GPTRIP11 (ECAP5) Input Select Register (GPIO0
- GPIO63)
GPTRIP12SEL
0x5FF3
1
GPTRIP12 (ECAP6) Input Select Register (GPIO0
- GPIO63)
To plan configuration of the GPIO module, consider the following steps:
1.
Plan the device pin-out:
Through a pin multiplexing scheme, a lot of flexibility is provided for assigning functionality to the
GPIO-capable pins. Before getting started, look at the peripheral options available for each pin, and
plan pin-out for your specific system. Will the pin be used as a general purpose input or output (GPIO)
or as one of up to three available peripheral functions? Knowing this information will help determine
how to further configure the pin.
2.
Select if the GPIO will be C28 core controlled:
If the pin will be used as a C28 GPIO or peripheral, the correct bits must be set in the GPIOCSEL
register. This register is located in the M3 GPIO register space.
3.
Enable or disable internal pull-up resistors:
To enable or disable the internal pullup resistors, write to the respective bits in the GPIO pullup disable
(GPIOPUR) register. This register is located in the M3 GPIO register space. All GPIO-capable pins
have the pullup disabled by default. The AIOx pins do not have internal pull-up resistors.
4.
Select input qualification:
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: