GPIO Interrupt Handler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO Interrupt Handler

343 Views
kesanli_cinci
Contributor I

Hello, 

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. 

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.

 

How can I make read operation without clearing the interrupt flag? 

 

 

 

 

0 Kudos
Reply
1 Reply

320 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

could you please describe your intention in more details, maybe share piece of code you have?
Also what S32K1 device and RTD version is used in fact?
You should be able to read pin status/level at any time using Gpio_Dio_Ip_ReadPin function.
 
BR, Petr
0 Kudos
Reply