This repository contains the driver software for NXP PN532 NFC controller on TI TM4C123GXL MCU and some example projects based on the driver software.
Other variations of PN532 boards are not tested for now (since I dont have them) but they should work, if wired correctly.
- SSI/SPI: All SSI ports supported.
- I2C: In development.
- UART/HSU: In development.
I include Keil uVision project file (the uvproj file in each project folder) so that if you are using ARM Keil uVision with your TM4C123G, you can just double click on the uVision project file and load to your MCU.
Please refer to my zEEware repo for intallation guide for running TM4C123GXL projects via GCC.
If you are not using methods above, you will need to organize all the source files by yourself.
Driver APIs please refer to PN532.h. There are only 2 low level R/W APIs, writeCommand and readResponse. Regardless what protocol you are using, the APIs called by PN532.c are the same. This is achived by the preprocessor setting in PN532_Setting.h. These setting not only enables users to turn on only the certain comunication protocol (SSI, I2C and HSU), but also prevents from including the code for unused protocols (when SSI is used, only SSI code is included). This approach significantly reduces code size loaded into the precious ROM space on TM4C123GXL and allows reusable R/W APIs across all protocols.
Detect an ISO14443A card and send its UID to serial output (UART via USB).
Detect an ISO14443A card and output its UID to an ST7735 LCD.
Format a Mifare Classic card from default format to NDEF format with customized content.
Update the content in a NDEF formatted Mifare Classic card.
Format a NDEF formatted Mifare Classic card to its default format.
Dump all memory content of a Mifare Classic card.
Emulate PN532 as a NDEF card.
The initiator of a peer to peer color (displayed on ST7735) exchange between 2 PN532.
The Target of a peer to peer color (displayed on ST7735) exchange project 2 PN532.
If you find any bug or problem, please create new issue or a pull request with a fix in the repository. Or you can simply email me about the problem or bug at zeelivermorium@gmail.com . Much Appreciated!
This repository adpated and modified some source code from Seeed Studio's PN532 Arduino driver and some peer to peer example source code from Elechouse. Some addtional files necessary for TM4C123GXL to run from ValvanoWareTM4C123, by Dr. Jonathan Valvano, are also included.