UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
331 of 362
1.
Introduction
Many pins may be used as General Purpose input/outputs if they are not used for a
peripheral function in the application. In addition, a few pins are dedicated GPIOs. Under
software control, the GPIO function of a pin can be made to take over from the default
peripheral function.
Eight ports are defined, Port 0 through Port 7, each mapping to pins of one type of
peripheral:
•
P0: External bus interface (32 pins)
•
P1: External bus interface (20 pins)
•
P2: Dedicated GPIO and Boot Mode (4 pins)
•
P3: DAI and DAO (6 pins)
•
P4: LCD interface (12 pins)
•
P5: MCI/SD card interface (6 pins)
•
P6: UART (4 pins)
•
P7: USB (1 pin)
2.
Features
•
A total of 85 potential GPIO pins.
•
Separate direction control and data register for each port.
•
Separate set and clear registers allow controlling only selected pins without side
effects on other pins.
•
Each GPIO pin is connected to the Event Router and cause an interrupt or wakeup
event.
•
Interrupt and wakeup functions are asynchronous and operate when clocks are not
present.
•
Pin state registers allow monitoring the state of all GPIO pins, even if they are being
used for a peripheral function rather than as GPIO.
3.
Interrupts
Every GPIO pin is represented as an input to the Event Router, and through that facility it
may be used to cause an interrupt or a wakeup condition. This path is not dependent on
clocking. Refer to the Event router chapter for details.
4.
Pin description
The GPIO pins are separated into 8 logical ports of different sizes. Each port is related to
pins from one type of external interface.
UM10208
Chapter 26: General Purpose I/O (GPIO)
Rev. 02 — 1 June 2007
User manual