2022-10-03 04:22 AM
Hello,
We are trying to read NFC tags with our custom board which includes ST25R3920 and S32K116 Host MCU. Tags we are trying to read are most likely credit cards, ID cards etc. Only presence info would be enough for our use case. We do not need the tag information necessarily for our project.
I don't have prior knowledge in the NFC environment and just been working on it for couple of weeks now. I tried using ST25NFC Embedded Library's example project by modifying platform.h for our MCU but I was not succesful. I have been told that I should use this library because starting from stratch and trying to handle everything by myself would be a messy and a long way.
What I wanted to ask is that, are there any documents like application notes, user guides for software development to read an NFC tag with ST25R3920? Because all I could find were docs about Wake Up mode and datasheets.
Is it good practice to try using ST25NFC Embedded Library with an MCU that is not an STM? Do I have to merge the whole library with the SDK of MCU we are using when modifying platform.h? If so how can I accomplish this, is there an example that includes modified platform.h and library for another MCU's and platforms?
Sorry for the long questions. And thanks in advance!
Best regards,
Furkan
Solved! Go to Solution.
2022-10-03 12:27 PM
Hi,
yes this is a good practice to use the ST25NFC Embedded Library even with an non-MCU.
The first step is to setup the SPI communication and the GPIO management of the SPI CS. To check your SPI communication, just try to read the 3Fh IC identity register. Once your SPI communication is OK (the return value is the correct IC Identity register value), integrate it with the platform.h macros. Note that rxBuf or txBuf can be NULL, in that case, you will have to map to a SPI transmit or a SPI receive rather than a SPI transmit/receive.
Add the support of the remaining macros (platformDelay, platformProtectST25RComm, etc.) Add the support of the ST25R3916 interrupt. Enable the ST25R_SELFTEST and ST25R_SELFTEST_TIMER defines and check the return code of st25r3916Initialize(). The return code different from ERR_NONE will guide you to fix porting issues. I would recommend as well to connect a logic analyzer on the SPI (CLK/MOSI/MISO/CS) +ST25R3920 IRQ
Useful documentation: UM2890 RF/NFC abstraction layer (RFAL)
Rgds
BT
2022-10-03 12:27 PM
Hi,
yes this is a good practice to use the ST25NFC Embedded Library even with an non-MCU.
The first step is to setup the SPI communication and the GPIO management of the SPI CS. To check your SPI communication, just try to read the 3Fh IC identity register. Once your SPI communication is OK (the return value is the correct IC Identity register value), integrate it with the platform.h macros. Note that rxBuf or txBuf can be NULL, in that case, you will have to map to a SPI transmit or a SPI receive rather than a SPI transmit/receive.
Add the support of the remaining macros (platformDelay, platformProtectST25RComm, etc.) Add the support of the ST25R3916 interrupt. Enable the ST25R_SELFTEST and ST25R_SELFTEST_TIMER defines and check the return code of st25r3916Initialize(). The return code different from ERR_NONE will guide you to fix porting issues. I would recommend as well to connect a logic analyzer on the SPI (CLK/MOSI/MISO/CS) +ST25R3920 IRQ
Useful documentation: UM2890 RF/NFC abstraction layer (RFAL)
Rgds
BT
2022-10-03 10:59 PM
Hi Brian,
Thank you for your answer! I will follow the steps and try to do the implementation correctly.
Best regards,
Furkan