2025-05-14 12:29 PM
I am trying to calibrate 512Hz RTC to 1ppm or <1ppm.
Desired Frequency = 512Hz
Average Frequency Obtained is = 512.0073Hz
What should be the value of CALP and CALM ???
(I used the CALP = 0 and CALM = 15, but still the ppm that I obtained is ~14)
Could you please help me with what should be take care of too obtain a value closer to 1ppm.
I used both oscilloscope and 53131a universal counter to measure the RTC calib frequency out.
2025-05-15 6:11 AM
Hello @J_Thomas;
Are you asking about the formula to calculate the effective calibrated frequency?
According to reference manual RM0440
FCAL = FRTCCLK x [1 + (CALP x 512 - CALM) / (220 + CALM - CALP x 512)].
CALW16 bit of the RTC_CALR register can be set to 1 to force a 16- second calibration cycle period.
In this case, the RTC precision can be measured during 16 seconds with a maximum error of 0.954 ppm.
For more information, I recommend you How to calibrate the STM32's real-time clock (RTC) article. This article provides a step-by-step guide on how to calibrate the precision of a real-time clock (RTC).
Thank you.
Kaouthar
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.