2025-04-18 2:08 AM
Solved! Go to Solution.
2025-04-18 5:21 AM - edited 2025-04-18 5:24 AM
Hi,
RFAL_ERR_BUSY means Operation ongoing. rfalGetFeliCaPollStatus returns RFAL_ERR_BUSY until the FeliCaPoll is completed. Once completed an RFAL_ERR_NONE is returned by rfalGetFeliCaPollStatus in case of success . Otherwise a ReturnCode such as RFAL_ERR_TIMEOUT is returned to indicate an error.
See UM2890 - RF/NFC abstraction layer (RFAL) - User manual for further informations.
Rgds
BT
2025-04-18 2:40 AM
Hi,
can you share some detail on how the ST25R3917 IRQ pin is managed by the PC application?
Thanks
Rgds
BT
2025-04-18 2:50 AM
Hi,
As you correctly assumed, the PC application is not able to handle interrupts directly.
Therefore, I am calling the st25r3916Isr function from within the st25r3916WaitForInterruptsTimed function.
do
{
st25r3916Isr();
status = (st25r2916interrupt.status & mask);
} while( ( (!platformTimerIsExpired( tmrDelay )) || (tmo == 0U)) && (status == 0U) );
best regards.
2025-04-18 4:59 AM
Hi,
this will solve the interrupt handling within the st25r3916WaitForInterruptsTimed but not the overall interrupt handling.
Can you share some details about your USB to I2C bridge? Is it for example an Aardvark I2C/SPI Host Adapter? In such a case the bridge also provides GPIO capabilities and API to manage those GPIO. Then a dedicated thread in the application can wait for a change on the GPIO lines.
If your I2C bridge does not provide GPIO capabilities, you can change st25r3916GetInterrupt() to run st25r3916Isr() in addition to your changes in st25r3916WaitForInterruptsTimed(). See https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/stsw-st25r-lib-using-spi-while-in-irq-context/td-p/728328 for a similar question.
Rgds
BT
2025-04-18 5:11 AM
Hi,
Thank you for your response.
As you suggested, I added a call to st25r3916Isr() inside the st25r3916GetInterrupt() .
After that change, the function rfalGetFeliCaPollStatus() returns RFAL_ERR_BUSY at the line RFAL_EXIT_ON_BUSY( ret, rfalGetTransceiveStatus() );.
Do you have any idea what might be causing this?
Best regards.
2025-04-18 5:21 AM - edited 2025-04-18 5:24 AM
Hi,
RFAL_ERR_BUSY means Operation ongoing. rfalGetFeliCaPollStatus returns RFAL_ERR_BUSY until the FeliCaPoll is completed. Once completed an RFAL_ERR_NONE is returned by rfalGetFeliCaPollStatus in case of success . Otherwise a ReturnCode such as RFAL_ERR_TIMEOUT is returned to indicate an error.
See UM2890 - RF/NFC abstraction layer (RFAL) - User manual for further informations.
Rgds
BT