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.

MSP430F5xx DCO clock settings(DCORSEL)

Other Parts Discussed in Thread: MSP430F5529

Hi,

This is regarding the MSP430F5529 DCO clock settings,
I am trying to set the DCO around 7.3MHz, with the below settings on MSP430F5529 TI target board.

With "DCORSEL_6;" the code always stops at the fault flag loop
with DCOFFG always ON. But with "DCORSEL_5;" the code works fine without any fault flag.

-------------------------------------------------------
  UCSCTL3 = 0;                              // FLL Reference Clock = XT1

    __bis_SR_register(SCG0);
    UCSCTL0 = 0;
    UCSCTL1 = DCORSEL_6;
    UCSCTL2 = FLLD_0 + 449;
    UCSCTL3 = SELREF__XT1CLK + FLLREFDIV_1;
    __bic_SR_register(SCG0);
    
    __delay_cycles(250000);

    do
    {
      UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
                                                                     // Clear XT2,XT1,DCO fault flags
      SFRIFG1 &= ~OFIFG;                         // Clear fault flags
    }while (SFRIFG1&OFIFG);                   // Test oscillator fault flag
--------------------------------------------------------

As per the datasheet I think we can use both  DCORSEL_6 and  DCORSEL_5 settings
but don't understand why do we ge Fault flag (DCOFFG) with DCORSEL_6?
Please let me know which is the appropriate setting.

Best Regards
Kummi

  • Hi Kummi,

    fDCOCLK = D × (N + 1) × (fFLLREFCLK ÷ n) where D = FLLD bits = 1, (N+1) = FLLN bits = 449, and n = FLLREFDIV bits = 2.  fFLLREFCLK = XT1CLK = 32,768 kHz.  Therefore fDCOCLK = 1x449x(32,768/2) = 7,356,416 so at least you appear to be setting fDCOCLK to the expected frequency.  However according to Figure 10 of the device datasheet 7.35 MHz lies on the outer edge of the allowable frequencies for a DCORSEL value of 6 and therefore it is possible to see how the DCOFFG fault flag could be set, especially outside of the test conditions of Vcc = 3.0 and T = 25 degrees C.

    Based on this graph DCORSEL_5 is definitely the preferred value for operation at 7.35 MHz.  Is there any particular reason that you would like to operate at DCORSEL_6 as compared to DCORSEL_5?

    Regards,

    Ryan

  • Hi Ryan,

    Thank you so much for the information.

    Can we assume "DCORSEL_6" is the best option for 7.3MHz?
    The temparature drift of the application would be around -20℃ to 70℃.

    Actually the Figure 5-10 and the table in the same page "5.20 DCO Frequency"
    seems to be different.

    The table mentions with DCO frequency(6,0) we get DCO frequency of MIN 4.6MHz MAX 10.7MHz.
    So we thought DCORSEL_6 is the best option.

    Best Regards
    Kummi
  • Hi Kummi,

    The DCO Frequency table gives the max & min possible frequency values based on DCORSEL and the limits of DCOx but it is by no means a fair representation of the stable DCO frequencies available for each DCORSEL. You can see that other DCORSEL values do not coincide with achievable DCO frequencies, such as DCORSEL 6 & 7 with a DCOx value of 31 (keep in mind that DCOx is set automatically by the FLL) which results in max & min frequencies above 24 MHz. For that information you would be best off referring to Figure 10. I can assure you that DCORSEL_5 is the best option for 7.3 MHz.

    Regards,
    Ryan

**Attention** This is a public forum