Clocks
3
Clocks
Four different clock sources can be used to drive the system clock (SYSCLK). They are:
●
HSI ((high-speed internal) oscillator clock
●
HSE (high-speed external) oscillator clock
●
PLL clock
●
MSI (multispeed internal) oscillator clock
The MSI is used as a system clock source after startup from reset, wake-up from Stop or
Standby low power modes.
The devices have the following two secondary clock sources:
●
37 kHz low speed internal RC (LSI RC) which drives the independent watchdog and
optionally the RTC used for auto-wakeup from Stop/Standby mode.
●
32.768 kHz low speed external crystal (LSE crystal) which optionally drives the
real-time clock (RTCCLK)
Each clock source can be switched on or off independently when it is not used, to optimize
power consumption.
Refer to the STM32L15xxx reference manual (RM0038) for a description of the clock tree.
3.1
MSI clock
The MSI clock signal is generated from an internal RC oscillator. Its frequency range can be
adjusted by software through the RCC_ICSCR register. Seven frequency ranges are
available: 65.5 kHz, 131 kHz, 262 kHz, 524 kHz, 1.05 MHz, 2.1 MHz (default value) and
4.2 MHz. Those frequencies are multiple values of 32.768 kHz.
The MSI clock is used as a system clock after a restart from reset.
The MSI RC oscillator has the advantage of providing a low-cost (no external components)
low-power clock source. It is used as a wakeup clock in low power modes to reduce power
consumption and wakeup time.
The MSIRDY flag in the RCC_CR register indicates wether 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 through the RCC_CR register (default is on).
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 through the RCC_ICSCR
register. Typically, this uses the HSE as reference (see RM0038 for details on clock
measurement with TIM9/TIM10/TIM11).
14/30
Doc ID 17496 Rev 5
AN3216
Need help?
Do you have a question about the STM32L152-EVAL and is the answer not in the manual?
Questions and answers