© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
78
Philips Semiconductors
UM10161
Volume 1
Chapter 8: GPIO
Aside from the 32-bit long and word only accessible FIOCLR register, every fast GPIO
port can also be controlled via several byte and half-word accessible registers listed in
. Next to providing the same functions as the FIOCLR register, these additional
registers allow easier and faster access to the physical port pins.
8.5 GPIO usage notes
8.5.1 Example 1: sequential accesses to IOSET and IOCLR affecting the
same GPIO pin/bit
State of the output configured GPIO pin is determined by writes into the pin’s port IOSET
and IOCLR registers. Last of these accesses to the IOSET/IOCLR register will determine
the final output of a pin.
In case of a code:
IO0DIR = 0x0000 0080 ;pin P0.7 configured as output
IO0CLR = 0x0000 0080 ;P0.7 goes LOW
IO0SET = 0x0000 0080 ;P0.7 goes HIGH
IO0CLR = 0x0000 0080 ;P0.7 goes LOW
pin P0.7 is configured as an output (write to IO0DIR register). After this, P0.7 output is set
to LOW (first write to IO0CLR register). Short high pulse follows on P0.7 (write access to
IO0SET), and the final write to IO0CLR register sets pin P0.7 back to LOW level.
Table 78:
Fast GPIO port 0 output Clear register 0 (FIO0CLR - address 0x3FFF C01C) bit description
Bit
Symbol
Description
Reset value
31:0
FP0xCLR
Fast GPIO output value Clear bits. Bit 0 in FIO0CLR corresponds to P0.0 ... Bit
31 in FIO0CLR corresponds to P0.31.
0x0000 0000
Table 79:
Fast GPIO port 0 output Clear byte and half-word accessible register description
Register
name
Register
length (bits)
& access
Address
Description
Reset
value
FIO0CLR0
8 (byte)
0x3FFF C01C Fast GPIO Port 0 output Clear register 0. Bit 0 in FIO0CLR0 register
corresponds to P0.0 ... bit 7 to P0.7.
0x00
FIO0CLR1
8 (byte)
0x3FFF C01D Fast GPIO Port 0 output Clear register 1. Bit 0 in FIO0CLR1 register
corresponds to P0.8 ... bit 7 to P0.15.
0x00
FIO0CLR2
8 (byte)
0x3FFF C01E
Fast GPIO Port 0 output Clear register 2. Bit 0 in FIO0CLR2 register
corresponds to P0.16 ... bit 7 to P0.23.
0x00
FIO0CLR3
8 (byte)
0x3FFF C01F
Fast GPIO Port 0 output Clear register 3. Bit 0 in FIO0CLR3 register
corresponds to P0.24 ... bit 7 to P0.31.
0x00
FIO0CLRL
16
(half-word)
0x3FFF C01C Fast GPIO Port 0 output Clear Lower half-word register. Bit 0 in
FIO0CLRL register corresponds to P0.0 ... bit 15 to P0.15.
0x0000
FIO0CLRU
16
(half-word)
0x3FFF C01E
Fast GPIO Port 0 output Clear Upper half-word register. Bit 0 in
FIO0SETU register corresponds to P0.16 ... bit 15 to P0.31.
0x0000