Please help me with this I am not able to proceed.
// Clock Setup
// -- Setup Clock to 16 MHz
__bic_SR_register(OSCOFF); // enable LFXT1 oscillator
BCSCTL1 |= XT2OFF + XTS; // LFXT1CLK is High Frequency
BCSCTL3 |= LFXT1S0 + LFXT1S1;// Digital external 0.4- to 16-MHz clock source
BCSCTL3 &= ~(XCAP0 + XCAP1);
do // wait for oscillator to stablise
{
IFG1 &= ~OFIFG; // clear flag
// do a delay of at least 50uS
Delay = 0xFF;
while (Delay > 0) Delay--;
}
while ((IFG1 & OFIFG) != 0);// repeat until flag remains cleared
BCSCTL2 |= SELM1 + SELM0; // MCLK Source Select 3: LFXTCLK
-
This is how the input clock looks like
-
The external clock if 16MHz that fed in from CDCLVC1102PWR
-
How I am ensuring that the system uses the external clock. Is by having to check the clock interrupt.
// -- Setup Timer_A - One MilliSecond Interrupt, use Output Unit 1 for ADC12
TACTL = TACLR; // Halt and clear the timer
TACCR1 = TACCR2 = 0; // Halt these counters
CCR0 = 2000; // 16MHz, interrupt 1msec = 1000/sec// SMCLK (Sub-main clock), /8, Count Up @ 1.5 MHz
TACTL = TASSEL1 + /* Timer A clock source select 1 */
ID0 + /* Timer A clock input divider 0 */
ID1 + /* Timer A clock input divider 1 */
MC0; /* Timer A mode control 0 */
CCTL0 = CCIE; // Enable interruptI expect it to give me the interrupt every ms.