General-Purpose Input/Output (GPIO)
348
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
General-Purpose Input/Output (GPIO)
Table 4-5. GPIO Register Map (continued)
0xFEC
GPIOPeriphID3
RO
0x0000.0001
GPIO Peripheral
Identification 3
0xFF0
GPIOPCellID0
RO
0x0000.000D
GPIO PrimeCell
Identification 0
0xFF4
GPIOPCellID1
RO
0x0000.00F0
GPIO PrimeCell
Identification 1
0xFF8
GPIOPCellID2
RO
0x0000.0005
GPIO PrimeCell
Identification 2
0xFFC
GPIOPCellID3
RO
0x0000.00B1
GPIO PrimeCell
Identification 3
4.1.6 Register Descriptions
The remainder of this section lists and describes the GPIO registers, in numerical order by address offset.
4.1.6.1
GPIO Data (GPIODATA) Register, offset 0x000
The GPIODATA register is the data register. In software control mode, values written in the GPIODATA
register are transferred onto the GPIO port pins if the respective pins have been configured as outputs
through the GPIO Direction (GPIODIR) register .
In order to write to GPIODATA, the corresponding bits in the mask, resulting from the address bus bits
[9:2], must be set. Otherwise, the bit values remain unchanged by the write.
Similarly, the values read from this register are determined for each bit by the mask bit derived from the
address used to access the data register, bits [9:2]. Bits that are set in the address mask cause the
corresponding bits in GPIODATA to be read, and bits that are clear in the address mask cause the
corresponding bits in GPIODATA to be read as 0, regardless of their value.
A read from GPIODATA returns the last bit value written if the respective pins are configured as outputs,
or it returns the value on the corresponding input pin when these are configured as inputs. All bits are
cleared by a reset.
Figure 4-4. GPIO Data (GPIODATA) Register
31
16
Reserved
R-0
15
8
7
0
Reserved
DATA
R-0
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 4-6. GPIO Data (GPIODATA) Register Field Descriptions
Bit
Field
Value
Description
31-8
Reserved
Reserved
7-0
DATA
00h
GPIO Data
This register is virtually mapped to 256 locations in the address space. To facilitate the reading and
writing of data to these registers by independent drivers, the data read from and written to the
registers are masked by the eight address lines [9:2]. Reads from this register return its current
state. Writes to this register only affect bits that are not masked by ADDR[9:2] and are configured
as outputs.
See
for examples of reads and writes.