Hello,
I want to use MSP430I2020 with external clock input. I have attached an 4Mhz oscillator, and i confirm it outputs the correct clock signal.
this is the code I used:
void main(void) { volatile unsigned int i; // Use volatile to prevent removal // by compiler optimization WDTCTL = WDTPW + WDTHOLD; // Stop WDT CSCTL0 |= DCOBYP; // External Oscillator 4Mhz CSCTL1 |= DIVS__16; // SMCLK = DCO/4 P1DIR |= BIT0 | BIT1; // P1.0, P1.1 Output P1SEL1 |= BIT0 | BIT1; // MCLK, SMCLK Pin Function P1SEL0 &= ~(BIT0 | BIT1); ....
Using an oscilloscope on pin P1.1, I get the clock signal with frequency 712Khz and taking into account that it is divided by 16, it results the frequency of 11.39MHz which is the frequency of internal oscillator (uncalibrated).
Please, tell me how to configure the clock system to use the external clock oscillator instead of the internal one.