2024-12-03 01:37 PM
Hi,
I am using /ST25NFC_Embedded_Lib_ST25R3916(B)_1.7.0/Projects/STM32L476RG-Nucleo/Applications/Common/Src/demo_edta.c.
It works as intended, but I am sharing the SPI with another interrupt-based peripheral. I want to start the discovery and process it for a few seconds at a time. Can you give me pointers on the best way to do it?
2024-12-03 11:38 PM
Hi,
options of what you can do (also possible to combine):
Sometimes the SPI drivers (Linux, etc.) guarantee atomicity and even handle the chip select. Then option 1. might be the only thing you need.
Regards, Ulysses
2024-12-05 09:31 AM
I have both ST25R_COM_SINGLETXRX and Mutex protection on SPI, but sometimes unable to service the interrupt in time with other peripherals actively using the SPI.
I am hoping to have application-level coordination as my other peripheral is supposed to give way for NFC.
My application at high level:
Can you point me to an example of stopping and starting the discovery scans for a specified time?
2024-12-06 03:58 AM
Hi,
I think I would use in such case the rfalNfcGetState() + notification callback to pause and resume the NFC layer at certain states. I.e. check for RFAL_NFC_STATE_LISTEN_TECHDETECT and then stop calling its worker and perform other jobs. When done resume calling it - assuming the timers have already expired. Maybe you need to play with totalDuration parameter.
Ulysses