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.

MSP430F5659: Interrupt Detect On both Edge

Part Number: MSP430F5659
Other Parts Discussed in Thread: MSP430F5529

Hi all,

I am connected a switch (on/off switch) with a custom board board of MSP430F5659. The interrupt configured for this is in HIGH_TO_LOW transition,

But interrupt takes place int both edges. The scenario is like when the switch is on one interrupt generated, when the switch turned  off there also a interrupt generated.

What may be the reason for that, Kindly Help

Attaching my code

int main(void)
{

//clock() 8MHz

    GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P4,GPIO_PIN4);
    GPIO_enableInterrupt(GPIO_PORT_P4,GPIO_PIN4);
    GPIO_selectInterruptEdge(GPIO_PORT_P4,GPIO_PIN4,GPIO_HIGH_TO_LOW_TRANSITION);
    GPIO_clearInterrupt(GPIO_PORT_P4,GPIO_PIN4);

while(1)

{

}

}

#pragma vector=PORT4_VECTOR
__interrupt void Port_4(void)
{

        case P4IV_P4IFG4:                                      
            if (P4IES & BIT4)
            {
              //interrupt generated
                GPIO_clearInterrupt(GPIO_PORT_P4,GPIO_PIN4);
            }
            break;

}

Regards,

Renjith

**Attention** This is a public forum