I have a simple board with an ATmega16M1 microcontroller. It is working fine when running on the internal oscillator, but I'm having trouble getting it to work with a crystal.
It is just a standard crystal + two load caps setup. A 12mhz smd crystal and two 8pF caps. I've done several STM32 boards with the same parts and not had any trouble. But on this one it does not seem to oscillate. Running some really simple "led blink" code, it doesn't start at all. When I connect a scope probe across the crystal it sometimes runs, but much slower than it should be. And all I'm seeing on the scope is a few mV of noise.
I tried swapping out the crystal, removing the caps, and doubling them for 16pF per side with no luck. Atmel gives the formula C = 2*CL - CS. With CL being 8pF for my crystal and their estimate of 5-10pF for CS so I think my values are reasonable.
I also attached a screenshot of my layout in case that has something to do with it. Not much to it though.
Running out of ideas here... anyone have advice on what might be wrong?