
NXP Semiconductors
UM191812
PN544 C2 User Manual
191812
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User Manual
Rev. 1.2 — 2010-06-16
142 of 172
“Temporarily” means that the change is applied directly in the register of the hardware,
therefore the new value is immediately applied, but will be lost after power down (at next
power up, the EEPROM values will be applied)
9.17.3.1 Output configuration
To configure permanently GPIO5 in output
•
Set
0x9893
GPIO_Config_PDIR bit 5 to 1.
•
The value is stored in EEPROM; it will be loaded at next power up of the IC.
•
In order not to change the other GPIO configuration, it is advised to first read the
GPIO_Config_PDIR byte, to apply then a new value which changes only the desired
bit.
To configure temporarily GPIO5 in output
•
Set
0xF821
PDIR bit 5 to 1. It writes directly into the hardware register.
•
In order not to change the other GPIO configuration, it is advised to first read the
PDIR byte, to apply then a new value which changes only the desired bit.
9.17.3.2 Read/write an output pin
To set with immediate effect GPIO5 to 1 (GPIO5 is considered in this example configured
in output)
•
Set 0xF82B POUT bit 5 to 1
•
In order not to change the other output GPIOs values, it is advised to first read the
POUT register, to apply then a new value which changes only the desired bit.
To set with immediate effect GPIO5 to 0 (GPIO5 is considered in this example configured
in output)
•
Set 0xF82B POUT bit 5 to 0
•
In order not to change the other output GPIOs values, it is advised to first read the
POUT register, to apply then a new value which changes only the desired bit.
To set GPIO5 to 1 at start up (GPIO5 is considered in this example configured in output)
•
Set 0x9890 GPIO_Config_POUT bit 5 to 1
To set GPIO5 to 0 at start up (GPIO5 is considered in this example configured in output)
•
Set 0x9890 GPIO_Config_POUT bit 5 to 0
•
To read an output pin value, e.g. GPIO5 considered configured in output
•
Read 0xF82B POUT. GPIO5 value is bit 5 of the register.