Skip to main content
Senior
February 12, 2026
Solved

Crystal vs oscillator?

  • February 12, 2026
  • 4 replies
  • 871 views

Hi! I’m starting design of a new board, on which I’d like to use an stm32h7 device. My board will also include an audio codec and usb hs phy.

Historically I’ve used crystals to drive HSE of the mcu, but some reference designs I’ve been studying show the use of cmos oscillators to drive the clock. I am curious about the trade offs of this, or how/when I should prefer a crystal over an oscillator?

thank you!

Best answer by EThom.3

Back-in-the-day, when a microcontroller could run at 32 MHz or more, but had no internal frequency multiplier, I used oscillators, as it could be a pain to get a crystal to oscillate correctly much above 22 MHz. Oscillators solved that problem.

The caveat I found was that I had PCB traces with frequencies near or above 30 MHz, which is the lower limit for radiated emission measurements in generic EMC standards. The clock and its overtones can be very happy to show up when doing EMC tests.

Also, back then, oscillators tended to be power hungry. That has most likely changed a lot over the decades.

Since microcontrollers began to have internal frequency multipliers, DLLs and all that (along with USARTs that can work with fractions), I have typically used a 4 MHz crystal. Then frequencies in the VHF range and above are mainly confined to the silicon chip inside the microcontroller. No PCB traces, and smaller area ==> fewer EMC worries.

I don't find crystals hard to use, but @Andrew Neil is absolutely right that one should download and study AN2867, as opposed to throwing something random on the board.

4 replies

Andrew Neil
Super User
February 12, 2026

If you do a forum search, you'll find plenty of posts from people having trouble getting crystals to work.

See Application note AN2867Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs, the datasheet for your chosen device, the hardware design guide, etc ...

Using a a ready-made oscillator saves you all that grief - no more worrying about load capacitors, drive strength, which cut, etc, etc, ...

They may also have reduced power consumption, smaller footprint, etc:

AndrewNeil_0-1770898507178.png

 

The downside, of course, is that they cost more.

 

This from SiTime focuses on the benefits of MEMS oscillators - but they would, wouldn't they?

Other oscillator manufacturers are available.

 

Some STM32 series may not be suitable; eg, see: MEMS oscillators not compatible with STM32F1 and STM32L1 series?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
February 12, 2026

@Andrew Neil wrote:

If you do a forum search, you'll find plenty of posts from people having trouble getting crystals to work.


And yet @RobK1 and @EThom.3 have had decades of experience with no issues.

I guess the thing to bear in mind here is that only the problems get posted to the forum - the thousands of people whose crystals just work fine don't keep posting to say, "my crystal is working fine!"

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
EThom.3
Senior II
February 12, 2026

@Andrew Neil wrote:

I guess the thing to bear in mind here is that only the problems get posted to the forum - the thousands of people whose crystals just work fine don't keep posting to say, "my crystal is working fine!"


Maybe we should begin posting positive and happy stuff like "I just made this protoype, doing this and that, and it works great!" :D

 

I agree with @RobK1 . We don't have to permanently choose one or the other. Use whatever works best for the design at hand. (Or if it is like in the early 2020's: Choose whatever is still in stock...)

 

mƎALLEm
Technical Moderator
February 12, 2026

Hello,

I think this is an interesting article you may refer to for your question: Do you know when to use a crystal or an oscillator? The wrong answer can cost you

 

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
EThom.3
Senior II
February 12, 2026

Interesting article. However, I wonder why they put so much emphasis on cold start issues. The only time I have experienced problems with a crystal not starting, was when I had misread a label, and used 10 nF capacitors instead of 10 pF. Have I just been lucky?

EThom.3
EThom.3Best answer
Senior II
February 12, 2026

Back-in-the-day, when a microcontroller could run at 32 MHz or more, but had no internal frequency multiplier, I used oscillators, as it could be a pain to get a crystal to oscillate correctly much above 22 MHz. Oscillators solved that problem.

The caveat I found was that I had PCB traces with frequencies near or above 30 MHz, which is the lower limit for radiated emission measurements in generic EMC standards. The clock and its overtones can be very happy to show up when doing EMC tests.

Also, back then, oscillators tended to be power hungry. That has most likely changed a lot over the decades.

Since microcontrollers began to have internal frequency multipliers, DLLs and all that (along with USARTs that can work with fractions), I have typically used a 4 MHz crystal. Then frequencies in the VHF range and above are mainly confined to the silicon chip inside the microcontroller. No PCB traces, and smaller area ==> fewer EMC worries.

I don't find crystals hard to use, but @Andrew Neil is absolutely right that one should download and study AN2867, as opposed to throwing something random on the board.

sb_stAuthor
Senior
February 12, 2026

Wow, thank you all so much! This is all awesome information.

I had indeed found that SiTime article, but to echo @Andrew Neil’s thoughts, it feels to me more like marketing masking as education, and in any case I worry it over-indexes on cost, which surely is not the only basis on which to weigh crystals against oscillators? @EThom.3 touched on the issue of EMC concerns, and that seems relevant to a project like mine, which is lightly mixed-signal. I don’t have any prior experience with most of this, so this is a learning project for me.

In any case, thanks for the resource links; I will do some more exploring to try to get some better insights…

EThom.3
Senior II
February 12, 2026

I you end up using a crystal, and want a second pair of eyes on your design / component choices, please feel free to send me a private message. Happy to help.

sb_stAuthor
Senior
February 12, 2026

Incredible offer of you, thanks so very much!