ZERO crystal specs

Anyone know the part numbers or specs for the 12MHz and 32KHz crystals on the ZERO?

Look up the schematic for Atmel's SamD21 Xplained. You'll have to download the zip Atmel doesn't include it in the normal PDF documentation online. I believe the 32KHz crystal is the same, and the 12MHz one probably is as well.

Are you designing your own board? Because you don't need the exact same 32KHz crystal and the 12MHz crystal is unnecessary unless you have te EDBG chip, which you won't because the general public can't get them.

The crystal I use on my Neutrino is a 32KHz 12pF, which I paired with a couple 18pF capacitors. I believe the Zero uses the same, but I used a tiny SMT crystal rather than one of the large cans like they used.

I used 7pf crystal with 10pf caps

However i`m not sure about how well it works as while loading code ports start shifting and serial output seems not to work at all.(say you have port 13 in arduino but when loading code IDE cant find chip on this port but finding chip on port 12 instead)

If you have any advice please let me know.

Working on it right now.

You may find this thread useful:

In short, 7pF may simply be cutting things too close. If you don't have exactly the right size capacitors for your trace length, then it might not work.

I managed to load blink and fade code through usb to my board....will this indicate it works just fine??

Being able to load the sketch only means the bootloader works, and the bootloader doesn't rely on the crystal.

scswift:
Look up the schematic for Atmel's SamD21 Xplained. You'll have to download the zip Atmel doesn't include it in the normal PDF documentation online. I believe the 32KHz crystal is the same, and the 12MHz one probably is as well.

Are you designing your own board? Because you don't need the exact same 32KHz crystal and the 12MHz crystal is unnecessary unless you have te EDBG chip, which you won't because the general public can't get them.

The crystal I use on my Neutrino is a 32KHz 12pF, which I paired with a couple 18pF capacitors. I believe the Zero uses the same, but I used a tiny SMT crystal rather than one of the large cans like they used.

Thanks I looked at the Atmel BOM and it says 32khz crystal is MS1V-T1K 32.768kHz. I also hadn't looked closely enough at the ZERO schematic, I thought it would be using 12mhz crystal for XOSC and the 32khz for the RTC. As you note, the 32khz crystal is used to drive the MCU at 48mhz.

My fetish is measuring crystal frequency with respect to either NTP stratum 0 source or GPS PPS. For my ZERO, the MCU frequency appears off by -560ppm (not within the 20ppm spec of the 32khz crystal). See EDIT 2 below ...

Here are some anecdotal results from various MCUs
crystals.txt

I had also hoped to use dueling crystals to generate entropy for random numbers on the ZERO. I'll have to use one of the RC oscillator clocks instead. TBD

EDIT:
In working with the clocks for the entropy generator. I figured out how to create a generic clock (CLK4) using the 32KHz crystal (XOSC32K) as the clock source. I measured the frequency error of the crystal at 18 ppm, within the spec.

EDIT 2:
The error in the frequency of the CPU clock derives from the integer arithmetic used in calculating the multiplier for the DFLL (48000000/32768 = 1464.84375), but integer arithmetic will use 1464, and the resulting frequency of the CPU clock will be (1464*48000000) 47972352, a difference of -27648, or -576ppm.

Note: by rounding up and using 1465 as the multiplier, the error is reduced to 107ppm
One could also change F_CPU to 47972352 in boards.txt (not sure what the implications of that are)

(If the ZERO board had provided a 12mhz crystal for Cortex MCU, then frequency would have been closer to 48MHz)

Does that mean micros() is off 576us every "real" millisecond?

I understand from your table that only taking into account the standard Arduino boards you had best results with the Due, which was also said to have a similar rounding/multiplier glitch if I am not mistanken?

ra_duino:
Does that mean micros() is off 576us every "real" millisecond?

I understand from your table that only taking into account the standard Arduino boards you had best results with the Due, which was also said to have a similar rounding/multiplier glitch if I am not mistanken?

No, ZERO is off 576us every second. The DUE does not have a rounding problem. its frequency is a multiple of
its 12mhz crystal.

mantoui:
One could also change F_CPU to 47972352 in boards.txt (not sure what the implications of that are)

did anyone tried this already.
Does this work (without negative side-effects) ?
and does it have a measurable impact on the accuracy of all timing functions such as
millis(), micros(), delay(), delayMicroseconds(), and so on ... ?