Jump to content
43oh

MSP430FR5969 DCO Accuracy


Recommended Posts

Just as an FYI - I was concerned about using the built in DCO in the FR5969 for UART because the spec sheet says although it's factory trimmed, it's still +/-3.5%.  Generally it needs to be within 2% for a UART to work correctly so I measured the two FR5969's I have on our 2.4GHz frequency counter and this is what I got.

 

2 is obviously not a big sample size, but the frequency trimmed DCO on the FR series looks pretty good @ room temp and 8MHz or under.  I found another doc from TI that's a comparison between F5xxx and FR5xxx and it mentions the DCO is generally within 2% "within a restricted temperature range" and within 3.5 in the full temperature range (-40C to 85C).

 

I may need to re-measure at 4C because that's typically where our project will be operating.  

post-38251-0-22397600-1411067698_thumb.png

Link to post
Share on other sites

Depending what you are doing with the UART, it may not matter if you can trim the DCO to match a crystal. You CAN change the UART timer to match, as long as the bit rate isn't high enough that you are running fewer than about 50 DCO clocks per bit (for approx 2% adjustment per UART timer step) and you can do better than that with the clock dithering feature as long as the UART rate is lower than about 8 DCO clocks.

Link to post
Share on other sites

What I did was make a simple cpu.h file that lets you set different frequencies. In the header below I just set it to the standard freq * say 16000000 * then I measure the actually clock speed by enabling smclk out. Then I just changed the F_CPU value in the header file to match the actual number I measured with a frequency meter on P3.4.

 

I provided a range of number for each standard frequency. Just include this code in your cpp file and then access the static class methods with something like this:

 

#include "cpu.h"

ALWAYS_INLINE
void setup(void)
{
  CPU::init_clocks();
  CPU::enable_smclkout(); // measure on P3.4

  P1DIR |= BIT0;
  P1OUT |= BIT0;

  PM5CTL0 &= ~LOCKLPM5; // FRAM thing, let the GPIO pins begin
}

void loop()
{
    P1OUT ^= BIT0;   
    delay_msecs(500);
}

int main(void)
{
  setup();

  while (1) {
    loop();
  }
  return 0;
}

 

/* * cpu.h - abstract CPU clock initialization, timing and sleeping * * Created: Nov-12-2012 *  Author: rick@kimballsoftware.com *    Date: 08-23-2014 * Version: 1.0.3 * * ========================================================================= *  Copyright 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...