Pages: [1]   Go Down
Author Topic: RTT and 32KHz crystal frequency check  (Read 1222 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 9
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Germany
Offline Offline
Full Member
***
Karma: 10
Posts: 230
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 9
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 05, 2013, 07:28:40 pm by mantoui » Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 06, 2013, 07:56:26 am by Transistorfips » Logged

Pages: [1]   Go Up
Jump to: