C28 General-Purpose Input/Output (GPIO)
413
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
General-Purpose Input/Output (GPIO)
The GPIO data registers indicate the current status of the GPIO pin, irrespective of which mode the pin is
in. Writing to this register will set the respective GPIO pin high or low if the pin is enabled as a GPIO
output, otherwise the value written is latched but ignored. The state of the output register latch will remain
in its current state until the next write operation. A reset will clear all bits and latched values to zero. The
value read from the GPxDAT registers reflect the state of the pin (after qualification), not the state of the
output latch of the GPxDAT register.
Typically the DAT registers are used for reading the current state of the pins. To easily modify the output
level of the pin refer to the SET, CLEAR and TOGGLE registers.
4.2.7.25 GPIO Port A Data (GPADAT) Register
The GPIO Port A Data (GPADAT) register is shown and described in the figure and table below.
(1)
x = The state of the GPADAT register is unknown after reset. It depends on the level of the pin after reset.
Figure 4-66. GPIO Port A Data (GPADAT) Register
31
30
29
28
27
26
25
24
GPIO31
GPIO30
GPIO29
GPIO28
GPIO27
GPIO26
GPIO25
GPIO24
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
23
22
21
20
19
18
17
16
GPIO23
GPIO22
GPIO21
GPIO20
GPIO19
GPIO18
GPIO17
GPIO16
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
15
14
13
12
11
10
9
8
GPIO15
GPIO14
GPIO13
GPIO12
GPIO11
GPIO10
GPIO9
GPIO8
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
7
6
5
4
3
2
1
0
GPIO7
GPIO6
GPIO5
GPIO4
GPIO3
GPIO2
GPIO1
GPIO0
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
R/W-x
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
(1)
Table 4-74. GPIO Port A Data (GPADAT) Register Field Descriptions
Bits
Field
Value
Description
31-0
GPIO31-GPIO0
Each bit corresponds to one GPIO port A pin (GPIO0-GPIO31)
0
Reading a 0 indicates that the state of the pin is currently low, irrespective of the mode for which
the pin is configured.
Writing a 0 will force an output of 0 if the pin is configured as a GPIO output in the appropriate
GPAMUX1/2 and GPADIR registers; otherwise, the value is latched but not used to drive the
pin.
1
Reading a 1 indicates that the state of the pin is currently high irrespective of the mode for
which the pin is configured.
Writing a 1will force an output of 1if the pin is configured as a GPIO output in the appropriate
GPAMUX1/2 and GPADIR registers; otherwise, the value is latched but not used to drive the
pin.