2023-07-18 03:56 AM - edited 2023-07-18 03:59 AM
Hello!
I'm using ST25R95 with X-CUBE-NFC3 library for an application.
I have successfully tried the default PollingTagDetect example. But now, our application requires the usage of interrupt mode for card detection instead of looping NFC_Cycle(); in infinite loop.
Application is to just read the UID of the card.
@Brian TIDAL @Brian TIDAL1
Any help will be appreciated.
Regards,
Keshav Aggarwal
Solved! Go to Solution.
2023-07-19 01:05 AM - edited 2023-07-20 07:22 AM
Hi,
Regarding the wake up configuration, I would suggest to use the default configuration (discParam.wakeupConfigDefault = true).
Regarding the NFC_Cycle: you need to loop on NFC_Cyle except when the wake up mode is entered (if you use a sequencer, you can run NFC_Cyle every millisecond and do other tasks meanwhile). When entering the wake up mode, you just need to enable the interrupt.
Rgds
BT
2023-07-18 05:18 AM - edited 2023-07-18 05:26 AM
Hi,
"Application is to just read the UID of the card." Which tag technology is being used? NFC-A/B/F or V?
"But now, our application requires the usage of interrupt mode for card detection instead of looping NFC_Cycle(); in infinite loop." Is your concern linked to low power mode i.e. you want to have the MCU being in sleep mode and be waken up by a interrupt?
Rgds
BT
2023-07-18 06:11 AM - edited 2023-07-18 06:11 AM
Thanks for replying.
"Which tag technology is being used? NFC-A/B/F or V?"
NFC-A
"Is your concern linked to low power mode i.e. you want to have the MCU being in sleep mode and be waken up by a interrupt?"
Our main concern is to offload CPU to perform other tasks in idle mode without affecting the NFC performance.
BR,
Keshav Aggarwal
2023-07-18 07:40 AM
Hi,
I would suggest to enable the wake up mode of the ST25R95 (set discParam.wakeupEnabled to true in demoIni). The ST25R95 device will enter into tag detection mode. Once a tag is entering into the operating field, the IRQ_OUT will be raised. Once this IRQ_OUT is raised, you just need to restart looping the demoCycle loop to read the UID until the tag is removed from the operating field and device returns to wake up mode (see RFAL_NFC_STATE_WAKEUP_MODE in demoNotif). Make sure to configure the ST25R95_N_IRQ_OUT_PIN in EXTI interrupt mode and to enable the interrupt while being in wake up mode.
Rgds
BT
2023-07-19 12:29 AM
2023-07-19 01:05 AM - edited 2023-07-20 07:22 AM
Hi,
Regarding the wake up configuration, I would suggest to use the default configuration (discParam.wakeupConfigDefault = true).
Regarding the NFC_Cycle: you need to loop on NFC_Cyle except when the wake up mode is entered (if you use a sequencer, you can run NFC_Cyle every millisecond and do other tasks meanwhile). When entering the wake up mode, you just need to enable the interrupt.
Rgds
BT