This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5962: Clear GPIO interrupt problem

Part Number: MSP430FR5962

Hi Forum

I have a problem clearing the GPIO interrupt. I have enabled PORT3 pin 3 interrupt.

P3DIR &= ~( BIT3 );
P3OUT |= BIT3;
P3REN = BIT3; /* Select pull-up mode for interrupt input */
P3IES = BIT3; /* Hi/Lo edge */
P3IFG = 0U; /* Clear all P3 interrupt flags ? */
P3IE = BIT3; /* Interrupt enabled */

When I enable the interrupt and global interrupts, the interrupt vector is immediately entered. This is OK, properly happened when in set the edge detect to falling edge. (even though the pin is high).

Now the first thing I do in the interrupt is to clear all pending interrupts (P3IFG = 0).

I would have thought this would clear P3IFG, which has a value of 0x08 (as I would expect, due to entering the interrupt).

But P3IFG is not cleared, it is still 0x08 afterwards. Even if I clear the register through the debugger (writing 0 to the register), bit 3 does not clear. I have tried reading P3IV, but this does not change it. 

Are there any other details I need to be aware of? The pin should be stable, as I have only an external pull up on this pin.

**Attention** This is a public forum