I’ve recently been messing around with the STM32 - BlackPill microcontroller, and found that the pinout exactly matches that of the PN532 NFC module. Allowing them to be soldered directly toegether into a small form factor rfid scanner (with USB type-C!).
I first soldered header pins to the NFC module, then pried off the plastic spacer.
Next I put down a strip of Kapton tape to insulate the two boards.
Lastly, I placed the STM32 hard up against the NFC module and soldered it into place, before trimming the excess length off of the header pins.
The code is based on this library by elechouse.
Using the example code as a starting point, the protocol is set to I2C.
Then the following two lines are added to the beginning of
And thats it!
The code is flashed to the STM32 and voilà!