Hardware:
- MKE14F16
Software:
MCUXpresso IDE 10.1.1
I made a simple program when there is an interrupt on pin 7 from port A clear the interrupt pin.
But the function "GPIO_PortClearInterruptFlags(GPIOA, 1U << 7U);" doesn't clear the flag...
Bit eight stays high.
void IRQ_HANDLER_PORT_A(void)
{
uint32_t Interrupt_Flags_A = GPIO_PortGetInterruptFlags(GPIOA);
if((Interrupt_Flags_A >> 7u) & 1)
{
GPIO_PortClearInterruptFlags(GPIOA, 1u << 7);
Interrupt_Flags_A = GPIO_PortGetInterruptFlags(GPIOA);
DisableIRQ(PORTA_IRQn);
}
Hi Rudy Coppens
Could you clarify how you set your interruption in the GPIO module? Will it detect a falling edge? also, are you able to see that you get into the interrupt handler?
I use the code that you post and I can see that the interrupt flag is correctly cleared.
Best regards
Jorge Alcala
Thanks for your reaction!
Yes I get into the interrupt handler. I putted there a break point and step through the code.
That's why I did two times the reading of the flags. First, is the flag high than a clear on the interrupt flag and a reading again.
It is always high... Maybe it takes some more time to clear the flag?