Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 192 of 547
NXP Semiconductors
UM10398
Chapter 12: LPC111x/LPC11Cxx General Purpose I/O (GPIO)
If a pin is configured as GPIO input, a write to the GPIOnDATA register has no effect
on the pin level. A read returns the current state of the pin.
If a pin is configured as GPIO output, the current value of GPIOnDATA register is
driven to the pin. This value can be a result of writing to the GPIOnDATA 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
GPIOnDATA 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
GPIOnDATA 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.
12.3.2 GPIO data direction register
12.3.3 GPIO interrupt sense register
Table 175. GPIOnDIR 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 176. GPIOnIS 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 - -