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/MSP430FR2111: What is the optimum way to ignore certain number of external interrupts?

Part Number: MSP430FR2111

Tool/software: Code Composer Studio

Hi all,

I am curious if there is a clever way to ignore 2,3 or 4 interrupts without waking up the MCP430?.

The only way can think of is a variable and then incrementing every wake up event, and if the variable i>3 then blink LED etc. and then reset i to 0, again.

Is there inbuilt feature where I can set that number and reduce wake-ups?

#include <msp430.h>

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;
    P1DIR = 0xFF;
    P1OUT = 0x00;
    P2DIR = 0xFF;
    P2OUT = 0x00;

    P1OUT &= ~BIT0;
    P1DIR |= BIT0;

    P1OUT |= BIT3;
    P1REN |= BIT3;
    P1IES |= BIT3;
    P1IE |= BIT3;

    PM5CTL0 &= ~LOCKLPM5;
    P1IFG &= ~BIT3;
    
    while(1)
    {
        __bis_SR_register(LPM4_bits | GIE);
            P1OUT |= BIT0;                   
            __delay_cycles(15000);            
            P1OUT &= ~BIT0;
    }
}

#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
    P1IFG &= ~BIT3;
    P1DIR &= ~BIT3;
    __bic_SR_register_on_exit(LPM4_bits);

}

**Attention** This is a public forum