I am using this 12 MHz crystal (X322512MSB4SI) as an input to the ATSAME70J21B (LQFP 64 pin variant). However, my program hangs on startup after switching to the oscillator. I am sure the crystal is the problem as everything is working fine with the internal RC oscillator.
I suspect the load capacitor selection or PCB layout is the issue.
PCB and schematic are shown below. I would appreciate if anyone has some wisdom they can share on this matter.
Using Cl = (C1*C2)/(C1+C2)+Cp, with Cp = 5p and aiming for Cl = 20p I get C1=33pF, which is what I had my board made with. This did not work.
On further research, section 58.4.6 of the datasheet suggests a formula Cl = 2*(Ccrystal - Cmcu - Cpcb), from which I get 2*(20p - 9p - 5p) = 12pF.
I note the datasheet requires Ccrystal to be less than 17.5pF. However the V71 Xplained Ultra board is also using a 20pF crystal and I am running at 3.3V and room temperature so I think I should be getting something.
I think this could also be a problem becuase I have also tried soldering on 15p, 18p, 22p and 33p caps at C4 and C55 to no avail. FWIW, the SAM E70 Xplained Ultra board uses 22p load caps and a 20p crystal.
The oscilloscope on XIN is showing nothing at all.
Oscillator Y1 is <1cm from the input pins