AnsweredAssumed Answered

GPIO ISR and Clearing ISR

Question asked by Keith Smith on Apr 21, 2020
Latest reply on Jun 16, 2020 by Mark Butcher

I am working with the iMX RT1064 eval kit.

 

I have coded the interrupt handler for GPIO1_Combined_16_31_IRQHandler(). I have several external inputs on this group of GPIO bits. The inputs are on external pull ups. All inputs are set for interrupt on falling edge.

 

After the interrupt fires, in the handler, I call GPIO_PortGetInterruptFlags(). I see many bits asserted, not just the individual bit that caused the interrupt. Some bits are set that I don't have a circuit for. (possible the eval kit has pull ups for these bits).

 

I have also read the GPIO1 ISR after calling the appropriate Board_xxxx() at main(). I see the same set of ISR bits asserted.

 

I have also called GPIO_PortClearInterruptFlags(0xffffffff) to attempt to clear the ISR bits. None of the bits are cleared.

 

I have run the GPIO interrupt SDK example. It assigns 1 interrupt to GPIO5 bit 0, a push button. When the interrupt fires, I read the GPIO5 ISR. All the ISR bits are set. Calling GPIO_PortClearInterruptFlags() does clear bit 0 of the ISR.

 

My questions are: Any reason why the ISR bits are not cleared by calling GPIO_PortClearInterruptFlags()?

 

How do I determine which interrupt has occurred if multiple ISR bits are always set?

Outcomes