It can be useful to know when the PN532 is transmitting or receiving. For better oscilloscope sync. or to debug timings in applications. For this, you can try to use the CIU_AnalogTest with its AUX1 and AUX2 output.

CIU_AnalogTest register (address 6328h)

See PN532/C1 § 8.6.23.53

It includes 2 symbols to control the pins AUX1 and AUX2:

  • AnalogSelAux1[3:0] for the AUX1 output
  • AnalogSelAux2[3:0] for the AUX2 output

Register configuration

By pushing 0b11001101 in the PN53X_REG_CIU_AnalogTest register, we have:

  • 0b1100 in AnalogSelAux1[3:0], TxActive on AUX1
  • 0b1101 in AnalogSelAux2[3:0], RxActive on AUX2

Code with kpn532 library:

pNFC->WriteRegister(PN53X_REG_CIU_AnalogTest, 0b11001101);

Capture

In this example we:

  • Send InCommunicateThru command with 0x06 0x00 data (ST25TB - Initiate)

  • Wait interrupt, then Read ACK

  • NFC exchange is done now

    • AUX1 is high when transmitting
    • AUX2 is high when receiving

    This is confirmed with an oscilloscope capture

  • Wait interrupt, then Read InCommunicateThru response with 0x00 0x89 data (status code: 0x00, ST25TB - chipid: 0x89)

Timings

The NFC exchange is ~1.4 ms (P0), but the whole communication part is ~3.3 ms (P1).

References

NXP PN532

Library & Analyzer