2022-11-10 06:35 AM
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?
2022-11-14 12:34 AM
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.
2022-11-14 04:19 PM
As CAN is asynchronous, that just seems to be a bad decision, which most likely doesn't respect the specification.
2022-11-17 07:33 AM
indeed it very doesnt, but thats my job now
2022-11-17 07:34 AM
use XTAL, not those pesky resonators, a proper XTAL, and you will live longer and happier
2024-06-29 07:56 AM - edited 2024-06-30 04:51 AM
> 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 :face_with_tears_of_joy:
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.
2024-06-29 08:11 AM
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.
2024-06-29 08:25 AM - edited 2024-06-29 11:26 AM
Helium???
One more consideration. "Power consumption in oscillators is essentially a linear function of frequency".
Example From STM32G4 datasheet:
If you're working to minimize power consumption, an extra 200uA can be very substantial.