Tool/software: Code Composer Studio
I am finding difficulty with LED blinking code with LED toggling in Timer interval.
Please let me know the issues and the changes required
//Header Files//
#include "msp430fr2355.h"
#include "stdint.h"
#define CALTDH0CTL1_256 *((unsigned int *)0x1A36)
void Init_Clocks (void);
void init_IO (void);
void init_WDT (void);
void init_TimerB (void);
void main (void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
 _delay_cycles(1000000);
 Init_Clocks (); // Initialize clocks for 25 MHz
 init_TimerB ();
init_WDT ();
 init_IO ();
 
 PM5CTL0 &= ~LOCKLPM5; // Engage GPIOs
 __enable_interrupt(); // Set GIE
 _delay_cycles(1000000);
while(1)
 {
 ; //
 }
}
//end main
//WDT to restart ADC
void init_WDT (void)
{
WDTCTL = WDT_MDLY_32; // WDT 32ms from 1MHz, SMCLK, interval timer
 SFRIE1 |= WDTIE; // Enable WDT interrupt
}
void init_TimerB (void)
 {
TB3CTL = TBSSEL__SMCLK | MC_3 | TBCLR; // SMCLK, up_down mode, clear TBR
 TB3CCR0 = 3276;
 TB3CCR1 = 1676;
 TB3CCTL0 |= CCIE;
__bis_SR_register(GIE); // enable interrupts
 __no_operation(); // For debugger
_EINT(); // Enable interrupts
}
// Clocks And Vcore
void Init_Clocks (void)
{
FRCTL0 = FRCTLPW | NWAITS_2;
__bis_SR_register(SCG0); // disable FLL
 CSCTL3 |= SELREF__REFOCLK; // Set REFO as FLL reference source
 CSCTL0 = 0; // clear DCO and MOD registers
 CSCTL1 |= DCORSEL_7; // Set DCO = 24MHz
 CSCTL2 = FLLD_0 + 731; // DCOCLKDIV = 24MHz
 __delay_cycles(3);
 __bic_SR_register(SCG0); // enable FLL
 while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // FLL locked
CSCTL4 = SELMS__DCOCLKDIV | SELA__REFOCLK; // set default REFO(~32768Hz) as ACLK source, ACLK = 32768Hz
 // default DCOCLKDIV as MCLK and SMCLK source
}
//IO INITIALISATION//
void init_IO (void)
 {
//Indications
 P2SEL0 &= ~ (BIT6); //GPIO-LED3
 P2DIR |= (BIT6); //Output-LED3
__bis_SR_register(GIE);
}
/**************************************TIMERD0.1 INTERRUPT********************************************/
// Timer B1 interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = TIMER3_B0_VECTOR
__interrupt void Timer3_B0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(TIMER3_B0_VECTOR))) Timer3_B0_ISR (void)
#else
#error Compiler not supported!
#endif
{
P2OUT |= ~(BIT6);
 TB3CCTL1 &= ~CCIFG;
}
 
				 
		 
					 
                           
				