UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
343 of 1269
NXP Semiconductors
UM10503
Chapter 17: LPC43xx GPIO
17.5.3.4 GPIO port mask registers
Each GPIO port has one mask register. The mask registers affect writing and reading the
MPORT registers. Zeroes in these registers enable reading and writing; ones disable
writing and result in zeros in corresponding positions when reading.
17.5.3.5 GPIO port pin registers
Each GPIO port has one port pin register. Reading these registers returns the current
state of the pins read, regardless of direction, masking, or alternate functions, except that
pins configured as analog I/O always read as 0s. Writing these registers loads the output
bits of the pins written to, regardless of the Mask register.
Remark:
To read the signal on the GPIO input, enable the input buffer in the syscon block
for the corresponding pin (see
17.5.3.6 GPIO masked port pin registers
Each GPIO port has one masked port pin register. These registers are similar to the
PORT registers, except that the value read is masked by ANDing with the inverted
contents of the corresponding MASK register, and writing to one of these registers only
affects output register bits that are enabled by zeros in the corresponding MASK register.
Table 202. GPIO port mask register (MASK, addresses 0x400F 6080 (MASK0) to 0x400F 609C
(MASK7)) bit description
Bit
Symbol
Description
Reset
value
Access
31:0
MASK
Controls which bits corresponding to GPIOn[m] are active in
the MPORT register (bit 0 = GPIOn[0], bit 1 = GPIOn[1], ..., bit
31 = GPIOn[31]).
0 = Read MPORT: pin state; write MPORT: load output bit.
1 = Read MPORT: 0; write MPORT: output bit not affected.
0
R/W
Table 203. GPIO port pin register (PIN, addresses 0x400F 6100 (PIN0) to 0x400F 611C (PIN7))
bit description
Bit
Symbol Description
Reset
value
Access
31:0
PORT
Reads pin states or loads output bits (bit 0 = GPIOn[0], bit 1 =
GPIOn[1], ..., bit 31 = GPIOn[31]).
0 = Read: pin is LOW; write: clear output bit.
1 = Read: pin is HIGH; write: set output bit.
ext
R/W
Table 204. GPIO masked port pin register (MPIN, addresses 0x400F 6180 (MPIN0) to 0x400F
619C (MPIN7)) bit description
Bit
Symbol
Description
Reset
value
Access
31:0
MPORT
Masked port register (bit 0 = GPIOn[0], bit 1 = GPIOn[1],
..., bit 31 = GPIOn[31]).
0 = Read: pin is LOW and/or the corresponding bit in the
MASK register is 1; write: clear output bit if the
corresponding bit in the MASK register is 0.
1 = Read: pin is HIGH and the corresponding bit in the
MASK register is 0; write: set output bit if the
corresponding bit in the MASK register is 0.
ext
R/W