AnsweredAssumed Answered

clearing interrupt status flag is not working

Question asked by DANIELE BRUNO on Nov 8, 2019
Latest reply on Nov 12, 2019 by Kerry Zhou

Hello,

I'm using the KL26 microcontroller in one of our boards.

I have a problem about clearing pending flags / disabling / enabling interrupts.

I have configured one input on PORTC in order to generate an interrupt on its falling edge but there is a function that must not be interrupted by the signal above-mentioned:

void My_Function(void)
{

DisableIRQ(BOARD_DATA_IN_IRQ);

/*******************************/

Instructions executed by the function.....

/*******************************/

 

GPIO_PortClearInterruptFlags(BOARD_DATA_IN_GPIO, 1U << BOARD_DATA_IN_PIN);

 

EnableIRQ(BOARD_DATA_IN_IRQ);
}

The system doesn't work because as the pulse arrives, the function is interrupted.

There is something wrong in the sequence that I have written ?

Thank you for all the attention,

Best Regards

Daniele

Outcomes