
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
94 of 808
NXP Semiconductors
UM10360
Chapter 9: LPC17xx General Purpose Input/Output (GPIO)
[1]
Reset value reflects the data stored in used bits only. It does not include reserved bits content.
5.1 GPIO port Direction register FIOxDIR (FIO0DIR to FIO4DIR- 0x2009
C000 to 0x2009 C080)
This word accessible register is used to control the direction of the pins when they are
configured as GPIO port pins. Direction bit for any pin must be set according to the pin
functionality.
Note that GPIO pins P0.29 and P0.30 are shared with the USB_D+ and USB_D- pins and
must have the same direction. If either FP0DIR bit 29 or 30 are configured as zero in the
FIO0DIR register, both P0.29 and P0.30 will be inputs. If both FP0DIR bits 29 and 30 are
ones, both P0.29 and P0.30 will be outputs.
Aside from the 32-bit long and word only accessible FIODIR register, every fast GPIO port
can also be controlled via several byte and half-word accessible registers listed in
, too. Next to providing the same functions as the FIODIR register, these
additional registers allow easier and faster access to the physical port pins.
Table 80.
GPIO interrupt register map
Generic
Name
Access
Reset
value
PORTn Register
Address & Name
IntEnR
GPIO Interrupt Enable for Rising edge.
R/W
0x0
IO0IntEnR - 0x4002 8090
IO2IntEnR - 0x4002 80B0
IntEnF
GPIO Interrupt Enable for Falling edge.
R/W
0x0
IO0IntEnR - 0x4002 8094
IO2IntEnR - 0x4002 80B4
IntStatR
GPIO Interrupt Status for Rising edge.
RO
0x0
IO0IntStatR - 0x4002 8084
IO2IntStatR - 0x4002 80A4
IntStatF
GPIO Interrupt Status for Falling edge.
RO
0x0
IO0IntStatF - 0x4002 8088
IO2IntStatF - 0x4002 80A8
IntClr
GPIO Interrupt Clear.
WO
0x0
IO0IntClr - 0x4002 808C
IO2IntClr - 0x4002 80AC
IntStatus
GPIO overall Interrupt Status.
RO
0x00
IOIntStatus - 0x4002 8080
Table 81.
Fast GPIO port Direction register FIO0DIR to FIO7DIR - addresses 0x2009 C000 to
0x2009 C080) bit description
Bit
Symbol
Value Description
Reset
value
31:0
FP0DIR
FP1DIR
FP2DIR
FP3DIR
FP4DIR
Fast GPIO Direction PORTx control bits. Bit 0 in FIOxDIR
controls pin Px.0, bit 31 in FIOxDIR controls pin Px.31.
0x0
0
Controlled pin is input.
1
Controlled pin is output.