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.

How can I improve the accuracy of the internal real time clock?

Other Parts Discussed in Thread: TM4C129EKCPDT

I am using the TM4C129EKCPDT microprocessor with an external 32.768kHz crystal (20ppm).  It is the same crystal that is used on the TM4C development board.  Currently we are not doing any calibration and are seeing an inaccuracy of 3.5 secs/day.

What can be done to improve this drift?  Or is this the best we can achieve based on the characteristics of the crystal?

Thank you.

  • That sounds about right to me for a clock crystal. That's about 40ppm or 20ppm above the initial accuracy you've quoted. It wouldn't take much temperature or strain difference to reach that.

    There are appnotes on adding temperature compensation around. You could add an oven to keep it at a fixed temperature.

    I think the only simple thing would be to search for a more accurate oscillator but I have no idea how prevalent those are.

    Robert
    1 sec/month is ~0.4ppm
  • It appears that you've created a custom board(s) - would it not prove wise to "test & report" over a wider sampling of boards? (say 10)

    Assumed is a lab or office environment - wide temperature extremes are likely to increase time variation. Are your xtal bypass caps high quality - and are the xtal & caps placed very close to the target MCU pins?

    Your 3V3 regulator must be stable and reasonably noise free - over any/all (operational) input voltage variations.

    That "error" (3.5/86,400) tallies out @ 0.00405% - what were your expectations? And what is "reasonable?"

    Note that should that error hold steady - and prove monotonic - your software can make correcting adjustments...
  • Amanda

    Since the TM4C1294 processor has Internet capability, have you thought of resetting the internal RTC by using one of the  Network Time Protocols over the network? I have customers who are expecting a time read back to be within picoseconds of accuracy. They pull out their smart phones and do a compare every time when doing a controller time read.

    Alan

  • Use of such Network Time Protocol is inventive yet (really) does nothing to improve the accuracy of the MCU's internal clock. Up until that protocol fully & successfully connects & completes - error continues, undaunted.   Should the connection drop - or be unavailable - this "non-MCU" method fails.

    Picosecond accuracy seems NOT in the realm of any sub 10 (USD) MCU - nor in the far more advanced MCUs resident w/in (even) smart phones.

    Unstated is "How" your controller is "sync'ed" to the smart phone. Capitalizing upon your idea would benefit from that (Sync) detail.

    I suspect that you've left most all here, "in the dust" w/the originality of this method - surely deserves consideration...

  • Sorry Alan but pS accuracy verified by comparing to a cell phone strains my credulity. The most accurate clock on a cell would be from the GPS and that would be in the nS range (wiki claims 12nS).  Presumably you slipped to the wrong prefix.

    Comparing to the cell phone would presumably require a communication protocol and method to account for transmission delays and latencies. I'm kind of curious what your clients used for that if it's shareable.

    Robert

  • I couldn't find any ocxo (oven controlled crystal oscillators) at the right frequency and I suspect you don't want to pay $100 the oscillator in any case. You could use a higher frequency ocxo and divide it down if you wanted good accuracy.

    A more economical choice would be a tcxo (temperature compensated/controlled crystal oscillator). They get down to better than 5ppm stability with initial accuracy and aging slightly lower. Several links below. You might find better or cheaper if you search. The best I found in a quick search was 3.8ppm stability.

    There is also an appnote around that discusses using sw to perform temperature compensation. You might need to do calibration for that.

    Robert

    www.petermann-technik.de/.../
    www.digikey.com/.../852334
    www.digikey.com/.../5035516
  • Thanks for the tcxo suggestion. We are using the SiTime oscillator and seeing much better results.