2021-12-09 10:44 PM
I ' ve been working on a device that able to use industrial area. I must be sure that rtc clock is accurate because this device need to use RTC too much. When i researched , i did not find any code example about rtc calibration by temperature. Any suggestion, would be appriciate.
2021-12-10 12:28 AM
A correction of the LSE is only possible with the calibration functions of the RTC (see e.g. reference manual: RTC smooth digital calibration, availability depends on the derivative).
A temperature-dependent correction requires knowledge of both the exact current temperature and the temperature depending curve shape of the crystal frequency including the load capacitors, etc., which is why no general recommendation can be given.
Good luck!
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2021-12-10 01:46 AM
Generally, you would need to
Or, you can simply buy a TXCO or an external RTC with integrated temperature-compensated crystal, where all this has been already done by the TXCO manufacturer.
JW
2021-12-13 01:12 AM
Thank you all, but still i confused. I have a few questions.
I am wondering if temperature was changed, the RTC output(1Hz) would be change is not it ?
Why am i need to the tempereature curve ?
2021-12-13 02:44 AM
You could use synchronization with a 1Hz signal (but you don't have to) if you have a very precise reference signal, e.g. the 1PPS of a GPS receiver.
If you want to correct the crystal according to the current temperature, you first need the temperature curve of the crystal, which heavily depends on the manufacture (quartz cut). Usually you can get it from the manufacturer of the crystal, or you have to characterize the curve, as Jan mentioned above. For more information on the temperature curve of crystals, you can take a look at the AN2971, for example, which deals with a different method of compensation, but shows the principle of the temperature curve well.
Then you have to know the exact temperature of the crystal, also depending on the requirements.
Then you could write a program that e.g. does a running smooth calibration and thus fades out or adds individual pulses of the LSE frequency.
Regards
/Peter
2021-12-13 03:00 AM
I cannot figure out PPS stuff , do i calibrate by temperature without reading 1hz signal from RTC out ? I dont use GPS in this project