Other Parts Discussed in Thread: MSP430F4152
Hi,
I am working on MSP430F4152 controller and need to get 8MHz MCLK frequency from DCO.
Configuration is like this:
SCFI0 = 0x01 ;
SCFI0 &= ~FN_8;
SCFI0 |= FN_4;
FLL_CTL0 |= DCOPLUS;
FLL_CTL0 &= ~XTS_FLL;
FLL_CTL1 |= SELM0 + SELM_DCO;
_BIC_SR(OSCOFF);
do {
int i;
/* Clear oscillator fault interrupt flag */
IFG1 &= ~OFIFG;
for (i = 0; i < 0xFF; i++); /* Delay for oscillator to stabilize */
} while (IFG1 & OFIFG); /* Wait until oscillator interrupt flag and LF fault occurs */
/* LF fault pin sets when oscillator is turned ON */
I am able to get 3.1Mhz on MCLK pin. And I am using MCLK as source for SPI but SPI clock is not getting exact square pulses.
Can anyone guide me in frequency settings or the issue I am facing?
Regards,
Sowmya