English
Language : 

AN4067 Datasheet, PDF (1/27 Pages) STMicroelectronics – Microcontrollers of STM32F0x1
AN4067
Application note
Calibrating STM32F0x1, STM32F0x2 and STM32F0x8 lines
internal RC oscillators
Introduction
Microcontrollers of STM32F0x1, STM32F0x2 and STM32F0x8 product lines, named
STM32F0xx in this document, have internalRC oscillators that can be selected as the
system clock source, and a High speed internal RC oscillator dedicated to ADC. These are
known as the HSI (High-speed Internal 8 MHz), HSI14 (High-speed Internal 14 MHz) and
HSI48 (High-speed Internal 48 MHz) oscillators.
The operating temperature has an impact on the accuracy of the RC oscillators. At 25 °C,
the HSI, HSI14 and HSI48 oscillators have an accuracy of ±1% 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
STM32F0xx microcontrollers have built-in features to allow users to calibrate the HSI and
HSI14 oscillators and measure the LSI (Low-speed internal) oscillator frequency.
This application note focuses on how to calibrate internal RC oscillators: HSI, HSI14 and
HSI48. Three methods are presented:
 Method 1 consists in finding the frequency with the minimum error.
 Method 2 consists in finding the maximum allowed frequency error.
 Method 3 consists in preparing the table of calibration values that is later used for fast
calibration.
All three methods are implemented by providing an accurate reference signal.
The measurement of the LSI oscillator is performed by connecting the oscillator to a timer
input capture.
Table 1 lists the microcontrollers and software concerned by this application note.
Type
Microcontrollers
Software
Table 1. Applicable products and software
Part number and product line
STM32F0x1 line, STM32F0x2 line and STM32F0x8 line.
STSW-STM32132
February 2015
DocID022913 Rev 2
1/27
www.st.com
1