Electronic – PN532 not responding using SPI when issuing antenna-related command

mbednfcspi

I've bought a PN532 v1.3 breakout board, to which I communicate in SPI.

I can ask it its firmware number, to which it answers D5 03 32 01 06 07 (PN532 V1.6), which is correct.
It can ask it general status, to which it answers D5 05 00 00 00 80, which sounds correct too.

But when I'm trying to use a antenna-related command, it justs freeze here.

For instance, InListPassiveTarget (4A) or InAutoPoll (60) just freeze, meaning the command cannot even be sent correctly.

What I am doing exactly:

  • Writing command on the SPI bus
  • Waiting for READY status on SPI
  • Getting an ACK frame (00 00 FF 00 FF 00)
  • Waiting for READY status again. This is where it fails when issing a 4A or 60 command. The status never become ready.

Here is the user manual for the chip I'm using: http://www.nxp.com/documents/user_manual/141520.pdf

I don't understand what am I exaply doing wrong.

Best Answer

In my code that communicates with the PN5321A, the inListPassiveTarget function has a time-out in case there is no NFC tag present. I set up an IRQ when I call inAutoPoll and do not wait for any more response after the ACK frame. Are you certain that your hardware is working correctly? The operation you describe is normal for no tag present.

I observed the RF output of my antenna on my oscilloscope with a 15cm loop of wire clipped to the tip of my scope probe and connected to the GND of my scope probe. I put the loop around my NFC antenna and NFC tag (all flat on my desk). I could see the load modulation of the response from my NFC tag when the RF level rises slightly. The bits where the RF signal disappears is when the host is communicating with the target.