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.

CCS/MSP430FR5994: Failing to detect interrupts

Part Number: MSP430FR5994

Tool/software: Code Composer Studio

Hi, I am using the example code provided in the FRAM utilities example and here is a simple example where the device will wake up when an interrupt occurs. 

It works fine when the board is connected to the computer but when i disconnect it and tries to achieve the same thing it fails. It never seems to detect the interrupt to wake up when i disconnect the board

int main(void)
{
    /* Halt the watchdog timer */
    WDTCTL = WDTPW | WDTHOLD;

    /* Initialize GPIO and clocks */
    initGpio();
    initClocks();

    /*
     * Turn on P1.1 (LED2) while in LPM4.5 with restore on reset disabled. The
     * device will wakeup when the P5.6 interrupt is triggered.
     */
    P1OUT |= BIT1;
    ctpl_enterLpm45(CTPL_DISABLE_RESTORE_ON_RESET);
    P1OUT &= ~BIT1;

    /* Now blink the LED in an endless loop. */
    while (1) {
        P1OUT ^= BIT0;
        __delay_cycles(100000);
    }
}

void initGpio(void)
{
    /* Configure GPIO to default state */
    P1OUT  = 0; P1DIR  = 0xFF;
    P2OUT  = 0; P2DIR  = 0xFF;
    P3OUT  = 0; P3DIR  = 0xFF;
    P4OUT  = 0; P4DIR  = 0xFF;
    P5OUT  = 0; P5DIR  = 0xFF;
    P6OUT  = 0; P6DIR  = 0xFF;
    P7OUT  = 0; P7DIR  = 0xFF;
    P8OUT  = 0; P8DIR  = 0xFF;
    PJOUT  = 0; PJDIR  = 0xFFFF;

    /* Configure P5.6 for hi/lo transition interrupt. */
    P5OUT |= BIT6;
    P5REN |= BIT6;
    P5DIR = 0xFF ^ BIT6;
    P5IES |= BIT6;
    P5IE |= BIT6;

    /* Disable the GPIO power-on default high-impedance mode. */
    PM5CTL0 &= ~LOCKLPM5;

    /* Clear pending interrupts. */
    P5IFG = 0;
}

**Attention** This is a public forum