
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
132 of 368
NXP Semiconductors
UM10375
Chapter 9: LPC13xx General Purpose I/O (GPIO)
•
If a pin is configured as GPIO output, the current value of GPIODATA register is
driven to the pin. This value can be a result of writing to the GPIODATA register, or it
can reflect the previous state of the pin if the pin is switched to GPIO output from
GPIO input or another digital function. A read returns the current state of the output
latch.
•
If a pin is configured as another digital function (input or output), a write to the
GPIODATA register has no effect on the pin level. A read returns the current state of
the pin even if it is configured as an output. This means that by reading the
GPIODATA register, the digital output or input value of a function other than GPIO on
that pin can be observed.
The following rules apply when the pins are switched from input to output:
•
Pin is configured as input with a HIGH level applied:
–
Change pin to output: pin drives HIGH level.
•
Pin is configured as input with a LOW level applied:
–
Change pin to output: pin drives LOW level.
The rules show that the pins mirror the current logic level. Therefore floating pins may
drive an unpredictable level when switched from input to output.
9.4.2 GPIO data direction register
9.4.3 GPIO interrupt sense register
Table 150. GPIO data direction register (GPIO0DIR, address 0x5000 8000 to GPIO3DIR,
address 0x5003 8000) bit description
Bit
Symbol
Description
Reset value
Access
11:0
IO
Selects pin x as input or output (x = 0 to 11).
0 = Pin PIOn_x is configured as input.
1 = Pin PIOn_x is configured as output.
0x00
R/W
31:12
-
Reserved
-
-
Table 151. GPIO interrupt sense register (GPIO0IS, address 0x5000 8004 to GPIO3IS,
address 0x5003 8004) bit description
Bit
Symbol
Description
Reset
value
Access
11:0
ISENSE
Selects interrupt on pin x as level or edge sensitive (x = 0 to
11).
0 = Interrupt on pin PIOn_x is configured as edge sensitive.
1 = Interrupt on pin PIOn_x is configured as level sensitive.
0x00
R/W
31:12
-
Reserved
-
-