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.

MSP430FR2311: Port pin Transition Detection Issue

Part Number: MSP430FR2311

I am detecting on 5th BIT of the Port2. when I apply to 3.3v at BIT5 it show me in the Reading Variable (low = 0 and high = 1).

But the program did not enter in the interrupt service routine.

I have written right ISR for Port2 or not ?

Please suggest how can I resolve ?

#include <msp430.h>
int Reading;
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
// Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
PM5CTL0 &= ~LOCKLPM5;


P2DIR &= ~BIT5;
P2REN &= ~BIT5;
P2IES &= ~BIT5; // P1.5 Lo/High edge
P2IE |= BIT5;

//P2IFG &= ~BIT5;
__bis_SR_register(GIE);

while(1)
{
Reading = (P2IN & BIT5);

}

}

// Port 2 interrupt service routine
#pragma vector=PORT2_VECTOR
__interrupt void Port_2(void)

{
P1OUT |= BIT0;
P2IFG &= ~BIT5; // Clear P1.3 IFG
__bic_SR_register_on_exit(LPM3_bits); // Exit LPM3
}

**Attention** This is a public forum