This application note describes how to calibrate the HSI and MSI internal RC oscillators of STM32L1xx MCUs
The STM32L1xx microcontroller family includes two internal RC oscillators, the High-Speed Internal (HSI) and the Multi-Speed Internal (MSI), which can serve as system clock sources. While factory-calibrated for 1% accuracy at 25 °C, their frequency accuracy decreases across the operating temperature range of -40 to 105 °C. This document details methods to compensate for temperature-induced variations by calibrating these oscillators using an accurate reference signal.
| HSI typical frequency | 16 MHz |
|---|---|
| Factory accuracy at 25 °C | +1% typically |
| Operating temperature range | -40 to 105 °C |
| HSI trimming step size | 0.5% |
| MSI frequency ranges | 65.5 kHz to 4.2 MHz |
The HSI and MSI oscillators have an accuracy of +1% typically at 25 °C.
Accuracy can be improved by calibrating the HSI and MSI oscillators using an accurate reference signal to compensate for temperature influence.
An accurate reference signal such as the LSE frequency (32.768 kHz crystal) or the 50 Hz/60 Hz of the mains can be used.