Interrupt issue at freertos
Hello,
We are using ST25R3920B as NFC reader for our project. The communication is through SPI between mcu and NFC reader.
I configured a GPIO as an interrupt and wrote a callback function for this GPIO.
At the end of the callback function, interrupt flag is cleared. Inside this callback function, a task is notified. Before jumping to the task, interrupt flag is cleared at the the end of the callback function.
The task I notified will call the "st25r3916CheckForReceivedInterrupts" function.
However, I use this GPIO's status (HIGH, LOW) in order to read some registers in the task. Because I clear interrupt, I am not able to read this pin as HIGH. Operating system is FreeRTOS. That's why, I can not put this read operation inside Callback function because I use SPI_send function in this read operation.
Problematic part where the GPIO's status is read inside "st25r3916CheckForReceivedInterrupts" function by reading "platformGpioIsHigh".
If interrupt flag is not cleared, the system will be stuck in the interrupt. If I clear the flag , I can never read the GPIO's status as high at the notified task.
I made the implementation based on this documents refering to the freertos part.
There is no issue when we implemented the driver at baremetal system. So we tought that we might miss something related to freertos part.
https://www.st.com/en/embedded-software/stsw-st25r-lib.html#documentation
How can I make read operation without clearing the interrupt flag? Which part should I investigate to resolve this issue?
ST25R3920B
