English
Language : 

RM0367 Datasheet, PDF (177/1009 Pages) STMicroelectronics – This reference manual targets application developers
Reset and clock control (RCC)
RM0367
7.2.3
7.2.4
MSI clock
The MSI clock signal is generated from an internal RC oscillator. Its frequency range can be
adjusted by software by using the MSIRANGE[2:0] bits in the RCC_ICSCR register (see
Section 7.3.2: Internal clock sources calibration register (RCC_ICSCR)). Seven frequency
ranges are available: 65.536 kHz, 131.072 kHz, 262.144 kHz, 524.288 kHz, 1.048 MHz,
2.097 MHz (default value) and 4.194 MHz.
The MSI clock is always used as system clock after restart from Reset and wake-up from
Standby. After wake-up from Stop mode, the MSI clock can be selected as system clock
instead of HSI16 (or HSI16/4).
When the device restarts after a reset or a wake-up from Standby, the MSI frequency is set
to its default value. The MSI frequency does not change after waking up from Stop.
The MSI RC oscillator has the advantage of providing a low-cost (no external components)
low-power clock source. It is used as wake-up clock in low-power modes to reduce power
consumption.
The MSIRDY flag in the RCC_CR register indicates whether the MSI RC is stable or not. At
startup, the MSI RC output clock is not released until this bit is set by hardware.
The MSI RC can be switched on and off by using the MSION bit in the RCC_CR register
(see Section 7.3.1).
It can also be used as a backup clock source (auxiliary clock) if the HSE crystal oscillator
fails. Refer to Section 7.2.10: HSE clock security system (CSS) on page 180.
Calibration
The MSI RC oscillator frequency can vary from one chip to another due to manufacturing
process variations, this is why each device is factory calibrated by ST for 1% accuracy at an
ambient temperature, TA, of 25 °C.
After reset, the factory calibration value is loaded in the MSICAL[7:0] bits in the
RCC_ICSCR register. If the application is subject to voltage or temperature variations, this
may affect the RC oscillator speed. You can trim the MSI frequency in the application by
using the MSITRIM[7:0] bits in the RCC_ICSCR register. For more details on how to
measure the MSI frequency variation please refer to Section 7.2.15: Internal/external clock
measurement using TIM21.
HSI48 clock
The HSI48 clock signal is generated from an internal 48 MHz RC oscillator and can be used
directly for USB and for random number generator (RNG).
The internal 48MHz RC oscillator is mainly dedicated to provide a high precision clock to the
USB peripheral by means of a special Clock Recovery System (CRS) circuitry. The CRS
can use the USB SOF signal, the LSE or an external signal to automatically and quickly
adjust the oscillator frequency on-fly. It is disabled as soon as the system enters Stop or
Standby mode. When the CRS is not used, the HSI48 RC oscillator runs on its default
frequency which is subject to manufacturing process variations.
For more details on how to configure and use the CRS peripheral please refer to Section 8:
Clock recovery system (CRS).
The HSI48 requires VREFINT and its buffer with 48 MHz RC to be enabled (see
177/1009
DocID025274 Rev 3