STM32 – Why Use STM32 HSE?

clockstm32

Why do we use an external oscillator for STM32???
Why not just use the microchip oscillator?

I am using STM32F2xx it clocks at 120Mhz

But, an external oscillator of 12Mhz is latch into the microchip, why use the external clock?

Best Answer

They are more accurate over a wider temperature range, they have far less jitter (cycle by cycle timing precision) and in general are more accurate to within very good tolerances of the required frequency. If you then are multiplying this reference by many times to get the final clock speed in your processor, any error or inaccuracy of the clock source would be multiplied too, possible giving huge offsets in real vs intended frequencies and larger than acceptable clock jitter during time sensitive things such as high speed synchronous communications or asychronous with timeouts.

External crystals (usually Quartz) or resonators (usually ceramic, have less awesome tolerances but are still better than internal RC oscillators) are quite cheap and can have very small footprints like the Murata Ceralock series ceramic resonators that I often use for my Atmel AVRs and even my Atmel Cortex M3 (to get 64 Mhz from 16 is annoying by the way, when you have to also get 48Mhz for USB!).

As a side note, I found that 12Mhz is a much nicer crystal/resonator frequency for USB (just x4) and for most clock speeds (like, 120Mhz is just x10), and I see it often on ARM based boards reference designs these days.