Datasheet
implementation is non trivial and would require us to charge a significant premium for these boards if we
implemented this.
We've focused our energy on providing a reliable, proven, properly-tuned HW reference, and enough of a SW
building block to get everyone started, but there are too many holes to fill in to cover everything NFC can do with a
development board at this price point.
For an example of communicating with a phone via NFC, though, have a look at "Talking With Your Arduino via NFC
on Blackberry" which uses the Adafruit NFC Shield. The SW layers required for NFC-based P2P communication with
a Blackberry device are apparently much lower than on Android.
Does the PN532 support tag emulation?
Yes, but in reality it's impossible to implement since it requires an external 'secure element' that is very difficult to
source (under export control and general NDA from the few manufacturers of them). If you can get one we'd love to
see it, though!
Can the PN532 read Tag-It tags from TI?
No. The PN532 is designed to be used with ISO14443 tags, with Mifare Classic probably the most common general-
purpose tag type in use. For more information on supported tags
seehttp://www.libnfc.org/documentation/hardware/tags/iso14443 or search for information on the common Mifare
tag family based on ISO1443A.
Can I set a delay calling readPassiveTargetID()?
Note: This question only applies to the I2C Library. The SPI library doesn't handle the timing the same way.
readPassiveTargetID() intentionally waits around in a blocking delay until a card enters the magnetic field. The
reason for this blocking delay is to ensure a well-understood command/response flow. Once the magnetic field is
activated and a read request is sent via readPassiveTargetID, you can keep sending new commands to the PN532,
but the moment a card or tag enters the field, the PN532 will send a response to the initial read request, even if it's
in the middle of some other response or activity. To avoid having to debug this in SW, a blocking delay was
implemented to keep the command/response pattern as clear as possible.
As a workaround to this blocking-delay limitation, setPassiveActivationRetries(maxRetries) was added to the latest
NFC libraries to allow you to set a specific timeout after read requests.
By default, the PN532 will wait forever for a card to enter the field. By specifying a fixed number of retries via
MxRtyPassiveActivation (see UM section 7.3.1 describing the RFConfiguration register, specifically CfgItem 5) the
PN532 will abort the read request after specified number of attempts, and you can safely send new commands
without worrying about mixing up response frames. To wait forever, set MxRtyPassiveActivation to 0xFF. To timeout
after a fixed number of retries, set MxRtyPassiveActivation to anything less than 0xFF.
Example Sketch:
#include <Wire.h>
#include <Adafruit_NFCShield_I2C.h>
#define IRQ (2)
#define RESET (3) // Not connected by default on the NFC Shield
Adafruit_NFCShield_I2C nfc(IRQ, RESET);
void setup(void) {
© Adafruit Industries https://learn.adafruit.com/adafruit-pn532-rfid-nfc Page 38 of 42










