I am trying to use a 16 MHz external clock on PIN 2 for the MSP430F2370 micro. Here is my init code:
// Set the 16 MHz oscillator as the input clock on XIN
BCSCTL1 &= ~(XT2OFF); // XT2 OSCILLATOR - clear the bit
BCSCTL1 |= XTS; // LFXT1 - High frequency mode
BCSCTL2 |= SELM_3 + SELS; // MCLK = LFXT1CLK, SCLK = LFXT1CLK,
BCSCTL3 = LFXT1S_3 + XCAP_0; // XT1 11 Digital external clock source on PIN 2
// SET PIN 8 AS SMCLK OUTPUT - P1.4
P1SEL |= 0x10; // SET primary peripheral function SMCK
P1DIR |= 0x10; // P1.4 output
I single step through the above code and I can see the BCSCTLx registers are set up according to the code above but I cannot see SMCLK on P1.4. I can see the 16 MHz clock on pin 2 as the input for XIN.
I am suspicious of MCLK running as well. I am using SPI to send some data and the SPI clock is missing. SPI is configured as master.
I am using CCSv5.
Can somebody help me figure out what is going on?