Hi,
I am a beginner in MSP430. I was going through the workshop videos of traning, In Lab3 there is an example where we run cpu with VLO(12Khz) by disabling System clock generator 0 and System clock generator 1 while i was writing that i forgot clear OFIFG in IFG1 register then also program compiled but the led started blinking faster than expected . I haven't written any interrupt routine to handle oscillator fault.
#include <msp430g2553.h> /* Added because of inconsistency between * the header files of msp430g2231.h and * msp430g2553.h(i.e in msp430g2553.h assembly * header file names * of Timers are not renamed in c header file */ #ifndef TIMER0_A1_VECTOR #define TIMER0_A1_VECTOR TIMERA1_VECTOR #define TIMER0_A0_VECTOR TIMERA0_VECTOR #endif /* * main.c */ void main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR = BIT6+BIT0 ; //Configure P1.6 as output by writing 1 to corresponding pin P1OUT &= ~(BIT0+BIT6); //make output of that pin as zero BCSCTL3 |= LFXT1S_2; //Configure basic clock system+ to use VLO //I forgot add the following line in my program IFG1 &= ~OFIFG; //Disabling Oscillator interrupt pending flag _bis_SR_register(SCG0+SCG1); BCSCTL2 |= SELM_3 + DIVM_3; while(1) { P1OUT |= BIT6; // LED on _delay_cycles(100); P1OUT &= ~BIT6 ; // LED off _delay_cycles(5000); } }
Can some tell me the reason for fast blinking.