Hi everyone,
I'm developing a code for MSP-EXP430FR5739 and I have experienced a very strange beahviour when I try to set up clock.
For example if I set clock like this:
void CLK_init()
{
CSCTL0_H = 0xA5; // Unlock register
CSCTL1 |= DCORSEL + DCOFSEL0 + DCOFSEL1; // Set max. DCO setting
CSCTL2 = SELA__DCOCLK + SELS__DCOCLK + SELM__DCOCLK; // MCLK = DCO
CSCTL3 = DIVA_0 + DIVS_0 + DIVM_0; // set all dividers
CSCTL0_H = 0x01; // Lock Register
}
I should be getting 24MHz system clock, right? But when I toggle any pin inside an infinite while loop and view result on oscilloscope, it's state changes only with 1.25Mhz frequency. Am I missing something here?
Any help would appreciated!