
Introduction
The STM32G0 Series microcontrollers have internal RC oscillators that can be selected as the system clock source. These are
known as the HSI16 (high-speed internal 16 MHz) and LSI (low-speed internal) oscillators.
The operating temperature has an impact on the accuracy of the RC oscillators. At 25 °C, the HSI16 oscillator has an accuracy
of 0.25% typically, but in the temperature range of -40 to 105 °C, the accuracy decreases.
To compensate for the influence of temperature on internal RC oscillators accuracy, the STM32G0 Series microcontrollers have
built-in features to allow users to calibrate the HSI16 oscillator and to measure the LSI (low-speed internal) oscillator frequency.
This application note focuses on how to calibrate internal RC oscillator HSI16. Three methods are presented:
• Method 1 consists in finding the frequency with the minimum error.
• Method 2 consists in finding the frequency within the allowed error.
• Method 3 consists in preparing the table of calibration values that is later used for fast calibration.
All three methods require an accurate reference signal.
The measurement of the LSI oscillator is performed by connecting the oscillator to a timer input capture.
This application note concerns the STM32G0 Series microcontrollers and the X-CUBE-RC-CALIB software.
Using X-CUBE-RC-CALIB software to calibrate STM32G0 Series internal RC
oscillator
AN5126
Application note
AN5126 - Rev 1 - November 2018
For further information contact your local STMicroelectronics sales office.
www.st.com