Go Down

Topic: RTT and 32KHz crystal frequency check (Read 1 time) previous topic - next topic

mantoui

Does any one know the spec's for the various crystals on the DUE?

I wrote a  little sketch (rtt.ino in the git link below) that checks the 32KHz crystal against an NTP host over the serial connection.  I set the prescaler to 32 to get 1024 interrupts (ticks) per second (see Ch. 15) from the RTC/RTT crystal. The only magic required was that you have to disable the interrupt in the ISR and wait for RTT_SR to clear before  re-enabling the interrupt and exiting the ISR. Frequency data is requested by the NTP host every 10 seconds or so, and after many minutes, the crystal frequency appears to be within 3ppm of the NTP-disciplined frequency on the Linux host (probably accurate to less than 1 ppm).  The sketch has an option to measure the RTC/RTT crystal against micros() on the DUE.

Frequency offsets for other MCU's, RTC's and RC oscillators are in crystals.txt on the git link below.

  https://github.com/manitou48/crystals

Markus_L811

Cool work you did there. Nice set of Data you collected.

mantoui

#2
Mar 06, 2013, 12:59 am Last Edit: Mar 06, 2013, 01:28 am by mantoui Reason: 1
I'm still searching for  part number or data sheet or specs (ppm) for the DUE 12MHz crystal .....  The eagle files bill of material just says crystal oscillator.

On further review, the DUE schematic says Y1,12MHz KX-7 20pF -- google says that might have 30ppm accuracy. 

I'll go with that unless someone knows better.

Transistorfips

#3
Mar 06, 2013, 01:27 pm Last Edit: Mar 06, 2013, 01:56 pm by Transistorfips Reason: 1
For
Y1,12MHz KX-7 20pF
you get this:
http://www.adrirobot.it/datasheet/vari/pdf/12MHz%20KX-7%2020pF.pdf

I'm bona fide for this being the original part used by the Due since the owner of the site adrirobot is tinkering a lot with the Arduinos. Maybe you can figure out more by digging at his website.

Go Up