2026-02-12 3:52 AM
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!
Solved! Go to Solution.
2026-02-12 4:48 AM
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.
2026-02-12 4:18 AM
If you do a forum search, you'll find plenty of posts from people having trouble getting crystals to work.
See Application note AN2867, Guidelines 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:
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?
2026-02-12 4:47 AM
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
2026-02-12 4:48 AM
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.
2026-02-12 5:03 AM
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?
2026-02-12 5:03 AM
I dunno, but I think that SiTime article might just be the slightest bit biased.
2026-02-12 5:07 AM
@RobK1 wrote:
I dunno, but I think that SiTime article might just be the slightest bit biased.
Arguments?
2026-02-12 5:12 AM
Clearly, they do have an axe to grind!
Hence I said "but they would, wouldn't they?" with my SiTime link!
Here's an article from ECS - a company which makes both crystals and oscillators:
2026-02-12 6:29 AM
As @EThom.3 already mentioned, a lot of emphasis on startup and mismatch issues which, at least in my 37 years experience, are extremely rare. Also, 40 hours to correct a mismatch issue that should not have occured in the first place if the designers had done their homework?
Never had any startup problems and only one mismatch, where I had inadvertantly ordered a batch of third-overtone 32MHz crystals rather than fundamental mode.
Don't get me wrong, I'm not bashing oscillators; I have used them in the past and likely will use them in the future, in situations where they have a clear advantage over a crystal.
2026-02-12 7:09 AM
@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!"