PN532 on SPI not working

Post here first, or if you can't find a relevant section!
Post Reply
geologic
Posts: 13
Joined: Thu Dec 15, 2022 10:12 am
Answers: 1

PN532 on SPI not working

Post by geologic »

Hi all

I have a RFID PN532 module with SPI and i tested it with arduino using Adafruit_PN532 library, it works ok. I'm using these pins:

Code: Select all

#define PN532_SCK  13                                                   
#define PN532_MOSI 11                                                   
#define PN532_SS 16                                                     
#define PN532_MISO 12                                                   
Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
Next i test it with Nucleo 64 with these pins:

Code: Select all

#define PN532_SCK PA5                                                   
#define PN532_MOSI PA7                                                   
#define PN532_SS PA4                                                     
#define PN532_MISO PA6                                                   
Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
but the module is not recognized. I'm using the iso14443a_uid.pde example and it fails on this point:

Code: Select all

  nfc.begin();
  uint32_t versiondata = nfc.getFirmwareVersion();
  if (! versiondata) {
    Serial.print("Didn't find PN53x board");
    while (1); // halt
  }
I double checked the connections and tried a second module with the same behavior, a working SPI module in arduino is not recognized on STM32.

Any idea?
Post Reply

Return to “General discussion”