Skip to main content
Visitor II
June 24, 2021
Solved

Basic code only for ST25R3916

  • June 24, 2021
  • 1 reply
  • 2954 views

I am currently using a st25r3916 chip in my application (embedded) and downloaded the  ST25 Embedded NFC library (STSW-ST25R-LIB).

All I want at this point is a proof of concept that the st25r3916 chip sends an interrupt to my application each time a rfid tag is detected. I don't need to read the tag id yet at this point. From the library, the closest example is demo_polling.c but is code-heavy.

I would like to ask is the quickest and simplest way to get this working is:

1) Call rfalNfcInitialize() and rfalWakeUpModeStart(NULL)? Is there anything else needed for initialization?

2) Is interrupt already enabled after #1 (above) is performed?

3) Does that mean that if I place a rfid-enable tag near the chip, I will receive an interrupt?

4) After the interrupt, do I just call one of the rfal function (which one in particular?) to read the ID from the tag?

Thank you all

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    Hi JLee.47,

    please see https://community.st.com/s/question/0D53W00000tsenwSAA/st25r3911b-simple-code where Brian already detailed that ST25R3916 is not an NFC Controller but a frontend.

    ad 1) Yes and no. The wake-up mode will not detect RFID tags but just sense detunings on the antenna. They could be caused by metal, RFID tag, substantial temperature change, etc.

    ad 2) For 3916 the default option (when using Varicaps/AAT) is to use software based wake-up. MCU needs to keep running and peform measurements regularly. However if you remove varicaps and disable AAT you can also run hardware based wake-up. (see chapter 6 of AN5320)

    ad 3) Not necessarily an RFID tag. Could also be something else or nothing.

    ad 4) There is not one function to be called but potentially many different technologies. So what you describe is built into a state machine inside rfal_nfc.c, starting at state RFAL_NFC_STATE_POLL_TECHDETECT.

    Best Regards, Ulysses

    1 reply

    Technical Moderator
    June 24, 2021

    Hi JLee.47,

    please see https://community.st.com/s/question/0D53W00000tsenwSAA/st25r3911b-simple-code where Brian already detailed that ST25R3916 is not an NFC Controller but a frontend.

    ad 1) Yes and no. The wake-up mode will not detect RFID tags but just sense detunings on the antenna. They could be caused by metal, RFID tag, substantial temperature change, etc.

    ad 2) For 3916 the default option (when using Varicaps/AAT) is to use software based wake-up. MCU needs to keep running and peform measurements regularly. However if you remove varicaps and disable AAT you can also run hardware based wake-up. (see chapter 6 of AN5320)

    ad 3) Not necessarily an RFID tag. Could also be something else or nothing.

    ad 4) There is not one function to be called but potentially many different technologies. So what you describe is built into a state machine inside rfal_nfc.c, starting at state RFAL_NFC_STATE_POLL_TECHDETECT.

    Best Regards, Ulysses