I’ve been having trouble getting my ATmega32U4 + Wiznet W5500 to work and I think I’ve traced the problem down to the crystal oscillator loop.
The problem is that there is no network activity. The LEDs on the RJ45 ethernet jack don’t light up at any time, and none of the LED signals from the W5500 light up initially on reset either. Bizarrely, I find that if I touch the XI track with a 10Mohm oscilloscope probe, the SPDLED lights up, but nothing else happens. This made me suspect the crystal is having trouble oscillating at 25MHz, so I tested XI and XO with the scope:
On XI, I see a nice 25MHz waveform:
The divisions are 20ns, and the wave takes up two divisions per period so 40ns, or 25MHz. The amplitude is 2Vpp (3.3V supply) which seems reasonable.
On XO, though, I get a messy waveform:
The waveform is obviously not sinusoidal and its peak-peak amplitude is that of the supply rails. In both cases, I measure the XI/XO track with respect to ground. It seems like the crystal, capacitors and resistors are not working correctly.
I suspected it was the load capacitors. The crystal I use (FA238) requires load capacitors of ~12pF, so I used two 18pF capacitors in parallel. When this didn’t work I tried lots of other combinations, like 30pF, 18pF, 12pF, 10pF, 6pF, and none of them worked.
Now, since XI is the crystal waveform input for the W5500, and it looks ok on the scope, it could be that this isn’t actually a problem, and the problem is somewhere else, but I thought I’d check with you guys. So, is it normal for the XO waveform to be so screwed up, even though the XI waveform is ok? Does anyone have a suggestion for different components to check/replace?