NFC with SD module error

Both the SD library and the PN532 library want to use SPI. The PN532 uses the old way of configuring SPI without the beginTransaction() settings stuff. I reckon, the original settings that the PN532 configures are getting changed by the use of the SD library and so the PN532 stuff fails.

Try adding a nfc.begin() in the loop() before the read card line:

void loop(void) {
 uint32_t id;
  nfc.begin();
  // look for MiFare type cards
  id = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A);