cancel
Showing results for 
Search instead for 
Did you mean: 

How to choose crystal speed?

b.a.
Associate III

I just was wondering how you guys proceed to choose an external crystal, specifically what speed it should have...

The clock management with its tons of PLLs and dividers seems to be able to scale up almost any source to a desired frequency.

for the L4+ range that operate at 120MHz, it looks like that can be achieved from a 4MHz as easy as from a 48MHz crystal.

So what are the benefits and caveats of using a faster/slower crystal?

Or just stick with the 8MHZ of the Nucleo boards, which I think can be considered somewhat as a reference design?

16 REPLIES 16

80% of the pain from my current job is to implement a ton of error corrections and line checks for some canbus XTALless products, someone tought back in the day no XTAL was needed since it worked okay in the lab with just HSI.

we dont need to firmware by ourselves, lets talk

As CAN is asynchronous, that just seems to be a bad decision, which most likely doesn't respect the specification.

indeed it very doesnt, but thats my job now

we dont need to firmware by ourselves, lets talk

use XTAL, not those pesky resonators, a proper XTAL, and you will live longer and happier

we dont need to firmware by ourselves, lets talk
BarryWhit
Senior III

use XTAL, not those pesky resonators, a proper XTAL, and you will live longer and happier

As I learned quite recently on this very forum, recent MEMS oscillators (which are emphatically not quartz crystals) are low-power and have excellent characteristics. They cost more (1.15$ vs. 0.3$) but their performance is competitive with crystals (and can exceed it in terms of power consumption).

 

Also, for more generalized applications which employ crystals, you may learn about the trade-offs between low and high-frequency crystals here 

 

 

Update: One argument I haven't seen above is that although the PLLs can generate many different frequencies from your reference frequency, they are limited to specific ratios. If you need a specific frequency, the PLL may be able to achieve it based on crystal frequency and not with another. This can be important for interfaces with specific frequency requirements, or when you want to generate several specific frequencies by dividing the generated PLL clock. You have to get it right so you can get all the frequencies you need from one reference frequency. This SE may be useful.

 

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.

Watch out for environments with helium in them. Say Boeing Starliner..

The frequency chosen may be dictated by the specific interface and standard. Boards with Ethernet preferring 25 MHz sources over PLL or synthesized ones.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BarryWhit
Senior III

Helium???

 

One more consideration. "Power consumption in oscillators is essentially a linear function of frequency".

Example From STM32G4 datasheet:

OSC_pwr.jpg

 

If you're working to minimize power consumption, an extra 200uA can be very substantial.

 

- If someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.