AnsweredAssumed Answered

GPIO_PortClearInterruptFlags not working

Question asked by Rudy Coppens on Sep 10, 2018
Latest reply on Sep 14, 2018 by Rudy Coppens

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);

}

Outcomes