106 / 342 page

General-Purpose Input/Outputs (GPIOs)
106
October 6, 2006
Preliminary
Figure 8-2.
GPIO Port Block Diagram
8.2.1
Data Register Operation
To aid in the efficiency of software, the GPIO ports allow for the modification of individual bits in the
GPIO Data (GPIODATA) register (see page 112) by using bits [9:2] of the address bus as a mask.
This allows software drivers to modify individual GPIO pins in a single instruction, without affecting
the state of the other pins. This is in contrast to the "typical" method of doing a read-modify-write
operation to set or clear an individual GPIO pin. To accommodate this feature, the GPIODATA
register covers 256 locations in the memory map.
During a write, if the address bit associated with that data bit is set to 1, the value of the
GPIODATA register is altered. If it is cleared to 0, it is left unchanged.
For example, writing a value of 0xEB to the address GPIODATA + 0x098 would yield as shown in
Figure 8-3, where u is data unchanged by the write.
GPIOIBE
GPIOIS
GPIOIM
GPIOIEV
GPIOMIS
GPIORIS
GPIOICR
Interrupt
Control
GPIODR4R
GPIODR2R
GPIOSLR
GPIODR8R
GPIOPDR
GPIOPUR
GPIODEN
GPIOODR
I/O Pad
Control
GPIOAFSEL
Function
Selection
GPIODIR
GPIODATA
I/O
Data
M
U
X
M
U
X
D
E
M
U
X
I/O
Pad
Alternate Input
Alternate Output
Alternate Output Enable
Interrupt
GPIO Input
GPIO Output
GPIO Output Enable
Pad Input
Pad Output
Pad Output Enable
Package I/O Pin
GPIOPeriphID0
Identification Registers
GPIOPeriphID1
GPIOPeriphID2
GPIOPeriphID3
GPIOPeriphID4
GPIOPeriphID5
GPIOPeriphID6
GPIOPeriphID7
GPIOPCellID0
GPIOPCellID1
GPIOPCellID2
GPIOPCellID3