This application note discusses the RTC calibration basics and explains how RTC calibration can be used to improve timekeeping accuracy
The document discusses the precision requirements of embedded applications and the limitations of quartz crystals due to temperature variations. It introduces the RTC calibration feature available in STM32F10xxx products, which allows software control over compensation for crystal and temperature drifts without requiring external trim capacitors.
The note details the methodology behind the digital calibration circuit, explaining how it removes oscillator cycles periodically based on a value loaded into the BKP_RTCCR register. It provides a comprehensive table correlating calibration values in parts per million (ppm) with time adjustments in seconds per month to assist users in calculating the necessary compensation.
The RTC is driven by a quartz crystal-controlled oscillator with a nominal frequency of 32.768 kHz.
Each calibration step has the effect of subtracting 1 oscillator cycle every 1,048,576 actual oscillator cycles.
As a result of the calibration, the oscillator clock can be slowed down from 0 to 121 ppm.