
Connectivity line devices: reset and clock control (RCC)
RM0008
126/1096
Doc ID 13902 Rev 12
Calibration
RC oscillator frequencies 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 T
A
= 25 °C.
After reset, the factory calibration value is loaded in the HSICAL[7:0] bits in the
If the application is subject to voltage or temperature variations this may affect the RC
oscillator speed. You can trim the HSI frequency in the application using the HSITRIM[4:0]
bits in the
Clock control register (RCC_CR)
.
The HSIRDY flag in the
Clock control register (RCC_CR)
indicates if the HSI RC is stable or
not. At startup, the HSI RC output clock is not released until this bit is set by hardware.
The HSI RC can be switched on and off using the HSION bit in the
.
The HSI signal can also be used as a backup source (Auxiliary clock) if the HSE crystal
oscillator fails. Refer to
Section 8.2.7: Clock security system (CSS) on page 128
8.2.3 PLLs
The main PLL provides a frequency multiplier starting from one of the following clock
sources:
●
HSI clock divided by 2
●
HSE or PLL2 clock through a configurable divider
Refer to
and
Clock control register (RCC_CR)
PLL2 and PLL3 are clocked by HSE through a specific configurable divider. Refer to
and
Clock configuration register2 (RCC_CFGR2)
The configuration of each PLL (selection of clock source, predivision factor and
multiplication factor) must be done before enabling the PLL. Each PLL should be enabled
after its input clock becomes stable (ready flag). Once the PLL is enabled, these parameters
can not be changed.
When changing the entry clock source of the main PLL, the original clock source must be
switched off only after the selection of the new clock source (done through bit PLLSRC in
the Clock configuration register (RCC_CFGR)).
An interrupt can be generated when the PLL is ready if enabled in the
8.2.4 LSE
clock
The LSE crystal is a 32.768 kHz Low Speed External crystal or ceramic resonator. It has the
advantage providing a low-power but highly accurate clock source to the real-time clock
peripheral (RTC) for clock/calendar or other timing functions.
The LSE crystal is switched on and off using the LSEON bit in
.
The LSERDY flag in the
Backup domain control register (RCC_BDCR)
indicates if the LSE
crystal is stable or not. At startup, the LSE crystal output clock signal is not released until
this bit is set by hardware. An interrupt can be generated if enabled in the