I had set MSP430F5418 P2.5 for high to low transition. But I am getting interrupts for both low-to-high and high-to-low transitions. Please my code snippet below.
P2OUT |= BIT5 /* Enable P2.5 internal resistances */ P2REN |= BIT5 /* Set up P2.5 as pull-Up resistances */ P2IES |= BIT5; P2IE |= BIT5; P2IFG &= ~BIT5; /* P2.5 IFG cleared */ #pragma vector=PORT2_VECTOR __interrupt void port2_interrupt (void) { switch (P2IV) { case 0x0CU: { /* Do something here */ P2IFG &= ~BIT5; break; } default: { /* No Action */ break; } } }