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.

MSP432P401R Capture Compare mode PWM Generation

I am trying a very simple code to generate a PWM  using the CCR1 and CCR2 with MSP432.. Here is my code 

#include "msp.h"

int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
CSKEY = 0x695A; // unlock CS registers
CSCTL0 = 0; // reset DCO settings
CSCTL0 = DCORSEL_0;
CSCTL1 = SELA__REFOCLK | SELS__DCOCLK | SELM__DCOCLK;
CSKEY = 0; // lock CS registers
P1DIR |= BIT0;
P1OUT=0x00;
P2DIR |=BIT0;
P2OUT=0x00;


TA0CCTL1 = CCIE; // TACCR0 interrupt enabled
TA0CCR1 =5000;
TA0CCTL2 = CCIE;
TA0CCR2 =60000;
TA0CTL = TASSEL_2 | MC_2;

SCB_SCR |= SCB_SCR_SLEEPONEXIT; // Enable sleep on exit from ISR

__enable_interrupt();
NVIC_ISER0 = 1 << ((INT_TA0_0 - 16) & 31);


}

// Timer A0 interrupt service routine

void TimerA0_0IsrHandler(void) //CCR0
{

switch( TA0IV )
{
case 2: // CCR1
{

P1OUT =0x01;
}


case 4:
{
P1OUT =0x00;
}


case 10: break;

}
}

I wish the LED to be in ON condition between the instance when the timer value is between 5000 and 60000. I am unable to get and the code is getting exit unconditionally.

**Attention** This is a public forum