This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5419A: DCO selection datasheet or code exemple?

Part Number: MSP430F5419A

Hello,

In the MSP430F5419A datasheet I am confused for the DCO selection:

In table chapter 8.20 DCO Frequency I can see:

fDCO(5,0) DCO frequency (5, 0)(1) DCORSELx = 5, DCOx = 0, MODx = 0 2.5 6.0 MHz
fDCO(5,31) DCO frequency (5, 31)(1) DCORSELx = 5, DCOx = 31, MODx = 0 23.7 54.1 MHz

But in the MSP430F541xA_MSP430F543xA_Code_Examples (slac375k.zip) The configuration for 12MHz is:

  UCSCTL0 = 0x0000;                         // Set lowest possible DCOx, MODx
  UCSCTL1 = DCORSEL_5;                      // Select DCO range 24MHz operation
  UCSCTL2 = FLLD_1 + 374;                   // Set DCO Multiplier for 12MHz
                                            // (N + 1) * FLLRef = Fdco
                                            // (374 + 1) * 32768 = 12MHz
                                            // Set FLL Div = fDCOCLK/2

So can DCORSELx = 5, DCOx = 0, MODx = 0 be used for DCO=12MHz?

Best regards

Mich

  • Hi Mich,

    The Code example implementation works for 12MHz.

    The datasheet is showing the ranges for the DCORSELx with the min and max DCO values. For example, that DCORSEL5 can work for 2.5MHz to 54.1 MHz depending on your DCO and MOD setting. 

    The first part of the code is setting the low end for DCOx and MODx. The second part is setting the frequency range, typically you want to choose the DCORSEL where your frequency is around the center of the range. That last section on UCSTL2 = FLDD_1+374 is fine tuning it the DCO frequency to 12 MHz.  If FLL was disabled then the initial sets of DCOx and MODx would run at that selection, but since FLL is enabled you can fine tune the frequency with the last section.

    The Digitally Controlled Oscillator (DCO) section of the Family User's Guide provides more technical details and further explanation of the DCO, MOD and FLL.

    Regards,

    Luke

  • Hi Luke,

    Ok for DCORSEL5 can work from 2.5MH up to 54.1MHz and the fine tuning.

    What I do not understand is: How it can work at 24MHz when DCO=0 and MOD=0? Why DCO=15 or 16 is not mandatory?

    Best regards

    Michel.

  • The magic is that FLL (Frequency-Locked Loop) line. The MSP430F5xxx devices use the UCS which has hardware based FLL. This allows the registers to be dynamically changed in hardware so that it can fine tune on the spot. Setting the DCO and MOD to 0 is basically just setting the device to a base level so that the FLL can change the registers when it does its tuning.

    The reference clock for the FLL is what is compared to the actual DCO frequency, so the FLL will change the MOD bit until it is within range of the FLL reference clock.

    Below is a little graphic of the system.

    The MSP430x5xx Family User's Guide under the Unified Clock System (UCS) section can help provide further information for this, and an alternate explanation.

    Regards,

    Luke

**Attention** This is a public forum