2022-08-17 09:25 AM
2022-08-17 09:32 AM
I have seen a few posts concerning STM32 Micros having poor RTC accuracy.
Has anyone tried MEMs oscillators in place of crystal oscillators?
MEMs oscillators are compatible with most STM32 as explained in AN2867 Sec 10 Conclusion:
2022-08-17 09:39 AM
> I have seen a few posts concerning STM32 Micros having poor RTC accuracy.
Yes, most of them by users unaware of the guidelines, or even using LSI in false expectations.
Also, define "poor".
> Has anyone tried MEMs oscillators
Me not, but there's no reason for them not to work exactly as crystal oscillators would.
JW
2022-08-17 09:52 AM
There are 2 reasons why they may offer different/better RTC performance:
1) There are no external capacitors (so no need to compensate for pin capacitance and PCB track capacitance)
2) The STM32 operates in a different mode (Bypass mode)
2022-08-17 10:54 AM
With crystal *oscillator*, you don't have external capacitors and the STM32 operates in bypass mode.
MEMS is just a different way to do the same thing.
But I understand you, with using "bare" crystal it's the responsibility of the user to design the circuit properly, using the ready-made oscillator delegates this burden to the manufacturer of the oscillator, in exchange for some bucks. That's OK.
What I wanted to say is, that why wouldn't MEMS oscillator work as any other external oscillator or clock source would?
JW
2022-08-18 02:41 AM
Thank you JW, you are quite right: a crystal oscillator (module) does not have external capacitors and can be used in the same way as a MEMs oscillator (with STM32 in Bypass mode).
I have seen comments on the Community forum regarding difficulty in obtaining good RTC accuracy using a bare crystal & external capacitors. My thoughts are:
The total Load capacitance (load capacitors + pin capacitance + PCB capacitance) cannot be predicted accurately or be tightly controlled (due to the tolerance on the pin capacitance and PCB track capacitance). This will impact on the tolerance of the oscillating frequency (causing it to be anywhere within the specified ppm range). This problem is overcome by using the RTC clock calibration procedure (as specified in AN4759 Sec 2.5 Smooth Digital calibration).
However, some comments have expressed problems with the calibration procedure (STM32H7 device RTC calibrate out signal unstable, RTC_CALIB 512Hz option inaccurate; trouble with Discovery STM32H7B3I-DK)
Suggested solutions include: check the PCB layout (against AN2867 guidelines); check LSE is being selected; select high drive level
Two posts suspected the topology of the internal oscillator being at fault. A MEMs or crystal oscillator would overcome this problem because the STM32 would operate in Bypass mode. Hence I was wondering if anyone has tried this.