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.

MSP430FR5969: code example on DCO calibration on the fly vs a ref

Part Number: MSP430FR5969

Hi everybody , 

where can I find an example on  calibrating on the fly the DCO  if  I have a reference ?

thank you 

BR
Carlo

  • Hello,

    where can I find an example on  calibrating on the fly the DCO

    Have you checked the code examples at dev.ti.com?

    if  I have a reference ?

    This isn't clear. Do you mean a reference clock or an external voltage reference?

    According to Section 3.2.6 in the user's guide:

    The DCO frequency can be changed at any time, but care should be taken to ensure no other system clock frequency constraints are exceeded with the new frequency selection. Any change in the DCOFSEL or DCORSEL bits causes the DCOCLK to be held for four clock cycles before releasing the new value into the system. This allows for the DCO to settle properly.

    Regards,

    James

  • In addition to what James said:

    The FR59 series doesn't expose the DCO/MOD settings which one might use for fine-tuning the DCO. Rather it presents a choice of 12 pre-calibrated frequencies (DCOFSEL/RSEL).

    If there's a need to calibrate (and account for drift) better than +/-3.5%, you could do something analogous to the VLO calibration described in AppNote SLAA693A . What that does is compute a constant (variable in the program) which describes the number of VLOCLK ticks in e.g. 1 second, based on SMCLK or RTC, from which can be computed timer settings and (with a bit more work) eUSCI modulation. This isn't as simple as fiddling with the clock directly, but it's something. 

  • slaa336 describes the DCO library

  • Hi David , 

    my case  I have a  precise UART incoming @115200  and woudl like to live on DCO 16MHz  .  any suggestion on how to retune the UART on the incoming frames ? any code /idea  ?

    thank you very much 

    BR

    Carlo

  • If you want to generate a specific bit rate then your best bet is to get
    the DCO to run at an integer multiple of that. Otherwise you will have
    two modulators running.
    
    Well, an integer multiple of 16 times your bit rate.
    
    The DCO is going to be operating its modulator so it will be switching
    between frequencies slower and faster than the set point. Which means
    that the UART modulator will be operating assuming an input frequency
    that is wrong. The input will always be slower or faster than that.
    Which means that any calculations of bit rate error will be wrong.
    
    With the DCO set to N * 16 * 115200, you only have one modulator (the
    DCO) operating which should simplify any error calculations.
    
    

**Attention** This is a public forum