7. Reset and clock control (RCC)

The RCC block manages the clock and reset generation for the whole microcontroller.

The operating modes to which this section refers are defined in Section 6.6.1: Operating modes of the PWR block.

7.1 RCC main features

AHB-Lite bus interface

Reset block:

Clock generation block:


a. Note that when the USBHSPHY is used, the HSE frequency must be 16, 19.2, 20, 24, 26 or 32 MHz.

7.2 RCC block diagram

Figure 37 shows the RCC block diagram.

Figure 37. RCC block diagram

RCC block diagram showing internal blocks such as System reset control, Clock manager (CMU), System clock generation (SCGU), System clock enabling (SCEU), Peripheral kernel clock selection (PKSU), Peripheral clock enabling (PKEU), Register interface and control, and MUXES/DIVIDERS, along with external connections to PWR, IWDG1, WWDG1, NVIC, TAMP, TIM1/15/16/17, CRS, CPU, and PERx.

The block diagram represents the Reset and Clock Control (RCC) module containing:

RCC block diagram showing internal blocks such as System reset control, Clock manager (CMU), System clock generation (SCGU), System clock enabling (SCEU), Peripheral kernel clock selection (PKSU), Peripheral clock enabling (PKEU), Register interface and control, and MUXES/DIVIDERS, along with external connections to PWR, IWDG1, WWDG1, NVIC, TAMP, TIM1/15/16/17, CRS, CPU, and PERx.

7.3 RCC pins and internal signals

Table 54 lists the RCC inputs and output signals connected to package pins or balls.

Table 54. RCC input/output signals connected to package pins or balls

Signal nameSignal typeDescription
NRSTI/OSystem reset, can be used to provide reset to external devices
OSC32_INI32 kHz oscillator input
OSC32_OUTO32 kHz oscillator output
OSC_INISystem oscillator input
OSC_OUTOSystem oscillator output
MCO1OOutput clock 1 for external devices
MCO2OOutput clock 2 for external devices
I2S_CKINIExternal kernel clock input for digital audio interfaces: SPI/I2S, SAI, and ADF

The RCC exchanges a lot of internal signals with all components of the product, for that reason, Table 55 only shows the most significant internal signals.

Table 55. RCC internal input/output signals

Signal nameSignal typeDescription
rcc_itOGeneral interrupt request line
rcc_hsecss_itOHSE clock security failure interrupt
rcc_lsecss_itOLSE clock security failure interrupt
rcc_hsecss_failOEvent indicating that a HSE clock security failure is detected. This signal is connected to TIMERS.
rcc_lsecss_failOEvent indicating that a LSE clock security failure is detected. This signal is connected to TAMP, EXTI and PWR
nresetI/OApplication reset
sys_rstI/OSystem reset
iwdg_out_rstIReset line driven by the IWDG, indicating that a timeout occurred
wwdg_out_rstIReset line driven by the WWDG, indicating that a timeout occurred
pwr_bor_rstIBrownout reset generated by the PWR block
pwr_por_rstIPower-on reset generated by the PWR block
pwr_vsw_rstIPower-on reset of the VSW domain generated by the PWR block
rcc_perx_rstOReset generated by the RCC for the peripherals
pwr_wkupIWake-up domain request generated by the PWR and used to restore the domain clocks
rcc_pwd_reqOLow-power request generated by the RCC and used to set the circuit into low-power mode

Table 55. RCC internal input/output signals (Continued)

Signal nameSignal typeDescription
cpu_sleepISignals generated by the CPU, indicating if the CPU is in CRun, Sleep or CStop
cpu_deepsleepI
perx_ker_ckreqISignal generated by some peripherals in order to request the activation of their kernel clock
rcc_perx_ker_ckOKernel clock signals generated by the RCC, for some peripherals
rcc_perx_bus_ckOBus interface clock signals generated by the RCC for peripherals
rcc_bus_ckOClocks for APB, AHB and AXI bridges generated by the RCC
rcc_cpu_ckOClocks for the CPU, generated by the RCC
rcc_fclkO

7.4 RCC reset block functional description

The RCC handles the reset generation for the complete product, using events coming from different sources:

The reset scope depends on the source that generates the reset.

7.4.1 Reset from PWR block

The PWR block provides several reset signals to the RCC:

Note: The rcc_vcore_rst is generated from the pwr_vcore_ok signal, the main difference between these two signals is that rcc_vcore_rst remains asserted until the option byte loading operation is completed.

Refer to Table 56: Reset coverage summary for details.

Figure 38. Simplified reset circuit

Simplified reset circuit diagram showing the interaction between various peripherals and the RCC reset control logic across VDDCORE, VDD, and VSW domains.

The diagram illustrates the simplified reset circuit for the Reset and Clock Control (RCC) block, organized into three main voltage domains: VDDCORE, VDD, and VSW.

External blocks and their connections include:

MSv54102V3.

Simplified reset circuit diagram showing the interaction between various peripherals and the RCC reset control logic across VDDCORE, VDD, and VSW domains.

7.4.2 The system and application resets (sys_rst and nreset)

A system reset (sys_rst) resets most of the registers to their default values unless otherwise specified in the register description.

A system reset can be generated from one of the following sources:

The application reset (nreset) is similar to the system reset, but is it not asserted when the system exits from Standby.

Note: The SYSRESETREQ bit in Cortex®-M7 through the FPU application interrupt and reset control register, must be set to force a software reset on the device. Refer to the Cortex®-M7 with FPU technical reference manual for more details (see http://infocenter.arm.com).

7.4.3 The NRST reset

The NRST is active low. A pulse stretcher guarantees a minimum reset pulse duration of 20 µs (Refer to datasheet for details). In addition it is possible to extend the NRST assertion thanks to \(C_R\) capacitor. It is not recommended to let the NRST pin unconnected.

When it is not used, connect this pin to ground via a 10 to 100 nF capacitor (CR in Figure 38). As shown in Figure 38, a filter is also present in order to suppress spurs coming from NRST PAD.

7.4.4 Low-power mode security reset (lpwr_rst)

To prevent critical applications from mistakenly enter a low-power mode, two low-power mode security resets are available. When enabled through nRST_STOP and nRST_STANDBY option bytes, a system reset is generated if the following conditions are met:

case, whenever a Standby mode entry sequence is successfully executed, a system reset is generated.

When the Standby mode is entered, a flag is also set in the power controller.

LPWRRSTF bit in the RCC Reset status register (RCC_RSR) indicates that a low-power mode security reset occurred (see line #7 in Table 57).

lpwr_rst is activated when a low-power mode security reset due to CPU occurred.

Refer to Section 5.4: FLASH option bytes for additional information.

Refer to Section 6: Power control (PWR) for additional information and Table 45: Operating mode summary for the overview of the existing power modes.

7.4.5 Backup domain reset

A backup domain reset (pwr_vsw_rst) is generated when one of the following events occurs:

Refer to Section 6.4.4: Backup domain section of PWR block and to section “System security” for additional information.

7.4.6 Coresight debug reset

The coresight debug components can be reset in different ways:

Refer to Section 1.7.1: CoreSight Debug Reset for details.

7.4.7 Option bytes loading

As shown in Figure 38, the option bytes loading (OBL) sequence is triggered under the following conditions:

The system reset (sys_rst) can be released only when the option byte loading (OBL) is completed.

7.4.8 Peripheral resets

The application can individually reset any peripheral whenever requested. This can be done via the RCC_xxxxRSTR registers where “xxxx” is the name of the bus to which the peripheral is connected.

In order to reset a peripheral, the corresponding reset bit must be set to 1, and then set back to 0. There is no need to enable the peripheral clock in order to reset a peripheral.

Note also that the CRYP, SAES and HASH blocks can be reset in the case of a tamper event.

7.4.9 Reset coverage summary

Table 56: Reset coverage summary gives a detailed view of the reset coverage of the most important reset sources.

Note: When \(V_{DD}\) is not valid, \(V_{DDCORE}\) is also not valid.

Table 56. Reset coverage summary(1)
Functions that are resetMain reset lines
pwr_por_rst(2)rcc_vcore_rstsys_rstnreset(4)rcc_dbg_rstrcc_perx_rstrcc_vsw_rst
VDD domainX------
MCUXXX----
WWDGXXX----
IWDGX--X---
AXI/AHB Interconnections.XXX----
Debug components, including DBGMCU
Reset all the debug parts except the SWJ-DP function.
The SWJ-DP is reset by the NJTRST or rcc_vcore_rst resets.
The bit DCRT on DBGMCU_CR is reset with pwr_por_rst.
XX--X--
Hardware system init.
It includes the reload of the option bytes.
XX-----
RCCRCC Reset status register (RCC_RSR)X------
RCC clock control and status register (RCC_CSR)X------
RCC Backup domain control register (RCC_BDCR)------X
Other RCC registersXXX----
PWRPWR_CSR1------X
PWR_CSR2X------
PWR_CSR3
Individual bits of this register do not have the same reset condition, refer to the PWR section for details.
XXX----
PWR_WKUPCR, PWR_WKUPFR, PWR_WKUPEPRX--X---
Other registersXXX----
RTC------X
BKPSRAM
After a reset of the VSW domain, the backup regulator of the BKPSRAM is disabled, this function is controlled via the PWR block, BREN bit.
If the rcc_vsw_rst reset is due to a too low VSW voltage, the content of BKPSRAM is lost.
------X
SBSSBS_RSSCMDRX------
Other PeripheralsXXX--X-
  1. 1. The 'x' means that the function is reset by the corresponding reset line, the '-' means that the function is not reset by the corresponding reset line.
  2. 2. The pwr_por_rst is asserted when the voltage applied to VDD is not valid.
    When pwr_por_rst is asserted, the rcc_vcore_rst, NRST, the sys_rst and the nreset, are asserted as well.
  1. 3. The rcc_vcore_rst is asserted when the voltage applied to VDD is not valid, or when the system exits from Standby (because VDDCORE was switched off).
    When rcc_vcore_rst is asserted, the sys_rst, and the pwr_dbg_rst are asserted as well.
  2. 4. When nreset is asserted, the sys_rst is also asserted.

7.4.10 Reset source identification

The CPU can identify the reset source by checking the reset flags in the RCC_RSR register.

The CPU can reset the flags by setting RMVF bit.

Table 57 shows how the status bits of the RCC_RSR register behave according to the situation that generated the reset. For example, when an IWDG timeout occurs (line #6), if the CPU is reading the RCC_RSR register during the boot phase, both PINRSTF and IWDGRSTF bits are set, indicating that the IWDG also generated a pin reset.

Table 57. Reset source identification (RCC_RSR)(1)

#Situations generating a resetSBF (2)LPWRRSTFWWDGRSTFIWDGRSTFSFTRSTFPORRSTFPINRSTFBORRSTFOBLRSTF
1Power-on reset (pwr_por_rst)000001110
2Pin reset (NRST)000000100
3Brownout reset (pwr_bor_rst)000000110
4System reset generated by CPU (SFTRESET)000010100
5WWDG reset (wwdg_out_rst)001000100
6IWDG reset (iwdg_out_rst)000100100
7CPU erroneously enters Stop or Standby mode010000100
8The flash interface requested a reload of option bytes000000101
9The product exits from Standby100000100
  1. 1. Grayed cells highlight the register bits that are set.
  2. 2. The SBF bit is located into the PWR_CSR3 register of the PWR block

7.4.11 Power-on and wake-up sequences

For detailed diagrams refer to Section 6.4.1: System supply startup in the PWR section.

The time interval between the event that exits the product from a low-power and the moment where the CPU is able to execute code, depends on the system state and on its configuration. Figure 39 shows the most usual examples.

Power-on wake-up sequence

The power-on wake-up sequence shown in Figure 39 gives the most significant phases of the power-on sequence. It is the longest sequence since the circuit was not powered. Note that this sequence remains unchanged, whatever \(V_{BAT}\) was present or not.

Boot from pin reset

When a pin reset occurs, VDD is still present. As a result:

Note: The boot sequence is similar for pwr_bor_rst, lpwr_rst, STFRESET, iwdg_out_rst and wwdg_out_rst.

Boot from system Standby

When waking up from system Standby, the reference voltage is stable since VDD has not been removed. As a result, the regulator settling time is fast. Since VCORE was not present, the restart delay for the HSI, the Flash memory power recovery and the option byte reloading cannot be skipped.

Restart from system Stop

When restarting from Stop, VDD is still present. As a result, the sequence is mainly composed of two steps:

  1. 1. Regulator settling time to reach VOS low (default voltage).
  2. 2. HSI/CSI restart delay. This step can be skipped if HSIKERON or CSIKERON bit is set to 1 in the RCC register map.

Figure 39. Boot sequences versus system states

Timing diagram showing boot sequences for Power-on wake-up, PAD Reset, Wake-up from system Standby, and Wake-up from system Stop. It details the sequence of events including REG + BandGap, HSI, FL_PWR, FL_OPTB, and RUN phases over time.

The diagram illustrates four boot sequences over time:

Legend:

MSv54103V1

Timing diagram showing boot sequences for Power-on wake-up, PAD Reset, Wake-up from system Standby, and Wake-up from system Stop. It details the sequence of events including REG + BandGap, HSI, FL_PWR, FL_OPTB, and RUN phases over time.

7.5 RCC clock block functional description

The RCC provides a wide choice of clock generators:

The RCC offers a high flexibility for the application to select the appropriate clock for CPU and peripherals, in particular for peripherals that require a specific clock such as SPI/I2S and SAI.

To optimize the power consumption, each clock source can be switched ON or OFF independently.

The RCC provides up to 3 PLLs; each of them can be configured in integer, with or without SSCG, or fractional mode.

As shown in the Figure 40, the RCC offers two clock outputs (MCO1 and MCO2), with a great flexibility on the clock selection and frequency adjustment.

The SCGU block (system clock generation unit) contains several prescalers used to configure the CPU and bus matrix clock frequencies.

The PKSU block (peripheral kernel clock selection unit) provides several dynamic switches allowing a large choice of kernel clock distribution to peripherals.

The PKEU (peripheral kernel clock enable unit) and SCEU (system clock enable unit) blocks perform the peripheral kernel clock gating, and the bus interface/cores/bus matrix clock gating, respectively.

Figure 40. Top-level clock tree

Detailed schematic of Figure 40: Top-level clock tree diagram showing the Reset and Clock Control (RCC) block with internal and external oscillators (LSI, LSE, HSE, HSI, CSI, HSI48), clock division and multiplexing blocks (RTCSEL, MCO1SEL, MCO2SEL, CKPERSEL, PLLSRC, SW), PLL1/PLL2/PLL3 synthesis blocks, System Clock Generation/Enabling (SCGU, SCEU), and Peripheral Kernel Clock Selection/Enabling (PKSU, PKEU) leading to peripheral, CPU, and external clock destinations.

RCC

VDD domain
LSION or IWDG activated
LSI tempo → lsi_ck → To IWDG

VSW (Backup)
OSC32_IN / OSC32_OUT
LSEON → LSE tempo → lse_ck
CSS
RTCSEL mux (0: 0, 1: lse_ck, 2: lsi_ck [D], 3: hse_rtc_ck) → RTCEN gate → rcc_rtc_ck → To RTC/AWU

VDD domain
OSC_IN / OSC_OUT
RTCPRE (÷ 2 to 63) → hse_rtc_ck
HSEON → HSE tempo → hse_ck, hse_ker_ck
CSS
HSIKERON / HSION → HSI tempo → hsi_osc_ck
÷1024 → hsi_cal_ck
HSIDIV (÷1, 2, 4, 8) → hsi_ck, hsi_ker_ck
CSIKERON / CSION → CSI tempo → csi_ck, csi_ker_ck
÷4 → ucpd_ker_ck
HSI48ON → HSI48 → hsi48_ker_ck
÷128 → csi_cal_ck
CRS (Clock recovery system)

MCO Multiplexers:
MCO1SEL (0: hsi_ck, 1: lse_ck, 2: hse_ck, 3: pll1_q_ck, 4: hsi48_ck) → MCO1PRE (÷ 1 to 15) → MCO1
MCO2SEL (0: sys_ck, 1: pll2_p_ck, 2: hse_ck, 3: pll1_p_ck, 4: csi_ck, 5: lsi_ck) → MCO2PRE (÷ 1 to 15) → MCO2

System Clock & Peripheral Multiplexers:
CKPERSEL mux (0: hsi_ker_ck, 1: csi_ker_ck, 2: hse_ker_ck) → per_ck
SW mux (0: hsi_ck, 1: csi_ck [D], 2: hse_ck, 3: pll1_p_ck) → sys_ck → SCGU (System clock generation) → SCEU (System clock enabling) → To CPU, busses and peripherals

PLL Section:
PLLSRC mux (0: hsi_ck, 1: csi_ck, 2: hse_ck) → pll_ck
• ÷ DIVM1 → ref1_ck (1 to 16 MHz) → PLL1 (VCO ÷ 2, DIVN, FRACN, SSCG, DIVP, DIVQ, DIVR, DIVS, DIVT) → pll1_q_ck, pll1_s_ck
• ÷ DIVM2 → ref2_ck (1 to 16 MHz) → PLL2 (VCO ÷ 2, DIVN, FRACN, SSCG, DIVP, DIVQ, DIVR, DIVS, DIVT) → pll2_p_ck, pll2_q_ck, pll2_r_ck, pll2_s_ck, pll2_t_ck
• ÷ DIVM3 → ref3_ck (1 to 16 MHz) → PLL3 (VCO ÷ 2, DIVN, FRACN, SSCG, DIVP, DIVQ, DIVR, DIVS, DIVT) → pll3_p_ck, pll3_q_ck, pll3_r_ck, pll3_s_ck

Peripheral Clock Distribution:
PKSU (Peripheral kernel clock selection) inputs: pll[3:1]_q_ck, pll[3:2]_p_ck, pll[3:2]_r_ck, sys_ck, per_ck, hse_ker_ck, hsi_ker_ck, csi_ker_ck, lsi_ck, lse_ck, hsi48_ker_ck, ucpd_ker_ck, I2S_CKIN, ETH_MII_CK_TX, ETH_MII_CK_RX/ETH_RMII_REF_CLK, ETH_CLK
→ PKEU (Peripheral clock enabling) → To peripherals

Legend:
D The selected input can be changed on-the-fly without spurs on the output signal.
x Represents the selected mux input after a system reset.

MSv54104V4

Detailed schematic of Figure 40: Top-level clock tree diagram showing the Reset and Clock Control (RCC) block with internal and external oscillators (LSI, LSE, HSE, HSI, CSI, HSI48), clock division and multiplexing blocks (RTCSEL, MCO1SEL, MCO2SEL, CKPERSEL, PLLSRC, SW), PLL1/PLL2/PLL3 synthesis blocks, System Clock Generation/Enabling (SCGU, SCEU), and Peripheral Kernel Clock Selection/Enabling (PKSU, PKEU) leading to peripheral, CPU, and external clock destinations.

7.5.1 Clock naming convention

The RCC provides clocks to the complete circuit. To avoid misunderstanding, the following terms are used in this document:

The peripheral clocks are the clocks provided by the RCC to the peripherals. Two kinds of clock are available:

A peripheral receives from the RCC a bus interface clock in order to access its registers, and thus control the peripheral operation. This clock is generally the AHB, APB or AXI clock depending on which bus the peripheral is connected to. Some peripherals only need a bus interface clock (such as RNG, TIMx).

Some peripherals also require a dedicated clock to handle the interface function. This clock is named kernel clock. As an example, peripherals such as SAI must generate specific and accurate master clock frequencies, which require dedicated kernel clock frequencies. Another advantage of decoupling the bus interface clock from the specific interface needs, is that the bus clock can be changed without reprogramming the peripheral.

The CPU clock is the clock provided to the CPU. It is derived from the system clock (sys_ck).

The bus matrix clocks are the clocks provided to the different bridges (APB, AHB or AXI). These clocks are derived from the system clock (sys_ck).

7.5.2 Oscillators description

The table hereafter shows the oscillator states versus system modes, when the oscillators are enabled via registers. The term “available” means that the resource can be used if activated via registers.

Table 58. Oscillator states versus system modes

System modesVDD domainVSW domain
HSEHSIHSI48CSILSILSE
Exit from system resetOFFONOFFOFFAvailableAvailable
Exit from system StopOFFON (1)OFFON (2)AvailableAvailable
In Run/SleepAvailableAvailableAvailableAvailableAvailableAvailable
In StopOFFAvailable (3)OFFAvailable (4)AvailableAvailable
In StandbyOFFOFFOFFOFFAvailableAvailable
In VBATOFFOFFOFFOFFOFFAvailable
  1. 1. If STOPWUCK = 0 or STOPKERWUCK = 0
  2. 2. If STOPWUCK = 1 or STOPKERWUCK = 1
  3. 3. HSI can remain activated in Stop if HSIKERON = 1, or if a peripheral selecting HSI, generates a kernel clock request.
  4. 4. CSI can remain activated in Stop if CSIKERON = 1, or if the peripheral selecting CSI, generates a kernel clock request.

HSE oscillator

The HSE block allows the application to provide a very accurate high-speed clock for the product. The HSE can generate an internal clock from two possible sources:

Figure 41. HSE/LSE clock source

Figure 41: HSE/LSE clock source diagram showing External clock configuration with OSC_IN connected to external clock source and OSC_OUT HiZ, and Crystal/ceramic resonator configuration with crystal/ceramic resonator between OSC_IN and OSC_OUT along with load capacitors CL1 and CL2 to ground.
Figure 41: HSE/LSE clock source diagram showing External clock configuration with OSC_IN connected to external clock source and OSC_OUT HiZ, and Crystal/ceramic resonator configuration with crystal/ceramic resonator between OSC_IN and OSC_OUT along with load capacitors CL1 and CL2 to ground.

MSv54105V1

External clock source (HSE bypass)

In this mode the oscillator is not used, and an external clock source must be provided to OSC_IN pin. The external clock can be low swing (analog) or digital. The OSC_OUT pin must be left HI-Z (see Figure 41).

The external clock signal can be digital or analog (square, sinus or triangle). An analog clock signal with a reduced amplitude, is supported thanks to an internal clock squarer. The input signal must have a duty cycle close to 50%. Refer to the datasheet for additional information.

This mode is selected when HSEBYP = 1, and HSEON = 1. In case of an analog clock input (low swing) the HSEEXT must be set to 0, for a digital clock input, HSEEXT bits must be set to 1.

Figure 42. HSE clock generation

Figure 42: HSE clock generation block diagram inside RCC showing clock squarer, multiplexers controlled by HSEEXT and HSEBYP, HSE OSC, TEMPO and Ready logic, HSE_CSS, and output signals HSERDY, hse_ck, hse_osc_ck, and rcc_hsecss_fail.
Figure 42: HSE clock generation block diagram inside RCC showing clock squarer, multiplexers controlled by HSEEXT and HSEBYP, HSE OSC, TEMPO and Ready logic, HSE_CSS, and output signals HSERDY, hse_ck, hse_osc_ck, and rcc_hsecss_fail.

MSv54106V2

External crystal/ceramic resonator

A crystal/resonator can be connected as shown in Figure 41: the crystal/resonator and the load capacitors must be placed as close as possible to the oscillator pins in order to minimize output distortion and startup stabilization time. The loading capacitance values must be adjusted according to the selected crystal or ceramic resonator. Refer to the electrical characteristics section of the datasheet for more details.

The oscillator mode is enabled by setting the HSEBYP bit to 0 and HSEON bit to 1.

HSE ready logic

The HSERDY flag indicates when a valid clock is available at HSE output (hse_ck). When the HSE is enabled (HSEON set to '1'), the HSERDY flag goes to '1' when 256 valid cycles of HSE have been detected. The hse_ck clock is not released until HSERDY goes to 1.

An interrupt can be generated if enabled in the RCC clock source interrupt enable register (RCC_CIER).

HSE controls

The HSE can be switched ON and OFF through the HSEON bit.

The hardware does not allow modifying HSEON bit if one of the condition is met:

The hardware does not allow changing the values of HSEBYP, and HSEEXT when HSEON = 1. Bits HSEBYP, HSEEXT and HSEON are located into the RCC register map.

The HSE is automatically disabled by hardware when the system enters Stop or Standby mode (See Table 58: Oscillator states versus system modes).

In addition, the HSE clock can be driven to the MCO1 and MCO2 outputs and used as clock source for other application components.

Programming sequence

In order initialize the HSE, the application must follow the sequence hereafter:

LSE oscillator

The LSE block allows the application to provide a very accurate low-frequency clock for the product. The LSE can generate an internal clock from two possible sources:

External clock source (LSE bypass)

In this mode, the oscillator is not used, and an external clock source must be provided to OSC32_IN pin. The OSC32_OUT pin must be left HI-Z (see Figure 41).

The external clock signal can have a frequency up to 1 MHz and be digital or analog (square, sinus or triangle). An analog clock signal with a reduced amplitude, is supported thanks to an internal clock squarer. The input signal must have a duty cycle close to 50%. Refer to the datasheet for additional information.

This mode is selected by setting the LSEBYP and LSEON bits to 1. In case of an analog clock input (low swing) the LSEEXT must be set to 0, for a digital clock input, LSEEXT bits must be set to 1.

Figure 43. LSE clock generation

Block diagram of LSE clock generation within the RCC. The diagram shows the internal structure of the LSE block. OSC32_IN and OSC32_OUT pins are connected to the LSE OSC. A clock squarer is also connected to the input path. A multiplexer selects between the LSE OSC and the clock squarer output based on the LSEEXT signal (locked by LSEON). Another multiplexer selects between the LSE OSC and the external input based on the LSEBYP signal (locked by LSEON). The output of this second multiplexer goes to TEMPO and Ready logic, which produces the lse_ck signal. The lse_ck signal is also connected to the LSE_CSS block, which outputs the rcc_lsecss_fail signal. The LSE block is labeled with Vsw domain. The LSEON signal is an enable input to the entire block.

MSV54107V2

Block diagram of LSE clock generation within the RCC. The diagram shows the internal structure of the LSE block. OSC32_IN and OSC32_OUT pins are connected to the LSE OSC. A clock squarer is also connected to the input path. A multiplexer selects between the LSE OSC and the clock squarer output based on the LSEEXT signal (locked by LSEON). Another multiplexer selects between the LSE OSC and the external input based on the LSEBYP signal (locked by LSEON). The output of this second multiplexer goes to TEMPO and Ready logic, which produces the lse_ck signal. The lse_ck signal is also connected to the LSE_CSS block, which outputs the rcc_lsecss_fail signal. The LSE block is labeled with Vsw domain. The LSEON signal is an enable input to the entire block.

External crystal/ceramic resonator source (LSE crystal)

The LSE clock is generated from a 32.768 kHz crystal or ceramic resonator. It has the advantage to provide a low-power highly accurate clock source to the real-time clock (RTC) for clock/calendar or other timing functions. A crystal/resonator can be connected as shown in Figure 41: the crystal/resonator and the load capacitors must be placed as close as possible to the oscillator pins in order to minimize output distortion and startup stabilization time. The loading capacitance values must be adjusted according to the selected crystal or ceramic resonator. Refer to the electrical characteristics section of the datasheet for more details.

The oscillator mode is selected by setting LSEBYP bit to 0 and LSEON bit to 1.

The LSE also offers a programmable driving capability (LSEDRV[1:0]) that can be used to modulate the amplifier driving capability. This driving capability is chosen according to the external crystal/ceramic component requirement to insure a stable oscillation.

The driving capability must be set before enabling the LSE oscillator.


Warning: It is not allowed to change the driving capability when the LSE is enabled. The LSE behavior is not guaranteed in that case.


LSE ready logic

The LSE offers a LSERDY flag which indicates whether the LSE clock is available or not. When the LSE is enabled (LSEON set to 1) the LSERDY flag goes to 1 when certain amount of valid cycles of LSE clock have been detected. The lse_ck clock is not released until LSERDY goes to 1.

When LSEBYP = 0, the RCC waits 4096 clocks cycles before activating the LSERDY flag, when LSEBYP = 1, the RCC waits 8 clocks cycles.

An interrupt, can be generated if enabled in the RCC clock source interrupt enable register (RCC_CIER).

LSERDY bit is located into the RCC Backup domain control register (RCC_BDCR).

LSE controls

The LSE control bits LSEBYP, LSEEXT, LSEDRV[1:0] and LSEON are located into the RCC Backup domain control register (RCC_BDCR). This register is write-protected by DBP bit of PWR_CR1 register. In order to modify the RCC_BDCR register, the bit DBP must be set 1.

The LSE oscillator is switched ON and OFF using the LSEON bit.

The LSE remains enabled when the system enters Stop, Standby or VBAT mode (See Table 58: Oscillator states versus system modes).

The hardware does not allow changing the values of LSEBYP, and LSEEXT when LSEON = 1.

In addition, the LSE clock can be driven to the MCO1 output and used as clock source for external components.

LSE Programming sequence

In order initialize the LSE, the application must follow the sequence hereafter:

If the RTC is used, the LSE bypass must not be configured in digital mode but in low swing analog mode (default value after reset).

HSI oscillator

The HSI block provides the default clock to the product.

The HSI is a high-speed internal RC oscillator that can be used directly as system clock, peripheral clock, or as PLL input. A predivider allows the application to select an HSI output frequency of 8, 16, 32 or 64 MHz. This predivider is controlled by the HSIDIV.

The HSI advantages are the following:

The HSI frequency, even with frequency calibration, is less accurate than an external crystal oscillator or ceramic resonator.

HSI controls

The HSI can be switched ON and OFF using the HSION bit.

The hardware does not allow modifying HSION bit if one of the condition is met:

Note that the HSIDIV cannot be changed if the HSI is selected as reference clock for at least one enabled PLL (PLLxON bit set to 1). In that case the hardware does not update the HSIDIV with the new value. However it is possible to change the HSIDIV if the HSI is used directly as system clock.

The HSIRDY flag indicates if the HSI is stable or not. At startup, the HSI output clock is not released until this bit is set by hardware.

The HSI clock can also be used as a backup source (auxiliary clock) if the HSE fails (refer to Section : CSS on HSE).

The HSI can be disabled or not when the system enters Stop mode (See Table 58: Oscillator states versus system modes).

In addition, the HSI clock can be driven to the MCO1 output and used as clock source for other application components.

Care must be taken when the HSI is used as kernel clock for communication peripherals, the application must take into account the following parameters:

HSION, HSIRDY and HSIDIV bits are located in the RCC register map.

HSI calibration

RC oscillator frequencies can vary from one chip to another due to manufacturing process variations. That is why each device is factory calibrated by STMicroelectronics to achieve an accuracy of \(ACC_{HSI}\) (refer to the product datasheet for more information).

After a power-on reset, or at the exit of Standby mode, the factory calibration value is loaded in the HSICAL[11:0] bits.

If the application is subject to voltage or temperature variations, this may affect the RC oscillator frequency. The user application can trim the HSI frequency using the HSITRIM[6:0] bits.

Note: HSICAL[11:0] and HSITRIM[6:0] bits are located in the RCC HSI calibration register (RCC_HSICFGR).

Figure 44. HSI calibration flow

Block diagram of HSI calibration flow. It shows the interaction between Engineering option bytes (factory calibration), RCC, and HSI. The Engineering option bytes provide FLASH_HSI_opt[11:9] and FLASH_HSI_opt[8:0] to the RCC. Inside the RCC, these are added to HSITRIM[6:0] (unsigned) from the RCC_HSICFGR register. The result is sent to the HSI's CAL[11:0] register. The RCC_HSICFGR register also outputs HSICAL[11:9] and HSICAL[8:0] to the HSI.

The diagram illustrates the HSI calibration flow. On the left, a box labeled 'Engineering option bytes (factory calibration)' provides two inputs: 'FLASH_HSI_opt[11:9]' and 'FLASH_HSI_opt[8:0]'. These inputs enter a larger box labeled 'RCC'. Inside the 'RCC' box, the 'FLASH_HSI_opt[8:0]' input is fed into an adder (+). The other input to the adder is 'HSITRIM[6:0] (unsigned)', which is sourced from the 'RCC_HSICFGR' register. The output of the adder is sent to the 'HSI' box, specifically to its 'CAL[11:0]' register. Additionally, the 'RCC_HSICFGR' register outputs 'HSICAL[11:9]' and 'HSICAL[8:0]' to the 'HSI' box. The 'RCC' box also contains the 'FLASH_HSI_opt[11:9]' input. The diagram is labeled 'MSv48151V2' in the bottom right corner.

Block diagram of HSI calibration flow. It shows the interaction between Engineering option bytes (factory calibration), RCC, and HSI. The Engineering option bytes provide FLASH_HSI_opt[11:9] and FLASH_HSI_opt[8:0] to the RCC. Inside the RCC, these are added to HSITRIM[6:0] (unsigned) from the RCC_HSICFGR register. The result is sent to the HSI's CAL[11:0] register. The RCC_HSICFGR register also outputs HSICAL[11:9] and HSICAL[8:0] to the HSI.

CSI oscillator

The CSI is a low-power RC oscillator that can be used directly as system clock, peripheral clock, or PLL input.

The CSI advantages are the following:

The CSI provides a clock frequency of about 4 MHz, while the HSI is able to provide a clock up to 64 MHz.

CSI frequency, even with frequency calibration, is less accurate than an external crystal oscillator or ceramic resonator.

CSI controls

The CSI can be switched ON and OFF through the CSION bit. The CSIRDY flag indicates whether the CSI is stable or not. At startup, the CSI output clock is not released until this bit is set by hardware.

The hardware does not allow modifying CSION bit if one of the condition is met:

The CSI can be disabled or not when the system enters Stop mode (See Table 58: Oscillator states versus system modes).

In addition, the CSI clock can be driven to the MCO2 output and used as clock source for other application components.

Even if the CSI settling time is faster than the HSI, care must be taken when the CSI is used as kernel clock for communication peripherals: the application must take into account the following parameters:

Note: CSION and CSIRDY bits are located in the RCC register map.

CSI 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 STMicroelectronics to achieve accuracy of ACCCSI (refer to the product datasheet for more information).

After a power-on reset, or at the exit of Standby mode, the factory calibration value is loaded in the CSICAL[7:0] bits.

If the application is subject to voltage or temperature variations, this may affect the RC oscillator frequency. The user application can trim the CSI frequency using the CSITRIM[5:0] bits.

Note: Bits CSICAL[7:0] and CSITRIM[5:0] are located into the RCC CSI calibration register (RCC_CSICFGR)

Figure 45. CSI calibration flow

Figure 45. CSI calibration flow. A block diagram showing 'Engineering option bytes (factory calibration)' feeding 'FLASH_CSI_opt[7:0]' into an adder (+) inside the 'RCC' box. The adder output 'csi_cal[7:0]' goes to 'CSI' box as 'CAL[7:0]' and branches back as 'CSICAL[7:0] (unsigned)' to 'RCC_CSICFGR'. 'RCC_CSICFGR' also outputs 'CSITRIM[5:0] (unsigned)' into the adder. Bottom right has reference MSv48152V1.
graph LR
  subgraph Main[ ]
    direction LR
    EOB["Engineering
option bytes
(factory calibration)"] -->|"FLASH_CSI_opt[7:0]"| ADD(("+")) subgraph RCC["RCC"] ADD -->|"csi_cal[7:0]"| CAL_SPLIT{""} CAL_SPLIT -->|"CAL[7:0]"| CSI["CSI
CAL[7:0]"] CAL_SPLIT -->|"CSICAL[7:0]
(unsigned)"| REG["RCC_CSICFGR"] REG -->|"CSITRIM[5:0]
(unsigned)"| ADD end end
Figure 45. CSI calibration flow. A block diagram showing 'Engineering option bytes (factory calibration)' feeding 'FLASH_CSI_opt[7:0]' into an adder (+) inside the 'RCC' box. The adder output 'csi_cal[7:0]' goes to 'CSI' box as 'CAL[7:0]' and branches back as 'CSICAL[7:0] (unsigned)' to 'RCC_CSICFGR'. 'RCC_CSICFGR' also outputs 'CSITRIM[5:0] (unsigned)' into the adder. Bottom right has reference MSv48152V1.

HSI48 oscillator

The HSI48 is an RC oscillator delivering a 48 MHz clock that can be used directly as kernel clock for some peripherals.

The HSI48 oscillator mainly aims at providing an accurate clock to the USB Full-Speed peripherals 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 adjust the oscillator frequency on-the-fly, with a very small granularity. It is possible to read the calibration value provided to the HSI48 via RCC clock recovery RC register (RCC_CRRCR). The HSI48TRIM value can be adjusted through the CRS block, for more details, refer to Section 9: Clock recovery system (CRS).

Figure 46. HSI48 calibration flow

Block diagram of HSI48 calibration flow. The CRS block outputs HSI48TRIM[5:0] (unsigned) to an adder within the RCC block. The Engineering option bytes (factory calibration) block outputs FLASH_HSI48_opt[9:0] to the same adder. The adder's output is hsi48_cal[9:0], which is stored in the HSI48 CAL[9:0] block. The adder's output is also labeled HSI48CAL[9:0] (unsigned) and is written to the RCC_CRRCR register.
graph TD
    CRS[CRS] -- "HSI48TRIM[5:0]
(unsigned)" --> Adder((+)) subgraph RCC [RCC] Adder((+)) HSI48_CAL[HSI48 CAL[9:0]] RCC_CRRCR[RCC_CRRCR] end Eng[Engineering option bytes
(factory calibration)] -- "FLASH_HSI48_opt[9:0]" --> Adder Adder -- "hsi48_cal[9:0]" --> HSI48_CAL Adder -- "HSI48CAL[9:0]
(unsigned)" --> RCC_CRRCR

MSv54108V1

Block diagram of HSI48 calibration flow. The CRS block outputs HSI48TRIM[5:0] (unsigned) to an adder within the RCC block. The Engineering option bytes (factory calibration) block outputs FLASH_HSI48_opt[9:0] to the same adder. The adder's output is hsi48_cal[9:0], which is stored in the HSI48 CAL[9:0] block. The adder's output is also labeled HSI48CAL[9:0] (unsigned) and is written to the RCC_CRRCR register.

The HSI48 oscillator is disabled as soon as the system enters Stop or Standby mode. When the CRS is not used, this oscillator is free running and thus subject to manufacturing process variations. This is why each device is factory calibrated by STMicroelectronics to achieve an accuracy of \(ACC_{HSI48}\) (refer to the product datasheet for more information).

The HSI48RDY flag indicates whether the HSI48 oscillator is stable or not. At startup, the HSI48 output clock is not released until this bit is set by hardware.

After a power-on reset, or at the exit of Standby mode, the factory calibration value is loaded into the HSI48.

The HSI48 can be switched ON and OFF using the HSI48ON bit.

The HSI48 clock can also be driven to the MCO1 multiplexer and used as clock source for other application components.

Note: HSI48ON and HSI48RDY bits are located in the RCC register map.

LSI oscillator

The LSI acts as a very-low-power clock source that can be kept running when the system is in Stop or Standby mode for the independent watchdog (IWDG) and auto-wake up unit (AWU). The clock frequency is around 32 kHz. For more details, refer to the electrical characteristics section of the datasheet.

The LSI can be switched ON and OFF using the LSION bit. The LSIRDY flag indicates whether the LSI oscillator is stable or not. If an independent watchdog is started either by hardware or software, the LSI is forced ON and cannot be disabled.

The LSI remains enabled when the system enters Stop or Standby mode (See Table 58: Oscillator states versus system modes).

At LSI startup, the clock is not provided until the hardware sets the LSIRDY bit. An interrupt can be generated if enabled in the RCC clock source interrupt enable register (RCC_CIER).

In addition, the LSI clock can be driven to the MCO2 output and used as a clock source for other application components.

Note: Bits LSION and LSIRDY bits are located into the RCC clock control and status register (RCC_CSR).

7.5.3 Clock security system (CSS)

The RCC offers a clock security system for the HSE and LSE oscillators. The clock security systems are capable of detecting a failure on HSE and LSE oscillators. The figure hereafter shows how this function interact with other blocks.

Figure 47. LSE and HSE CSS function

Block diagram of LSE and HSE CSS function showing interactions between RCC, RTC, TAMP, EXTI, PWR, BSRSRAM, and NVIC.

The diagram illustrates the Clock Security System (CSS) function for the LSE and HSE oscillators. It shows the following components and their interactions:

Logic gates (OR and AND gates) are used to combine signals from the TAMP and SBS blocks before they are sent to the NVIC and BSRSRAM.

MSv54109V2.

Block diagram of LSE and HSE CSS function showing interactions between RCC, RTC, TAMP, EXTI, PWR, BSRSRAM, and NVIC.

CSS on HSE

The clock security system can be enabled by software via the HSECSSON bit. The HSECSSON bit can be enabled even when the HSEON is set to 0.

The CSS on HSE is activated when the HSE is enabled and ready, and the software sets the HSECSSON bit to 1. The CSS on HSE is no longer working when the HSE is disabled. For example, this function does not work when the system is in Stop mode.

It is not possible to clear directly the HSECSSON bit by software. The HSECSSON bit is cleared by hardware when a system reset occurs or when the system enters Standby mode (see Section 7.4.2: The system and application resets (sys_rst and nreset)).

When the CSS on HSE is enabled, the following actions are done by the RCC if a failure is detected:

See details on Section : Clock distribution for SDMMCs, FMC, and XSPIs.

CSS on LSE

A clock security system on the LSE oscillator can be enabled by software by programming the LSECSSON bit in the RCC Backup domain control register (RCC_BDCR).

This bit is disabled by hardware if one of the following condition is met:

The software can also disable the clock security system after a LSE failure detection.

The CSS on LSE works in all modes (Run, Stop and Standby) including VBAT.

The LSECSS provides a re-arm feature, offering to the software the possibility to re-arm the LSECSS and re-enable the LSE clock when a failure has been detected. This feature allows the application to decide if the LSE is to be provided again to the RTC even if a failure occurred, or if another action must be performed. For example the application can decide to reset the \(V_{SW}\) domain only if a certain amount of consecutive LSE failures occurred, within a time window.

The LSECSS offers two flag signals:

The sequence hereafter describes the LSE enabling sequence with the clock security system enabled.

Note: The LSECSSON bit must be enabled after the LSE is enabled (LSEON bit set by software) and ready (LSERDY set by hardware), and after the RTC clock has been selected through the RTCSEL bit.

If a failure is detected on the LSE, the hardware does the following:

In the software side, different actions can be taken according to the application requirements. Three different cases are described hereafter in order to illustrate the hardware behavior, they can also be combined. The application can also decide to handle LSE failure differently.

Case A:

The application no longer wants to use LSE when a failure is detected:

Case B:

The application wants to re-initialize the VSW domain:

Case C:

The application tries to re-use LSE when a failure is detected:

All bits used in this sequences (except DBP) are located into RCC Backup domain control register (RCC_BDCR).

7.5.4 Clock output generation (MCO1/MCO2)

Two microcontroller clock output pins MCO1 and MCO2, are available. A clock source can be selected for each output. The selected clock can be divided thanks to configurable prescaler (refer to Figure 40 for additional information on signal selection).

MCO1 and MCO2 outputs are controlled via MCO1PRE[3:0], MCO1SEL[2:0], MCO2PRE[3:0] and MCO2SEL[2:0] located in the RCC clock configuration register (RCC_CFGR).

The GPIO port corresponding to each MCO pin must be programmed in alternate function mode.

The dividers MCO1PRE and MCO2PRE, provide a clock with a duty cycle of 50% for even divisions values. More generally the duty cycle is given by the following formula:

\[DC(\%) = \frac{\text{FLOOR}\left(\frac{\text{MCOxPRE}}{2}\right)}{\text{MCOxPRE}} \times 100\]

For MCOxPRE = 2 to 15.

Note that the MCO1 and MCO2 outputs are available in Run and Stop modes.

Caution: The clock provided to the MCOs outputs must not exceed the maximum PAD speed, refer to the product datasheet for information about the supported PAD speed.

The table hereafter show the signals available on each MCO output.

Table 59. Oscillator states versus system modes

MCO1SELMCO2SEL
Pos.Clock sourcePos.Clock source
0hsi_ck0sys_ck
1lse_ck1pll2_p_ck
2hse_ck2hse_ck
3pll1_q_ck3pll1_p_ck
4hsi48_ck4csi_ck
--5lsi_ck

7.5.5 PLL description

The RCC features three PLLs:

The PLLs integrated into the RCC are completely independent. They offer the following features:

For better flexibility, all PLLs offer two VCOs (VCOH and VCOL), the application can select the wanted VCO via PLLxVCOSEL bit.

The frequency of the reference clock provided to the PLLs (refx_ck) must range from 1 to 16 MHz. The DIVMx dividers of the RCC PLLs clock source selection register (RCC_PLLCKSELR) must be properly programmed in order to match this condition. In addition, the PLLxRGE[1:0] field of the RCC PLLs configuration register (RCC_PLLCFGR) must be set according to the reference input frequency to guarantee an optimal performance of the PLL.

The user application can then configure the proper VCO. VCOL must be chosen when the reference clock frequency is lower than 2 MHz.

To reduce the power consumption, it is recommended to configure the VCO output to the smaller range.

Figure 48. PLL block diagram Figure 48. PLL block diagram. Block diagram of PLLs (x = 1, 2 or 3) featuring reference clock refx_ck input to PFD + CP with PLLxRGE settings, LPF, dual VCO (VCOH 384 to 1672 MHz with /2 divider and VCOL 150 to 420 MHz) selectable by PLLxVCOSEL, feeding vcox_ck through post-dividers DIVP, DIVQ, DIVR, DIVS, DIVT with enable signals DIVPEN, DIVQEN, DIVREN, DIVSEN, DIVTEN producing clocks pllx_p_ck, pllx_q_ck, pllx_r_ck, pllx_s_ck, pllx_t_ck. Includes feedback divider DIVN (+ 12,...,128,...,420), Sigma-Delta Modulator (SDM), and SSCG modulation block.
Figure 48. PLL block diagram. Block diagram of PLLs (x = 1, 2 or 3) featuring reference clock refx_ck input to PFD + CP with PLLxRGE settings, LPF, dual VCO (VCOH 384 to 1672 MHz with /2 divider and VCOL 150 to 420 MHz) selectable by PLLxVCOSEL, feeding vcox_ck through post-dividers DIVP, DIVQ, DIVR, DIVS, DIVT with enable signals DIVPEN, DIVQEN, DIVREN, DIVSEN, DIVTEN producing clocks pllx_p_ck, pllx_q_ck, pllx_r_ck, pllx_s_ck, pllx_t_ck. Includes feedback divider DIVN (+ 12,...,128,...,420), Sigma-Delta Modulator (SDM), and SSCG modulation block.

The PLLs can be enabled by setting PLLxON to 1. The PLLxRDY bits indicate that the PLL is ready (means locked).

The DIVN loop divider must be programmed to achieve the expected frequency at VCO output. The VCO output range must be respected.

PLLs have a divider-by-2, at VCOH output, insuring that the clock provided to the post-dividers has a duty-cycle of 50%.

The frequency of the clocks provided by the PLLs can also be adjusted thanks to post-divider DIVP, DIVQ, DIVR, DIVS and DIVT. The post-divider values can be changed without disabling the PLLs, if their respective enable bits are set to 0.

The post-dividers provide clocks with 50% duty-cycle in the following conditions:

PLL programming recommendations

This section is providing a list of recommendations to follow in order to guarantee a good usage of the PLLs. Note that programming examples are given in Section 1.6.2: PLL programming.

PLLxSEN and PLLxTEN can be set to 1 only if the corresponding bit PLLON is already set to 1 and the PLL is ready.

Refer to section Section 7.7.1: PLL programming procedure for additional information.

PLL protections

The PLLs are disabled by hardware when the system enters Stop or Standby mode

PLLs using HSE as reference clock are also disabled by hardware if an HSE failure is detected.

Note: The refx_ck clock is provided to the PLLx when the corresponding PLLON bit is set to 1.

The PLLs can work in 3 different modes:

Using the PLLs in integer mode

The PLL is working in integer mode when the sigma-delta modulator (SDM) is loaded with a 0, and the bit PLLxSSCGEN = 0.

In order to load 0 into the SDM, the user has to perform the following sequence:

The bits FRACN[12:0] are located in the RCC_PLLxFRACR registers.

The VCO frequency (\(F_{VCO}\)) and output frequencies expressions are given by the following table:

Table 60. VCO frequency and output frequency in integer mode
PLLxVCOSEL = 0PLLxVCOSEL = 1
\(F_{VCO} = 2 \times F_{ref\_ck} \times (DIVN + 1)\)\(F_{VCO} = F_{ref\_ck} \times (DIVN + 1)\)
\[F_{pll\_y\_ck} = \frac{F_{VCO}}{2 \times (DIVy + 1)}\]

with y = P, Q, R, S or T

\[F_{pll\_y\_ck} = \frac{F_{VCO}}{(DIVy + 1)}\]

with y = P, Q, R, S or T

Refer to section Section 7.7.1: PLL programming procedure for additional information.

Using the PLLs in fractional mode

The fractional mode is activated when the value loaded into the SDM is different from 0, and the bit PLLxSSCGEN = 0.

The SDM value can be updated at anytime by the application by executing the following sequence:

The sigma delta modulator is designed in order to minimize the jitter impact while allowing very small frequency steps.

When the PLL is used in fractional mode, the DIVN divider must be initialized before enabling the PLL.

This feature can be used either to generate a specific frequency, with a good accuracy from any crystal value, or to perform a fine tuning of the frequency on-the-fly.

The VCO frequency (\(F_{VCO}\)) and output frequencies expressions are given by the following table:

Table 61. VCO frequency and output frequency in fractional mode

PLLxVCOSEL = 0PLLxVCOSEL = 1
\[F_{VCO} = 2 \times F_{ref\_ck} \times \left( DIVN + 1 + \frac{FRACN}{2^{13}} \right)\]
\[F_{VCO} = F_{ref\_ck} \times \left( DIVN + 1 + \frac{FRACN}{2^{13}} \right)\]
\[F_{pll\_y\_ck} = \frac{F_{VCO}}{2 \times (DIVy + 1)}\]

with y = P, Q, R, S or T

\[F_{pll\_y\_ck} = \frac{F_{VCO}}{(DIVy + 1)}\]

with y = P, Q, R, S or T

Refer to section Section 7.7.1: PLL programming procedure for additional information.

Using the PLLs in spread spectrum mode

The spread spectrum mode is activated when the SDM loaded with 0, and the bit PLLxSSCGEN = 1. This feature is available on all PLLs.

The VCOH must be selected when the spread spectrum mode is activated. VCOH is selected by setting PLLxVCOSEL to 0. PLLxVCOSEL are located into the RCC clock configuration register (RCC_CFGR).

The spread spectrum technique consist of modulating the VCO frequency with a low-frequency signal (in our case a triangular signal), in order to spread the clock energy into a wider frequency band. As a consequence, the amount of emitted EMI peaks is reduced.

The parameters of the spread spectrum modulation are adjusted via the following fields:

The bits MODPER[12:0], INCSTEP[14:0] and SPREADSEL are located into the RCC_PLLxSSCGR registers with x=1, 2 or 3.

Figure 49 shows the signal modulating the nominal frequency (\(F_N\)), when SPREADSEL = 0 (center-spread) and SPREADSEL = 1 (down-spread). The nominal frequency is the frequency output by the PLL in integer mode, when no clock spreading is applied.

Setting the SPREADSEL bit to '1' (down-spread) guarantees that the PLL output frequency does not exceed the programmed frequency value when the SSCG is enabled.

Figure 49. Spread-spectrum modulation

Figure 49: Spread-spectrum modulation. Two diagrams show frequency vs. time (t). The left diagram, labeled 'center-spread', shows a triangular wave centered on a nominal frequency F_N. The peak-to-peak frequency deviation is M_D, and the period of the triangular wave is F_MOD. The right diagram, labeled 'down-spread', shows a triangular wave starting at F_N and spreading downwards. The peak-to-peak frequency deviation is M_D, and the period of the triangular wave is F_MOD. Both diagrams show the frequency axis and time axis (t).
Figure 49: Spread-spectrum modulation. Two diagrams show frequency vs. time (t). The left diagram, labeled 'center-spread', shows a triangular wave centered on a nominal frequency F_N. The peak-to-peak frequency deviation is M_D, and the period of the triangular wave is F_MOD. The right diagram, labeled 'down-spread', shows a triangular wave starting at F_N and spreading downwards. The peak-to-peak frequency deviation is M_D, and the period of the triangular wave is F_MOD. Both diagrams show the frequency axis and time axis (t).

The peak modulation depth (in percentage) is given by the following formula:

\[M_D (\%) = \frac{\text{MODPER} \times \text{INCSTEP} \times 100 \times 5}{(2^{15} - 1) \times (\text{DIVN} + 1)}\]

Note that MODPER × INCSTEP must not exceed (2¹⁵-1).

The modulation frequency (\(F_{\text{mod}}\)) is given by:

\[F_{\text{mod}} = \frac{F_{\text{ck\_ref}}}{4 \times \text{MODPER}}\]

Note: Refer to the datasheet of the product for the recommended modulation frequency range

In order to use the spread spectrum feature, the user has to do the following:

\[\text{MODPER} = \text{ROUND}\left(\frac{F_{\text{ck\_ref}}}{4 \times F_{\text{mod}}}\right)\]

\[\text{INCSTEP} = \text{ROUND}\left(\frac{(2^{15} - 1) \times M_D \times (\text{DIVN} + 1)}{100 \times 5 \times \text{MODPER}}\right)\]

Check that MODPER × INCSTEP does not exceed (2¹⁵-1).

The user can check \(F_{MIN}\), \(F_{MAX}\) and \(F_C\) as follow:

Figure 50 shows the digital signal generated by Triangular Waveform Generator (TWG block), and the way of MODPER and INCSTEP are changing the triangular waveform.

Figure 50. Triangular waveform generator

Figure 50: Triangular waveform generator diagram. The diagram shows a triangular waveform (TWG output) oscillating between F_MAX and F_MIN. The center frequency is F_C = F_N. The period of the waveform is F_mod = F_ref_ck / (4 x MODPER). The modulation depth is indicated as (2^15 - 1) for F_MAX and -2^15 for F_MIN. The waveform is generated by a counter that increments by INCSTEP each Tref_ck period. The counter starts at 0 and increments to 2, then wraps back to 0. The diagram also shows the 'center-spread' mode.

The diagram illustrates the Triangular Waveform Generator (TWG) output. The output signal is a triangular wave oscillating between \(F_{MAX}\) and \(F_{MIN}\). The center frequency is \(F_C = F_N\). The period of the waveform is \(F_{mod} = F_{ref\_ck} / (4 \times MODPER)\). The modulation depth is indicated as (2¹⁵-1) for \(F_{MAX}\) and -2¹⁵ for \(F_{MIN}\). The waveform is generated by a counter that increments by INCSTEP each \(T_{ref\_ck}\) period. The counter starts at 0 and increments to 2, then wraps back to 0. The diagram also shows the 'center-spread' mode.

Figure 50: Triangular waveform generator diagram. The diagram shows a triangular waveform (TWG output) oscillating between F_MAX and F_MIN. The center frequency is F_C = F_N. The period of the waveform is F_mod = F_ref_ck / (4 x MODPER). The modulation depth is indicated as (2^15 - 1) for F_MAX and -2^15 for F_MIN. The waveform is generated by a counter that increments by INCSTEP each Tref_ck period. The counter starts at 0 and increments to 2, then wraps back to 0. The diagram also shows the 'center-spread' mode.

Refer to section Section 7.7.1: PLL programming procedure for additional information.

7.5.6 System clock (sys_ck)

System clock selection

After a system reset, the HSI is selected as system clock and all PLLs are switched OFF. When a clock source is used for the system clock, it is not possible for the software to disable the selected source via the xxxON bits.

Of course, the system clock can be stopped by the hardware when the system enters Stop or Standby mode.

When the system is running, the user application can select the system clock (sys_ck) among the 4 following sources:

This function is controlled by programming the RCC clock configuration register (RCC_CFGR). A switch from one clock source to another occurs only if the target clock

source is ready (clock stable after startup delay or PLL locked). If a clock source that is not yet ready is selected, the switch occurs when the clock source is ready.

The SWS status bits in the RCC clock configuration register (RCC_CFGR) indicate which clock is currently used as system clock. The other status bits in the RCC_CR register indicate which clock(s) is (are) ready.

System clock generation

Figure 51 shows a simplified view of the clock distribution for the CPU and busses. All the dividers shown in the block diagram can be changed on-the-fly without generating timing violations. This feature is a very simple solution to adapt the busses frequencies to the application needs, thus optimizing the power consumption.

The CPRE divider can be used to adjust the CPU clock. However this also impacts the clock frequency of all bus matrix. CPRE is controlled via RCC_CDCFGR register.

In the same way, BMPRE divider can be used to adjust the clock for the bus matrix (AHB and AXI), but this also impacts the clock frequency of APB busses. BMPRE is controlled via RCC_BMCFGR register.

Most of the prescalers are controlled via RCC_CDCFGR and RCC_SRDCFGR registers.

Figure 51. Core and bus clock generation

Block diagram of Core and bus clock generation within the RCC. It shows the flow from SW clock sources (hsi_ck, csi_ck, hse_ck, pll1_p_ck) through a multiplexer to sys_ck. sys_ck is divided by CPRE(1) to produce sys_cpu_ck. sys_cpu_ck is divided by +3 to produce trace_ck (50% duty-cycle) and by +8 to produce rcc_cpu_ck. sys_cpu_ck is also divided by +1,2,4,8,...,512 (BMPRE(1)) to produce sys_bus_ck. sys_bus_ck is divided by +1,2,4,8,16 (PPRE5(1)) to produce rcc_hclk5 and rcc_pclk5. sys_bus_ck is also divided by +1,2,4,8,16 (PPRE1(1)) to produce rcc_hclk[4:1] and rcc_pclk1. sys_bus_ck is divided by +1,2,4,8,16 (PPRE2(1)) to produce rcc_pclk2. sys_bus_ck is divided by +1,2,4,8,16 (PPRE4(1)) to produce rcc_pclk4. All these clocks are then passed through the SCEU (System Clock Enabling) block to various peripherals. A note indicates that 'x' represents the selected value after a system reset.

RCC

SW inputs: hsi_ck, csi_ck, hse_ck, pll1_p_ck

sys_ck → CPRE(1) → + 1,2,4,8,...,512 → sys_cpu_ck

sys_cpu_ck → + 3 → trace_ck (50% Duty-cycle) → To TPIU

sys_cpu_ck → + 8 → rcc_cpu_ck → CPU clocks

sys_cpu_ck → + 8 → rcc_fclk → CPU SysTick clock

sys_cpu_ck → + 1,2,4,8,...,512 (BMPRE(1)) → sys_bus_ck

sys_bus_ck → + 1,2,4,8,16 (PPRE5(1)) → rcc_hclk5 → AXI Matrix, AXI peripheral clocks

sys_bus_ck → + 1,2,4,8,16 (PPRE5(1)) → rcc_pclk5 → AHB5 peripheral clocks

sys_bus_ck → + 1,2,4,8,16 (PPRE1(1)) → rcc_hclk[4:1] → AHB Matrix, AHB1,2,3,4 peripheral clocks

sys_bus_ck → + 1,2,4,8,16 (PPRE1(1)) → rcc_pclk1 → APB1 peripheral clocks

sys_bus_ck → + 1,2,4,8,16 (PPRE2(1)) → rcc_pclk2 → APB2 peripheral clocks

sys_bus_ck → + 1,2,4,8,16 (PPRE4(1)) → rcc_pclk4 → APB4 peripheral clocks

All outputs pass through SCEU (System Clock Enabling)

x Represents the selected value after a system reset.

MSv54113V3

Block diagram of Core and bus clock generation within the RCC. It shows the flow from SW clock sources (hsi_ck, csi_ck, hse_ck, pll1_p_ck) through a multiplexer to sys_ck. sys_ck is divided by CPRE(1) to produce sys_cpu_ck. sys_cpu_ck is divided by +3 to produce trace_ck (50% duty-cycle) and by +8 to produce rcc_cpu_ck. sys_cpu_ck is also divided by +1,2,4,8,...,512 (BMPRE(1)) to produce sys_bus_ck. sys_bus_ck is divided by +1,2,4,8,16 (PPRE5(1)) to produce rcc_hclk5 and rcc_pclk5. sys_bus_ck is also divided by +1,2,4,8,16 (PPRE1(1)) to produce rcc_hclk[4:1] and rcc_pclk1. sys_bus_ck is divided by +1,2,4,8,16 (PPRE2(1)) to produce rcc_pclk2. sys_bus_ck is divided by +1,2,4,8,16 (PPRE4(1)) to produce rcc_pclk4. All these clocks are then passed through the SCEU (System Clock Enabling) block to various peripherals. A note indicates that 'x' represents the selected value after a system reset.

1. Dividers values can be changed on-the-fly. All dividers provide have 50% duty-cycles.

Note that the application must respect the maximum allowed frequencies: \(F_{CPU}\) Max and \(F_{BUS}\) Max. \(F_{BUS}\) represents the maximum allowed frequency for the AHB and AXI busses. Refer to the product datasheet for maximum values.

Note as well that the trace clock (trace_ck) is generated from sys_cpu_ck clock, divided by 3. For additional information refer to Section : Clock distribution for Debug and Trace.

7.5.7 Clock protection

The RCC does not allow to disable the system clock (sys_ck). Several protections are implemented in order to prevent actions disabling accidentally the system clock.

In addition, protection bits are available in order to prevent accidental disabling of FMC and XSPI block activities.

The protections consist on ignoring the invalid write operations. It is recommended to read back registers having protection to insure that the clock configuration expected by the software is accepted by the RCC.

The table hereafter shows the protections handled by the RCC.

Table 62. Clock protection summary

Protected fieldsConditions checked by the RCC
SW[2:0]Changing SW value is allowed only if the targetted clock is enabled and ready.
PLLSRC[1:0]Changing PLLSRC value is allowed if:
  • - The targetted clock is enabled and ready, and,
  • - All PLL disabled
HSEON, HSION or CSIONChanging these fields is allowed if:
  • - The oscillator is not used directly or indirectly (via PLL1) as system clock, and
  • - FMCCKP = XSPICKP = 0.
DIVMx[5:0], PLLxRGE[1:0], PLLxVCOSEL, DIVN[8:0]Changing these fields is allowed only if the corresponding PLL is disabled (PLLxON=0)
DIVP[6:0], DIVQ[6:0], DIVR[6:0], DIVS[2:0], DIVT[2:0]Changing these fields is allowed only if the corresponding DIVyEN bit is equal to 0
(y = P, Q, R, S or T)
PLL1ONChanging this field is allowed if:
  • - SW switch is not selecting the PLL1, and
  • - FMCCKP = 0.
PLL1PENDisabling the DIVP output of PLL1 is allowed if the SW switch is not selecting PLL1
PLL2ONChanging this field is allowed only if FMCCKP = XSPICKP = 0.
PLL2SEN, PLL2TEN, XSPI1EN XSPI2EN, XSPI1LPEN XSPI2LPEN, XSPI1RST XSPI2RSTChanging these fields is allowed only if XSPICKP = 0.
PLL1QEN, PLL2REN, FMCEN, FMCLPEN, FMCRSTChanging these fields is allowed only if FMCCKP = 0.
HSEBYP, HSEEXTChanging these fields is allowed only if HSEON = 0.
LSEBYP, LSEEXTChanging these fields is allowed only if LSEON = 0.

There is also clock protection mechanism in case of HSE failure, refer to Section : CSS on HSE.

7.5.8 Clock generation in Stop and Standby modes

When the whole system enters Stop mode, all the clocks (system and kernel clocks) are stopped and the following clock sources are disabled as well:

The content of the RCC registers is not altered except for PLL1ON, PLL2ON, PLL3ON HSEON and HSI48ON that are set to 0.

HSION and CSION bits are also affected depending on STOPWUCK and STOPKERWUCK bits (see Table 63).

When the CPU requested to go in Stop mode, the RCC first stop all the requested clocks, and inform the PWR that all clocks have been properly stopped. As shown in Figure 52, three main signals are used to control power transitions:

Figure 52. Key signals controlling low-power modes

Block diagram showing the interaction between EXTI, PWR, and RCC blocks for low-power mode control. EXTI receives wake-up events and sends sys_wakeup to PWR. PWR sends pwrwake_sys to RCC and receives pwrds_sys from RCC. Both PWR and EXTI receive sys_ck from RCC.
graph LR
    subgraph EXTI
        direction TB
        WE[Wake-up events] --> E1[...]
        E1 --> E2[...]
        E2 --> E3[...]
    end
    EXTI -- sys_wakeup --> PWR
    PWR -- pwrwake_sys --> RCC
    RCC -- pwrds_sys --> PWR
    RCC -- sys_ck --> EXTI
    RCC -- sys_ck --> PWR
  

MSv54114V1

Block diagram showing the interaction between EXTI, PWR, and RCC blocks for low-power mode control. EXTI receives wake-up events and sends sys_wakeup to PWR. PWR sends pwrwake_sys to RCC and receives pwrds_sys from RCC. Both PWR and EXTI receive sys_ck from RCC.

Exiting Stop mode

When the microcontroller exits system Stop mode via a wake-up event, the application can select which oscillator (HSI and/or CSI) is used to restart. The STOPWUCK bit selects the oscillator used as system clock. The STOPKERWUCK bit selects the oscillator used as kernel clock for peripherals. The STOPKERWUCK bit is useful if after a system Stop, a peripheral needs a kernel clock generated by an oscillator different from the one used for the system clock.

All these bits belong to the RCC clock configuration register (RCC_CFGR).

Table 63 gives a detailed description of their behavior.

Table 63. STOPWUCK and STOPKERWUCK description

STOPWUCKSTOPKERWUCK-Activated oscillator when system exits Stop modeDistributed clocks when system exits Stop mode
System clockKernel clock
00→HSIHSIHSI
1→HSI and CSIHSI and/or CSI
10→CSIHSI and/or CSI
1→CSICSI

During Stop mode

There are two specific cases where the HSI or CSI can be enabled during system Stop mode:

HSIKERON and CSIKERON bits belong to RCC register map. Table 64 gives a detailed description of their behavior.

Table 64. HSIKERON and CSIKERON behavior

HSIKERON (CSIKERON)-HSI (CSI) state during Stop modeHSI (CSI) setting time
0→OFF\(t_{su(HSI)}\) (\(t_{su(CSI)}\)) (1)
1→Running and gatedImmediate
  1. \(t_{su(HSI)}\) and \(t_{su(CSI)}\) are the startup times of the HSI and CSI oscillators (refer to the product datasheet for values of these parameters).

When the microcontroller exists Standby mode, the HSI is selected as system and kernel clock. The RCC registers are reset to their initial values except for the RCC_RSR and RCC_BDCR registers.

Note that the HSI and CSI outputs provide two clock paths (see Figure 40):

When a peripheral requests the kernel clock in system Stop mode, only the path providing the hsi_ker_ck or csi_ker_ck is activated.

Caution: The CPU does not get automatically the same clock frequencies when leaving Stop mode: it is up to the application to restore the previous clock settings if needed.

7.5.9 Peripheral clock distribution

Some peripherals are designed to work with two different clock domains that operate asynchronously:

The benefit of having peripherals supporting these two clock domains is that the user application has more freedom to choose optimized clock frequency for the CPU, bus matrix and for the kernel part of the peripheral.

As a consequence, the user application can change the bus frequency without reprogramming the peripherals. As an example an on-going transfer with UART is not disturbed if its APB clock is changed on-the-fly.

Table 65 shows the clocks the RCC delivers to the peripherals. Note as well that the clock named per_ck, is the output of a mux which allows the application to select:

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
ADFKernelhclk10(4)ADF1SELFMAX / 2A
pll2_p_ck1
pll3_p_ck2
I2S_CKIN3
csi_ker_ck4
hsi_ker_ck5
Bushclk1--FMAX / 2-
ADC12Kernelpll2_p_ck0(4)ADCSEL125A
pll3_r_ck1
per_ck2
Bushclk1--FMAX / 2-
CORDICBushclk2--FMAX / 2-
CRCBushclk4--FMAX / 2-
CRSBuspclk1--FMAX / 4-
CRYPBushclk3--FMAX / 2-
DBGBussys_bus_ck--FMAX / 2-
kernelsys_cpu_ck/3--FMAX / 3-
DB_OCSPI1.
DB_OCSPI2
Bushclk5--FMAX / 2-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
DB_SDMMC1Bushclk5--FMAX / 2-
DB_SDMMC2Bushclk2--FMAX / 2-
DCMIPPBusaclk--FMAX / 2-
pclk5FMAX / 4
GPDMA1Bushclk1--FMAX / 2-
HPDMA1Bushclk5--FMAX / 2-
aclk
DMA2DBushclk5--FMAX / 2-
aclk
ETH1KernelETH_MII_TX_CLK--25A
ETH_MII_TX_CLK/.
ETH_RMII_REF_CLK
0(4)ETH1REFCKSEL25A
hse_ker_ck1
eth_clk_fb2
hse_ker_ck0(4)ETH1PHYCKSEL50A
pll3_s_ck1
clk_ptp_ref_iFMAX / 2-
Bushclk1--FMAX / 2-
EXTIBuspclk4--FMAX / 4-
FLASHBushclk5--FMAX / 2-
FDCANKernelhse_ker_ck0(4)FDCANSEL125A
pll1_q_ck1
pll2_p_ck2
Buspclk1--FMAX / 4-
FMCKernelhclk50(4)FMCSELFMAX / 2A
pll1_q_ck1
pll2_r_ck2
hsi_ker_ck3
Bushclk5--FMAX / 2-
aclk
GPIOA-H. GPIOM-PBushclk4--FMAX / 2-
GPU2DBushclk5--FMAX / 2-
aclk

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
GFXMMUBushclk5--FMAX / 2-
aclk
GFXTIMBuspclk5--FMAX / 4-
HASHBushclk3--FMAX / 2-
HDMI-CECKernellse_ck0(4)CECSEL1-
lsi_ck1
csi_ker_ck/1222
Buspclk1--FMAX / 4
I2C2, I2C3Kernelpclk10(4)I2C23SELFMAX / 4A
pll3_r_ck1
hsi_ker_ck2
csi_ker_ck3
Buspclk1--FMAX / 4-
I2C1/I3C1Kernelpclk10(4)I2C1_I3C1SELFMAX / 4A
pll3_r_ck1
hsi_ker_ck2
csi_ker_ck3
Buspclk1--FMAX / 4-
XSPIIMBushclk5--FMAX / 2-
IWDGKernellsi_ck--1A
Buspclk4--FMAX / 4-
JPEGBushclk5--FMAX / 2-
LPTIM1Kernelpclk10(4)LPTIM1SELFMAX / 4A
pll2_p_ck1
pll3_r_ck2
lse_ck3
lsi_ck4
per_ck5
Buspclk1--FMAX / 4-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
LPTIM2, LPTIM3Kernelpclk40(4)LPTIM23SELFMAX / 4A
pll2_p_ck1
pll3_r_ck2
lse_ck3
lsi_ck4
per_ck5
Buspclk4--FMAX / 4-
LPTIM4, LPTIM5Kernelpclk40(4)LPTIM45SELFMAX / 4A
pll2_p_ck1
pll3_r_ck2
lse_ck3
lsi_ck4
per_ck5
Buspclk4--FMAX / 4-
LPUART1Kernelpclk40(4)LPUART1SELFMAX / 4A
pll2_q_ck1
pll3_q_ck2
hsi_ker_ck3
csi_ker_ck4
lse_ck5
Buspclk4--FMAX / 4-
LTDCKernelpll3_r_ck--90A
Buspclk5-FMAX / 4-
aclk-FMAX / 2
MCE1, MCE2, MCE3Busaclk--FMAX / 2-
hclk5-
MDIOBuspclk1--FMAX / 4-
PKABushclk3--FMAX / 2-
PWRBushclk4--FMAX / 2-
PSSIKernelpll3_r_ck0(4)PSSISEL100-
per_ck1-
Bushclk2--FMAX / 2-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
XSPI1Kernelhclk50(4)XSPI1SELFMAX / 2A
pll2_s_ck1
pll2_t_ck2
Bushclk5--FMAX / 2-
aclk
XSPI2Kernelhclk50(4)XSPI2SELFMAX / 2A
pll2_s_ck1
pll2_t_ck2
Bushclk5--FMAX / 2-
aclk
OTGFSKernelhsi48_ker_ck0(4)OTGFSSEL50A
pll3_q_ck1
hse_ker_ck2
clk48mohci3
Bushclk1--FMAX / 2-
OTGHSKernelphy60m_ck--60A
Bushclk1--FMAX / 2-
RCCBushclk4--FMAX / 2-
RNGKernelhsi48_ker_ck--48A
Bushclk3--FMAX / 2-
RTC/AWU(5)Kernelno clock0(4)RTCSEL4A
lse_ck1
lsi_ck2
hse_ker_ck / (RTCDIV+1)3
Buspclk4--FMAX / 4-
SAESKernelhclk3--FMAX / 2A
Bushclk3--FMAX / 2-
SAI1Kernelpll1_q_ck0(4)SAI1SEL133A
pll2_p_ck1
pll3_p_ck2
I2S_CKIN3
per_ck4
Buspclk2--FMAX / 4-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
SAI2Kernelpll1_q_ck0(4)SAI2SEL133A
pll2_p_ck1
pll3_p_ck2
I2S_CKIN3
per_ck4
spdif_symb_ck5
Buspclk2--FMAX / 4-
SBSBuspclk4--FMAX / 4-
SDMMC1Kernelpll2_s_ck0(4)SDMMC12SEL200A
pll2_t_ck1
Bushclk5--FMAX / 2-
SDMMC2Kernelpll2_s_ck0(4)SDMMC12SEL200A
pll2_t_ck1
Bushclk2--FMAX / 2-
SPDIFRXKernelpll1_q_ck0(4)SPDIFRXSEL200A
pll2_r_ck1
pll3_r_ck2
hsi_ker_ck3
Buspclk1--FMAX / 4-
SPI/I2S6Kernelpclk40(4)SPI6SEL200A
pll2_q_ck1
pll3_q_ck2
hsi_ker_ck3
csi_ker_ck4
hse_ker_ck5
Buspclk4--FMAX / 4-
SPI/I2S1Kernelpll1_q_ck0(4)SPI1SEL130A
pll2_p_ck1
pll3_p_ck2
I2S_CKIN3
per_ck4
Buspclk2--FMAX / 4-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
SPI4, SPI5Kernelpclk20(4)SPI45SEL200A
pll2_q_ck1
pll3_q_ck2
hsi_ker_ck3
csi_ker_ck4
hse_ker_ck5
Buspclk2--FMAX / 4-
SPI/I2S3, SPI/I2S2Kernelpll1_q_ck0(4)SPI23SEL200A
pll2_p_ck1
pll3_p_ck2
I2S_CKIN3
per_ck4
Buspclk1--FMAX / 4-
TAMPERKernelno clock0(4)RTCSEL4A
lse_ck1
lsi_ck2
hse_ker_ck/ (RTCDIV+1)3
Buspclk4--FMAX / 4-
DTSKernellse_ck--10A
Buspclk4--FMAX / 4-
TIM2, TIM3, TIM4, TIM5, TIM6, TIM7, TIM12, TIM13, TIM14Kerneltimg1_ck--FMAX / 2S
Buspclk1--FMAX / 4-
TIM1, TIM9, TIM15, TIM16, TIM17,Kerneltimg2_ck--FMAX / 2S
Buspclk2--FMAX / 4-
USART1,Kernelpclk20(4)USART1SELFMAX / 4A
pll2_q_ck1
pll3_q_ck2
hsi_ker_ck3
csi_ker_ck4
lse_ck5
Buspclk2--FMAX / 4-

Table 65. Peripheral clock distribution summary

PeripheralsClock typesClock sourcesKernel clock MUXMax Kernel clock freq. [MHz] (1)Type (2)(3)
Pos.Control field
USART2, USART3, UART4, UART5, UART7, UART8Kernelpclk10(4)UART234578SELFMAX / 4A
pll2_q_ck1
pll3_q_ck2
hsi_ker_ck3
csi_ker_ck4
lse_ck5
Buspclk1--FMAX / 4-
UCPDKernelucpd_ker_ck--25A
Buspclk1--FMAX / 4-
USBPHYCKernelhse_ker_ck0(4)USBPHYCSEL32A
hse_ker_ck / 21
pll3_q_ck2
VREFBUFBuspclk4--FMAX / 4-
WWDG1Buspclk1--FMAX / 4-
  1. 1. FMAX value depends on the device reference and can be found on the datasheet of the product.
  2. 2. 'A' Means that the kernel clock is asynchronous with respect to bus interface clock.
  3. 3. 'S' Means that the kernel clock is synchronous with respect to bus interface clock.
  4. 4. Reset value
  5. 5. The RTC switch is in the VSW voltage domain

Figure 53 to Figure 68 provide a more detailed description of kernel clock distribution. Refer to Section 7.5.12: Peripheral clock gating control for more details.

To reduce the amount of switches, some peripherals share the same kernel clock source. Nevertheless, all peripherals have their dedicated enable signal.

Clock distribution for ADF, SAIs, and SPDIFRX

The audio peripherals generally need specific accurate frequencies, except for SPDIFRX. As shown in Figure 53 and Figure 56, the kernel clock of the SAIs or SPI(I2S)s can be generated by:

The SPDIFRX does not require a specific kernel clock frequency but only a frequency high enough to sample properly the incoming stream. Refer to the SPDIFRX description for more details.

The SPDIFRX also provides a symbol clock (spdifrx_symb_ck) which is 64 times faster than the received samples. The symbol clock is proposed as kernel clock for SAI2 in order to ease bridging from SPDIFRX to SAI2.

The audio blocks also have common kernel clocks in order to ease data exchange.

The ADF can work even in Stop mode as long as the bus clock is not requested. Working in Stop mode is possible only if the application selected csi_ker_ck or hsi_ker_ck as kernel clock sources. The ADF asserts the adf_ker_ckreq when the kernel clock is requested.

The kernel clock mechanism works only if the kernel clock source is provided by an RC oscillator (hsi_ker_ck or csi_ker_ck).

Figure 53. Clock distribution for SAIs, ADF and SPDIFRX

Block diagram of clock distribution for SAIs, ADF and SPDIFRX. The diagram shows the RCC block containing three dynamic switches (PKSU) that select clock sources for SPDIFRX, SAI2, SAI1, and ADF. Each switch has multiple inputs (PLL1, PLL2, PLL3, I2S, HSI, CSI, per_ck) and a dynamic selection point 'D'. The selected clocks are then processed by PKEU logic blocks to generate bus interface clocks and kernel clocks for the respective peripherals.

RCC

SPDIFRX

SPDIFRXSEL

pll1_q_ck

pll2_r_ck

pll3_r_ck

hsi_ker_ck

0

1

2 D

3

clk1

SPDIFRXEN

SPDIFRXLPEN

Logic

spdifrx_pclk

spdifrx_ker_ck

spdifrx_symb_ck

SAI2

SAI2SEL

pll1_q_ck

pll2_p_ck

pll3_p_ck

I2S_CKIN

per_ck

0

1

2 D

3

4

5

clk2

SAI2EN

SAI2LPEN

Logic

sai_pclk

sai_a_ker_ck

sai_b_ker_ck

SAI1

SAI1SEL

pll1_q_ck

pll2_p_ck

pll3_p_ck

I2S_CKIN

per_ck

0

1

2 D

3

4

clk2

SAI1EN

SAI1LPEN

Logic

sai_pclk

sai_a_ker_ck

sai_b_ker_ck

ADF

ADF1SEL

hclk1

pll2_p_ck

pll3_p_ck

I2S_CKIN

csi_ker_ck

hsi_ker_ck

0

1

2 D

3

4

5

hclk1

ADF1EN

ADF1LPEN

Logic

adf_hclk

adf_ker_ckreq

adf_ker_ck

PKSU

PKEU

D The switch is dynamic: the transition between two inputs is glitch-free

— Bus interface clocks

— Kernel clocks

MSv54115V2

Block diagram of clock distribution for SAIs, ADF and SPDIFRX. The diagram shows the RCC block containing three dynamic switches (PKSU) that select clock sources for SPDIFRX, SAI2, SAI1, and ADF. Each switch has multiple inputs (PLL1, PLL2, PLL3, I2S, HSI, CSI, per_ck) and a dynamic selection point 'D'. The selected clocks are then processed by PKEU logic blocks to generate bus interface clocks and kernel clocks for the respective peripherals.

1. X represents the selected mux input after a system reset.

Clock distribution for SPIs, SPI/I2Ss

SPI peripherals do not need an accurate kernel clock frequency but a clock fast enough for the serial interface. The SPI/I2S peripherals may request accurate kernel clock frequency when using the I2S function. For that purpose the source can be selected among the following ones:

The SPI/I2S also have common kernel clocks with audio blocks in order to ease data exchange.

Figure 54. Clock distribution for SPIs and SPI/I2S

Block diagram of clock distribution for SPIs and SPI/I2S. The diagram shows the RCC block containing four multiplexers (PKSU) that select clock sources for SPI1, SPI2/3, SPI4/5, and SPI6. Each multiplexer has inputs from various PLLs, I2S, and peripheral clocks. The selected clocks are then processed by logic blocks (PKEU) to generate spi_pclk and spi_ker_ck for the respective SPI/I2S peripherals.

The diagram illustrates the clock distribution for SPIs and SPI/I2S within the Reset and Clock Control (RCC) block. It is divided into two main sections: PKSU (Peripheral Kernel Source Unit) and PKEU (Peripheral Kernel Enable Unit).

Legend: D The switch is dynamic: the transition between two inputs is glitch-free.

MSv54116V1

Block diagram of clock distribution for SPIs and SPI/I2S. The diagram shows the RCC block containing four multiplexers (PKSU) that select clock sources for SPI1, SPI2/3, SPI4/5, and SPI6. Each multiplexer has inputs from various PLLs, I2S, and peripheral clocks. The selected clocks are then processed by logic blocks (PKEU) to generate spi_pclk and spi_ker_ck for the respective SPI/I2S peripherals.

1. X represents the selected switch input after a system reset.

Clock distribution for I2C[3:2], and I2C1/I3C1

I2Cs and I3C1 peripherals do not need an accurate kernel clock frequency but a clock fast enough to handle properly the serial interface. The following kernel clock sources are proposed:

The I2Cs and I3C1 can work even in Stop mode as long as the bus clock is not requested. Working in Stop mode is possible only if the application selected csi_ker_ck or hsi_ker_ck as kernel clock sources. The I2Cs and I3C1 assert the i2c_ker_ckreq or i3c_ker_ckreq signals, when the kernel clock is requested.

The kernel clock mechanism works only if the kernel clock source is provided by an RC oscillator (hsi_ker_ck or csi_ker_ck).

Figure 55. Clock distribution for I2C[3:2] and I2C1/I3C1

Block diagram of clock distribution for I2C[3:2] and I2C1/I3C1. The diagram shows the RCC block containing two multiplexers (PKSU) and the PKEU block. The top path is for I2C1/I3C1, and the bottom path is for I2C[3:2]. Inputs to the multiplexers include pclk1, pll3_r_ck, hsi_ker_ck, and csi_ker_ck. The selected kernel clock is then processed by logic in PKEU to generate interface and kernel clocks for the respective I2C/I3C blocks.

RCC

I2C1_I3C1SEL

0 pclk1
1 pll3_r_ck
2 hsi_ker_ck
3 csi_ker_ck

D

I2C23SEL

0 pclk1
1 pll3_r_ck
2 hsi_ker_ck
3 csi_ker_ck

D

PKSU

pclk1

I2C1_I3C1EN
I2C1_I3C1LPEN

Logic

I2C1/I3C1

i2c/i3c_pclk
i2c/i3c_ker_ckreq
i2c/i3c_ker_ck

pclk1

I2C[3:2]EN
I2C[3:2]LPEN

Logic

I2C2, I2C3

i2c_pclk
i2c_ker_ckreq
i2c_ker_ck

PKEU

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks — Kernel clocks

MSv54117V2.

Block diagram of clock distribution for I2C[3:2] and I2C1/I3C1. The diagram shows the RCC block containing two multiplexers (PKSU) and the PKEU block. The top path is for I2C1/I3C1, and the bottom path is for I2C[3:2]. Inputs to the multiplexers include pclk1, pll3_r_ck, hsi_ker_ck, and csi_ker_ck. The selected kernel clock is then processed by logic in PKEU to generate interface and kernel clocks for the respective I2C/I3C blocks.

Clock distribution for UARTs and USARTs

UARTs need kernel clock frequency allowing the adjustment of the baud rate with an acceptable accuracy (generally less than +/-2%). For that purpose the source can be selected among the following ones:

The UARTs can work even in Stop mode as long as the bus clock is not requested. Working in Stop mode is possible only if the application selected csi_ker_ck or hsi_ker_ck as kernel clock sources. The UARTs assert the uartx_ker_ckreq signal, when the kernel clock is requested. The kernel clock mechanism works only if the kernel clock source is provided by an RC oscillator (hsi_ker_ck or csi_ker_ck).

UARTs can also work in Stop mode using the LSE clock when high baud rates are not required.

Figure 56. Clock distribution for UARTs, LPUART1 and USARTs

Block diagram of clock distribution for UARTs, LPUART1, and USARTs. The diagram shows the RCC block containing three multiplexers (PKSU) for selecting clock sources (pclk1, pclk4, pclk2) and logic blocks (PKEU) for generating kernel clocks (uart_clk, lpuart_clk, usart_clk) and kernel clock requests (uart_ker_ckreq, lpuart_ker_ckreq, usart_ker_ckreq) for USART[3:2], UART[y], LPUART1, and USART1 respectively. A legend indicates that a box with 'D' represents a dynamic switch and thick lines represent bus interface clocks while thin lines represent kernel clocks.

RCC

PKSU

UART234578SEL

0 pclk1
1 pll2_q_ck
2 pll3_q_ck
3 D hsi_ker_ck
4 csi_ker_ck
5 lse_ck

LPUART1SEL

0 pclk4
1 pll2_q_ck
2 pll3_q_ck
3 D hsi_ker_ck
4 csi_ker_ck
5 lse_ck

USART1SEL

0 pclk2
1 pll2_q_ck
2 pll3_q_ck
3 D hsi_ker_ck
4 csi_ker_ck
5 lse_ck

PKEU

USART[3:2]

usart_pclk
usart_ker_ckreq
usart_ker_ck

UART[y] (y can be 4, 5, 7, 8)

uart_pclk
uart_ker_ckreq
uart_ker_ck

LPUART1

lpuart_pclk
lpuart_ker_ckreq
lpuart_ker_ck

USART1

usart_pclk
usart_ker_ckreq
usart_ker_ck

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks — Kernel clocks

MSv54118V1

Block diagram of clock distribution for UARTs, LPUART1, and USARTs. The diagram shows the RCC block containing three multiplexers (PKSU) for selecting clock sources (pclk1, pclk4, pclk2) and logic blocks (PKEU) for generating kernel clocks (uart_clk, lpuart_clk, usart_clk) and kernel clock requests (uart_ker_ckreq, lpuart_ker_ckreq, usart_ker_ckreq) for USART[3:2], UART[y], LPUART1, and USART1 respectively. A legend indicates that a box with 'D' represents a dynamic switch and thick lines represent bus interface clocks while thin lines represent kernel clocks.

1. X represents the selected switch input after a system reset.

Clock distribution for FDCAN

Figure 57. Clock distribution for FDCAN

Block diagram of clock distribution for FDCAN. The diagram shows the RCC block containing the PKSU and PKEU sub-blocks. The PKSU has a 3-to-1 multiplexer with inputs hse_ker_ck, pll1_q_ck, and pll2_p_ck, controlled by FDCANSEL. The output of the multiplexer (marked with a 'D' in a red box) goes to the PKEU. The PKEU contains logic and AND gates that take inputs from the multiplexer output, pclk1, FDCANEN, and FDCANLPEN to generate fdcan_pclk and fdcan_ker_ck signals for the FDCAN block. A legend indicates that thick lines are bus interface clocks and thin lines are kernel clocks. A note explains that the 'D' symbol indicates a glitch-free transition. The diagram is labeled MSv54119V1.

RCC

PKSU

FDCANSEL

hse_ker_ck

pll1_q_ck

pll2_p_ck

0

1 D

2

PKEU

pclk1

FDCANEN

FDCANLPEN

Logic

FDCAN

fdcan_pclk

fdcan_ker_ck

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks      — Kernel clocks

MSv54119V1

Block diagram of clock distribution for FDCAN. The diagram shows the RCC block containing the PKSU and PKEU sub-blocks. The PKSU has a 3-to-1 multiplexer with inputs hse_ker_ck, pll1_q_ck, and pll2_p_ck, controlled by FDCANSEL. The output of the multiplexer (marked with a 'D' in a red box) goes to the PKEU. The PKEU contains logic and AND gates that take inputs from the multiplexer output, pclk1, FDCANEN, and FDCANLPEN to generate fdcan_pclk and fdcan_ker_ck signals for the FDCAN block. A legend indicates that thick lines are bus interface clocks and thin lines are kernel clocks. A note explains that the 'D' symbol indicates a glitch-free transition. The diagram is labeled MSv54119V1.
  1. 1. X represents the selected switch input after a system reset.

Clock distribution for graphic blocks (GPU2D, LTDC, DCMIPP and PSSI)

Figure 58. Clock distribution for GPU2D

Figure 58. Clock distribution for GPU2D diagram

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks — Kernel clocks

MSv54120V2

Figure 58. Clock distribution for GPU2D diagram

1. X represents the selected switch input after a system reset.

Figure 59. Clock distribution for LTDC and DCMIPP

Figure 59. Clock distribution for LTDC and DCMIPP diagram

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks — Kernel clocks

MSv54121V1

Figure 59. Clock distribution for LTDC and DCMIPP diagram

1. X represents the selected switch input after a system reset.

The PSSI receives an AHB clock and a kernel clock (pxclk).

The pxclk can be provided either by an external device via PSSI_PIXCK pad, or by the RCC. Note that the clock generated by the RCC is provided to pxclk input by the feedback path of the PSSI_PIXCK pad. The drive of the PSSI_PIXCK is controlled by the PSSI block.

Figure 60. Clock distribution for PSSI

Block diagram of clock distribution for PSSI. The RCC block contains a PKSU with a dynamic switch (D) selecting between pll3_r_ck (input 0) and per_ck (input 1). The output of the switch goes to the PKEU block, which contains logic and a switch controlled by PSSIEN and PSSILPEN. The PKEU output hclk2 goes to the PSSI block, which outputs hclk and pxclk. A feedback signal from pxclk goes back to the PKEU logic. The final output is PSSI_PIXCK. A legend indicates that a red box with 'D' represents a dynamic switch, a thick line represents a bus interface clock, and a thin line represents a kernel clock.

D The switch is dynamic: the transition between two inputs is glitch-free.

— Bus interface clocks      — Kernel clocks

MSv54122V1

Block diagram of clock distribution for PSSI. The RCC block contains a PKSU with a dynamic switch (D) selecting between pll3_r_ck (input 0) and per_ck (input 1). The output of the switch goes to the PKEU block, which contains logic and a switch controlled by PSSIEN and PSSILPEN. The PKEU output hclk2 goes to the PSSI block, which outputs hclk and pxclk. A feedback signal from pxclk goes back to the PKEU logic. The final output is PSSI_PIXCK. A legend indicates that a red box with 'D' represents a dynamic switch, a thick line represents a bus interface clock, and a thin line represents a kernel clock.
  1. 1. X represents the selected switch input after a system reset.

Clock distribution for SDMMCs, FMC, and XSPIs

The FMC kernel clock can be chosen between 4 different sources, giving good flexibility.

For each XSPI, a clock switch allows the selection between 3 different sources, giving good flexibility. It is possible to enable independently each XSPI block.

The switches FMCSEL, XSPI[2:1]SEL, also embeds several protections:

application must ensure that the recovery clock frequency is supported by the external device.

How to handle properly XSPI switches:

The XSPIs must provide a clock to the external memory, with a duty cycle distortion generally lower than 5%. In order to reach this requirement, the kernel clock provided to the XSPIs has a typical duty cycle of 50%. In addition, the XSPIs embed prescaler allowing clock division by even ratios.

Figure 61. Clock distribution for FMC, XSPIs, and MCEs

Block diagram showing clock distribution for FMC, XSPIs, and MCEs. It includes RCC, PKSU, PKEU, MCE3, FMC, MCE1, XSPI1, MCE2, XSPI2, and XSPI-PHY blocks. It details clock signals like hclk5, aclk, and various PLL outputs, along with control signals like FMCSWP, XSPI1SWP, and XSPI2SWP. A legend explains dynamic switches and clock types.

The diagram illustrates the clock distribution architecture for the FMC, XSPIs, and MCEs. It is divided into three main sections: RCC (Reset and Clock Control), PKSU (Peripheral Kernel Switch Unit), and PKEU (Peripheral Kernel Enable Unit).

Legend:

MSv54123V2.

Block diagram showing clock distribution for FMC, XSPIs, and MCEs. It includes RCC, PKSU, PKEU, MCE3, FMC, MCE1, XSPI1, MCE2, XSPI2, and XSPI-PHY blocks. It details clock signals like hclk5, aclk, and various PLL outputs, along with control signals like FMCSWP, XSPI1SWP, and XSPI2SWP. A legend explains dynamic switches and clock types.

1. X represents the selected switch input after a system reset.

The SDMMC1 and SDMMC2 share the same kernel clock. A clock switch allows the selection between 2 different sources. It is possible to enable independently each SDMMC block. Note that when one of the SDMMC is enabled via its SDMMC[2:1]EN bit, the associated delay block is enabled as well.

The application must take care about the duty-cycle of the kernel clock provided to the SDMMC blocks.

Table 66. SDMMC interface clock constraints

SDMMC modeMode nameInterface clock frequencyDuty cycle constraint
SDIOSDR1225 MHz or less30 - 70%
SDR2550 MHz or less30 - 70%
DDR5050 MHz or less45 - 55%
SDR50100 MHz or less30 - 70%

Table 66. SDMMC interface clock constraints

SDMMC modeMode nameInterface clock frequencyDuty cycle constraint
e.MMCBackward compatible26 MHz or less30 - 70%
High Speed SDR52 MHz or less30 - 70%
High Speed DDR52 MHz or less45 - 55%

For example, if the SDMMC works in SDR50, then a kernel clock of 50 MHz, with a duty cycle better than 30-70% is enough. If the SDMMC works in DDR50, then it is recommended to provide a kernel clock of 100 MHz, and divide the frequency of the kernel clock by two, using the SDMMC divider in order to insure a duty-cycle very close to 50% for the SDMMC_CK.

Figure 62. Clock distribution for SDMMC[2:1] and DB_SDMMC[2:1]

Block diagram showing clock distribution for SDMMC[2:1] and DB_SDMMC[2:1] within the RCC. It includes components like PKSU, PKEU, and logic gates for clock selection and distribution to DB_SDMMC1, SDMMC1, DB_SDMMC2, and SDMMC2.

The diagram illustrates the clock distribution logic within the Reset and Clock Control (RCC) block. It shows the selection of bus interface clocks (hclk5 and hclk2) and their distribution to various SDMMC and DB_SDMMC blocks via kernel clocks (sdmmc_hclk and sdmmc_ker_ck). The PKSU (PLL2 Switch Unit) selects between pll2_s_ck and pll2_t_ck based on the SDMMC12SEL signal. The PKEU (Peripheral Clock Enable Unit) contains logic for enabling clocks based on SDMMC1EN, SDMMC1LPEN, SDMMC2EN, and SDMMC2LPEN signals. A dynamic switch (marked with a red 'D') ensures glitch-free transitions between clock inputs.

Legend:
D The switch is dynamic: the transition between two inputs is glitch-free.
Bus interface clocks
Kernel clocks

MSv54124V1

Block diagram showing clock distribution for SDMMC[2:1] and DB_SDMMC[2:1] within the RCC. It includes components like PKSU, PKEU, and logic gates for clock selection and distribution to DB_SDMMC1, SDMMC1, DB_SDMMC2, and SDMMC2.

1. X represents the selected switch input after a system reset.

Clock distribution for OTGFS, OTGHS and UCPD

Figure 63 shows the clock distribution for the USB blocks.

The selection of the reference clock for the USBPHYC is performed by a simple MUX. In order to change the clock source, the application must follow the sequence hereafter:

Figure 63. Clock distribution for USB and UCPD

Block diagram showing clock distribution for USB and UCPD. The diagram is divided into the RCC block on the left and external blocks (UCPD, OTGFS, OTGHS, USBPHYC, PLL, CLKCORE) on the right. Inside RCC, there are two main sections: PKSU and PKEU. PKSU contains a 4-to-1 multiplexer for OTGFSSEL and a dynamic 2-to-1 multiplexer for USBPHYCSEL. PKEU contains logic gates and multiplexers for UCPD, OTGFS, OTGHS, and USBPHYC. Clock sources include hsi_osc_ck, hse_osc_ck, pll3_q_ck, and phy60m_ck. Bus interface clocks are shown as thick lines, and kernel clocks as thin lines. A legend explains the dynamic switch symbol and clock line types.

RCC

hsi_osc_ck → +4 → ucpd_ker_ck

OTGFSSEL → {0, 1, 2, 3} → rcc_usbfs_ker_ck

hse_osc_ck (direct from oscillator) → +2 → {0, 1, 2} → CLKCORE

hse_ker_ck → +2 → {0, 1, 2} → CLKCORE

pll3_q_ck → {0, 1, 2} → CLKCORE

USBPHYCSEL → Logic → {0, 1, 2} → CLKCORE

Allowed freq: 16, 19.2, 20, 24, 26 and 32 MHz

UCPD

pclk1 → pclk

ucpd_ker_ck → usbpd_ker_ck (6 MHz min)

UCPD1EN, UCPD1LPEN → Logic → usbpd_ker_ckreq

OTGFS

hclk1 → hclk

OTGFSEN, OTGFSLPEN → Logic → utmifs_clk48 (for fs mode)

OTGHS

hclk1 → hclk

OTGHSEN, OTGSLPEN → Logic → utmi_clk (for utmi+, 8 bit if)

UTMI+ → USBPHYC

USBPHYC

phy60m_ck → phyclock

clk48mohci, clk12mohci → USBPHYC

480 MHz → PLL → CLKCORE

USBPHYCEN, USBPHYCLPEN → Logic → CLKCORE

Legend:

MSv54125V2

Block diagram showing clock distribution for USB and UCPD. The diagram is divided into the RCC block on the left and external blocks (UCPD, OTGFS, OTGHS, USBPHYC, PLL, CLKCORE) on the right. Inside RCC, there are two main sections: PKSU and PKEU. PKSU contains a 4-to-1 multiplexer for OTGFSSEL and a dynamic 2-to-1 multiplexer for USBPHYCSEL. PKEU contains logic gates and multiplexers for UCPD, OTGFS, OTGHS, and USBPHYC. Clock sources include hsi_osc_ck, hse_osc_ck, pll3_q_ck, and phy60m_ck. Bus interface clocks are shown as thick lines, and kernel clocks as thin lines. A legend explains the dynamic switch symbol and clock line types.

1. X represents the selected switch input after a system reset.

Clock distribution for ETH1

The Ethernet clocks provided by the RCC are available on ETH_CLK pad. The application can select if the ETH_CLK is generated from the HSE kernel clock or from the pll3_s_ck.

The RCC also provides the bus clock and the reference clock for the PTP function.

Note that the bus and PTP clocks generation are controlled via ETH1MACEN and ETH1MACLPEN bits.

Figure 64. Clock distribution for ETH1

Block diagram of clock distribution for ETH1 showing RCC, PKEU, and ETH1 blocks with various clock signals and control logic.

The diagram illustrates the clock distribution for ETH1, involving the RCC, PKEU, and ETH1 blocks.
RCC Block:

PKEU Block:ETH1 Block:Legend:

MSv54126V2

Block diagram of clock distribution for ETH1 showing RCC, PKEU, and ETH1 blocks with various clock signals and control logic.

1. X represents the selected switch input after a system reset.

The signal ETH_SEL is provided by the SBS block and defines the interface type used:

In MII mode (orange path):

In RMII mode (blue path):

Note that the ETH1REFCKSEL mux position cannot be changed when a clock is provided to the ETH1 block. In order to select the wanted mux position the following sequence must be respected:

The RCC can generate a reference clock of 25 or 50 MHz to the external PHY, via ETH_CLK pad. The figure hereafter shows the possible clock configurations.

The ETH_CLK is generated only if:

The bits ETH1REFCKSEL[1:0] and ETH1PHYCKSEL are located into the RCC AHB peripheral kernel clock selection register (RCC_CCIPR1).

Figure 65. ETH clock configuration

Figure 65. ETH clock configuration diagram showing two scenarios for clocking an Ethernet PHY from a Microcontroller. Left scenario: ETH1REFCKSEL[1:0] = 0, showing the PHY receiving ETH_RMII_REF_CLK from the Microcontroller and OSC_IN from an external source. Right scenario: ETH1REFCKSEL[1:0] = 2, showing the PHY receiving ETH_CLK from the Microcontroller and OSC_IN from an external source, with OSC_OUT also shown. The Microcontroller block in the right scenario is labeled with ETH1REFCKSEL[1:0] = 2. The diagram is labeled MSv54127V2.
Figure 65. ETH clock configuration diagram showing two scenarios for clocking an Ethernet PHY from a Microcontroller. Left scenario: ETH1REFCKSEL[1:0] = 0, showing the PHY receiving ETH_RMII_REF_CLK from the Microcontroller and OSC_IN from an external source. Right scenario: ETH1REFCKSEL[1:0] = 2, showing the PHY receiving ETH_CLK from the Microcontroller and OSC_IN from an external source, with OSC_OUT also shown. The Microcontroller block in the right scenario is labeled with ETH1REFCKSEL[1:0] = 2. The diagram is labeled MSv54127V2.

The ETH1 block provides information on the MAC speed (mac_speed_o[1:0]), which may change dynamically:

Clock distribution for ADC1-2

Figure 66. Clock distribution For ADCs

Figure 66: Block diagram showing the clock distribution for ADC1-2 peripherals from RCC (Reset and clock control). Inputs include pll2_p_ck (0), pll3_r_ck (1 [D]), and per_ck (2) selected by ADCSEL multiplexer in PKSU, connected to PKEU with ADC12EN, ADC12LPEN, and hclk1, routing to ADC1-2 peripheral inputs adc_hckl and adc_ck.
Figure 66: Block diagram showing the clock distribution for ADC1-2 peripherals from RCC (Reset and clock control). Inputs include pll2_p_ck (0), pll3_r_ck (1 [D]), and per_ck (2) selected by ADCSEL multiplexer in PKSU, connected to PKEU with ADC12EN, ADC12LPEN, and hclk1, routing to ADC1-2 peripheral inputs adc_hckl and adc_ck.

1. X represents the selected switch input after a system reset.

Clock distribution for SAES and RNG

Figure 67. Clock distribution for SAES and RNG

Figure 67: Block diagram showing the clock distribution for SAES and RNG peripherals from RCC. Inputs include hclk3, RNGEN, RNGLPEN, hsi48_ker_ck, SAESEN, and SAESLPEN passing through PKEU logic gates to RNG peripheral inputs hclk, rng_ckreq, rng_clk and SAES peripheral inputs hclk, saes_ker_ck.
Figure 67: Block diagram showing the clock distribution for SAES and RNG peripherals from RCC. Inputs include hclk3, RNGEN, RNGLPEN, hsi48_ker_ck, SAESEN, and SAESLPEN passing through PKEU logic gates to RNG peripheral inputs hclk, rng_ckreq, rng_clk and SAES peripheral inputs hclk, saes_ker_ck.

1. X represents the selected switch input after a system reset.

The RNG block is using the hsi48_ker_ck as kernel clock. The logic handling controlling the clock of the RNG is different from standard peripherals. When enabled, the RNG has to assert its kernel clock request, in order to get a kernel clock. For example, if the SAES needs the RNG resource, the RNG must also be enabled. Refer to Section 7.5.12: Peripheral clock gating control for details.

Clock distribution for HDMI-CEC

Figure 68. Clock distribution for HDMI-CEC

Figure 68: Clock distribution for HDMI-CEC diagram showing RCC block containing PKSU (with CECSEL multiplexer taking lse_ck, lsi_ck, csi_ker_ck / 122) and PKEU (with gating logic controlled by pclk1, CECEN, CECLPEN) outputting cec_pclk and cec_ker_ck to HDMI-CEC block.
Figure 68: Clock distribution for HDMI-CEC diagram showing RCC block containing PKSU (with CECSEL multiplexer taking lse_ck, lsi_ck, csi_ker_ck / 122) and PKEU (with gating logic controlled by pclk1, CECEN, CECLPEN) outputting cec_pclk and cec_ker_ck to HDMI-CEC block.

1. X represents the selected switch input after a system reset

Clock distribution for TIM and LPTIM

The TIMs timers are using kernel clocks (tim_ker_ck) phase aligned with the bus interface clock.

The working frequency of the timers clock depends on:

Figure 69. Clock distribution for TIMs

Figure 69: Clock distribution for TIMs diagram showing RCC block containing PKSU (LUTs driven by PPRE1, PPRE2, TIMPRE and hclk divided by 1,2,4,8 to produce rcc_timx_ker_ck, rcc_timy_ker_ck) and PKEU (logic driven by pclk1, pclk2, TIMxEN/TIMxLPEN, TIMyEN/TIMyLPEN) generating clk_apb and ck_tim to TIMx and TIMy.
Figure 69: Clock distribution for TIMs diagram showing RCC block containing PKSU (LUTs driven by PPRE1, PPRE2, TIMPRE and hclk divided by 1,2,4,8 to produce rcc_timx_ker_ck, rcc_timy_ker_ck) and PKEU (logic driven by pclk1, pclk2, TIMxEN/TIMxLPEN, TIMyEN/TIMyLPEN) generating clk_apb and ck_tim to TIMx and TIMy.
  1. 1. X represents the selected switch input after a system reset
  2. 2. Can be changed on the fly

The Table 67 shows how to select the timer clock frequency.

Table 67. Ratio between clock timer and pclk

PPRE1(1)
PPRE2
TIMPRE(2)-Frcc_timx_ker_ck
Frcc_timy_ker_ck
Fpclk1
Fpclk2
Comments
0xxx→Fhclk1Fhclk1The timer clock is equal to the bus clock.
100x→Fhclk1Fhclk1 / 2The timer clock is twice as fast as the bus clock.
1010→Fhclk1 / 2Fhclk1 / 4
1100→Fhclk1 / 4Fhclk1 / 8
1110→Fhclk1 / 8Fhclk1 / 16
1011→Fhclk1Fhclk1 / 4The timer clock is 4 times faster than the bus clock.
1101→Fhclk1 / 2Fhclk1 / 8
1111→Fhclk1 / 4Fhclk1 / 16
  1. 1. PPRE1 and PPRE2 are the prescaler for the APB1 and APB2 clocks.
  2. 2. TIMPRE belongs to RCC clock configuration register (RCC_CFGR).

The LPTIMs timers have a kernel clocks fully asynchronous with respect to their bus interface clock. The kernel clock can be selected among up to 6 clock sources.

The LPTIMs also use lse_ck and lsi_ck as kernel clock, allowing them to work even when the system is in Stop mode.

Figure 70. Clock distribution for LPTIMs

Block diagram showing clock distribution for LPTIMs. It includes RCC and PKSU blocks with multiplexers for LPTIM1, LPTIM[3:2], and LPTIM[5:4]. It shows inputs like pclk1, pll2_p_ck, pll3_r_ck, lse_ck, lsi_ck, and per_ck. It also shows PKEU logic blocks and connections to LPTIM peripheral blocks.

The diagram illustrates the clock distribution for LPTIMs. It is divided into three main sections: RCC, PKSU, and PKEU.

Legend:

MSv54132V1

Block diagram showing clock distribution for LPTIMs. It includes RCC and PKSU blocks with multiplexers for LPTIM1, LPTIM[3:2], and LPTIM[5:4]. It shows inputs like pclk1, pll2_p_ck, pll3_r_ck, lse_ck, lsi_ck, and per_ck. It also shows PKEU logic blocks and connections to LPTIM peripheral blocks.

1. X represents the selected switch input after a system reset

Clock distribution for RTC/AWU clock

The rtc_ck clock source can be one of the following:

The source clock is selected by programming the RTCSEL[1:0] bits in the RCC Backup domain control register (RCC_BDCR) and the RTCPRE[5:0] bits in the RCC clock configuration register (RCC_CFGR).

This selection cannot be modified without resetting the Backup domain.

Figure 71. Clock distribution for RTC

Block diagram of clock distribution for RTC. The RCC block contains a multiplexer (PKSU) selecting between LSE_ck, LSI_ck, and HSE_ck based on RTCSEL. The output is divided by RTCPRE and then passes through a dynamic switch (PKSU) to the PKEU. The PKEU contains logic for rtc_pclk (using RTCAPBEN and RTCAPBLPEN) and rtc_ker_ck (using RTCEN and hse_rtc_ck). The RTC block receives these clocks.

The diagram illustrates the clock distribution for the RTC. Inside the RCC block, the RTCSEL signal controls a multiplexer (PKSU) that selects between LSE_ck, LSI_ck, and HSE_ck. The selected clock is divided by RTCPRE (from 2 to 63) and then passes through a dynamic switch (PKSU) to the PKEU. The PKEU contains logic for rtc_pclk (using RTCAPBEN and RTCAPBLPEN) and rtc_ker_ck (using RTCEN and hse_rtc_ck). The RTC block receives these clocks. A legend indicates that a red 'D' in a box represents a dynamic switch with glitch-free transitions, thick lines represent bus interface clocks, and thin lines represent kernel clocks.

Block diagram of clock distribution for RTC. The RCC block contains a multiplexer (PKSU) selecting between LSE_ck, LSI_ck, and HSE_ck based on RTCSEL. The output is divided by RTCPRE and then passes through a dynamic switch (PKSU) to the PKEU. The PKEU contains logic for rtc_pclk (using RTCAPBEN and RTCAPBLPEN) and rtc_ker_ck (using RTCEN and hse_rtc_ck). The RTC block receives these clocks.

If the LSE is selected as RTC clock, the RTC works normally even if the backup or the \(V_{DD}\) supply disappears.

The LSE clock is in the Backup domain, whereas the other oscillators are not. As a consequence:

The rtc_ck clock is enabled through RTCEN bit located in the RCC Backup domain control register (RCC_BDCR).

The RTC bus interface clock (APB clock) is enabled through RTCAPBEN and RTCAPBLPEN bits located in RCC_APB4ENR/LPENR registers.

Note: To read the RTC calendar register when the APB clock frequency is less than seven times the RTC clock frequency (\(F_{APB} < 7 \times F_{RTCLK}\)), the software must read the calendar time and date registers twice. The data are correct if the second read access to RTC_TR gives the same result than the first one. Otherwise a third read access must be performed.

Clock distribution for watchdog

The RCC provides the clock for the two watchdog blocks available on the circuit. The independent watchdog (IWDG) is connected to the LSI. The window watchdog (WWDG) is connected to the APB clock.

If an independent watchdog is started by either hardware option or software access, the LSI is forced ON and cannot be disabled. After the LSI oscillator setup delay, the clock is provided to the IWDG.

The window watchdog clock (pclk1) can be enabled by setting the WWDGEN bit in RCC_APB1ENR register. The software cannot stop WWDG down-counting by setting WWDGEN bit to '0'.

The WWDG block is frozen when the MCU goes to Stop mode.

Figure 72. Clock distribution for WWDG and IWDG

Block diagram showing clock distribution for WWDG and IWDG. The RCC block contains RCC_CSR, LSI_enable, and LSI. It interfaces with WWDG and IWDG blocks. WWDG is controlled by WWDGEN and WWDGLPEN signals and receives pclk1. IWDG is controlled by OTP Logic (OTP_IWDG_HW, OTP_IWDG_FZ_STANDBY, OTP_IWDG_FZ_STOP, Debug function) and receives pclk4. The PKEU block contains a dynamic switch (D) that selects between pclk1 and pclk4. The LSI block provides lsi_enable and lsi_ck signals. Legend: D - The switch is dynamic: the transition between two inputs is glitch-free. Thick lines - Bus interface clocks. Thin lines - Kernel clocks. MSv54134V2.
Block diagram showing clock distribution for WWDG and IWDG. The RCC block contains RCC_CSR, LSI_enable, and LSI. It interfaces with WWDG and IWDG blocks. WWDG is controlled by WWDGEN and WWDGLPEN signals and receives pclk1. IWDG is controlled by OTP Logic (OTP_IWDG_HW, OTP_IWDG_FZ_STANDBY, OTP_IWDG_FZ_STOP, Debug function) and receives pclk4. The PKEU block contains a dynamic switch (D) that selects between pclk1 and pclk4. The LSI block provides lsi_enable and lsi_ck signals. Legend: D - The switch is dynamic: the transition between two inputs is glitch-free. Thick lines - Bus interface clocks. Thin lines - Kernel clocks. MSv54134V2.

1. X represents the selected switch input after a system reset

Clock distribution for Debug and Trace

The clock generation for the trace and debug is controlled by the DBGMCU block. The DBGCKEN bit allows the application to provide a clock to the debug components. It is also possible to enable this clock via the Debug Access Port.

The trace clock generation is controlled via TRACECKEN bit.

Figure 73. Clock distribution for DBG and trace

Block diagram showing clock distribution for DBG and trace. The RCC block contains logic gates and a ÷3 divider. It receives DBGCKEN from DBGMCU and TRACECKEN from DBGMCU. It outputs sys_bus_ck, sys_cpu_ck, and trace_ck. The DEBUG and TRACE block contains ACK Logic and receives CDBGPWRUPREQ, CDBGPWRUPACK, ck_apb_dbg, ck_sys_dbg (50% duty cyc.), and ck_trace (traceclkin). MSv54135V2.
Block diagram showing clock distribution for DBG and trace. The RCC block contains logic gates and a ÷3 divider. It receives DBGCKEN from DBGMCU and TRACECKEN from DBGMCU. It outputs sys_bus_ck, sys_cpu_ck, and trace_ck. The DEBUG and TRACE block contains ACK Logic and receives CDBGPWRUPREQ, CDBGPWRUPACK, ck_apb_dbg, ck_sys_dbg (50% duty cyc.), and ck_trace (traceclkin). MSv54135V2.

1. X represents the selected switch input after a system reset

Clock frequency measurement using TIMx

Most of the clock source generator frequencies can be measured by means of the input capture of TIMx.

The primary purpose of having the LSE connected to a TIMx input capture is to be able to accurately measure the HSI or CSI. This requires to use the HSI or CSI as system clock source either directly or via PLL1. The number of system clock counts between

consecutive edges of the LSE signal gives a measurement of the internal clock period. Taking advantage of the high precision of LSE crystals (typically a few tens of ppm) we can determine the internal clock frequency with the same resolution, and trim the source to compensate for manufacturing-process and/or temperature- and voltage-related frequency deviations.

The basic concept consists in providing a relative measurement (e.g. HSI/LSE ratio). The precision is therefore tightly linked to the ratio between the two clock sources. The greater the ratio is, the more accurate the measurement is.

The HSI and CSI oscillators have dedicated user-accessible calibration bits for this purpose (see RCC CSI calibration register (RCC_CSICFGR)). When HSI or CSI is used via the PLLx, the system clock can also be fine-tuned by using the fractional divider of the PLLs.

The LSI frequency can also be measured: this is useful for applications that do not have a crystal. The ultra-low-power LSI oscillator has a large manufacturing process deviation. The LSI clock frequency can be measured using the more precise HSI clock source. Using this measurement, a more accurate RTC time base timeouts (when LSI is used as the RTC clock source) and/or an IWDG timeout with an acceptable accuracy can be obtained.

7.5.10 General clock concept overview

The RCC handles the distribution of the CPU, bus interface and peripheral clocks for the system, according to the CPU operating mode (refer to Section 7.5.1: Clock naming convention for details on clock definitions).

For each peripheral, the application can control the activation/deactivation of its kernel and bus interface clock. Prior to use a peripheral, the CPU must enable it (by setting PERxEN to 1), and define if this peripheral remains active in Sleep mode (by setting PERxLPEN to 1). This is called 'allocation' of a peripheral by the CPU (refer to Section 7.5.11: Peripheral allocation for more details).

The peripheral allocation is used:

Memory handling

The CPU can access all the memory areas available in the product:

The BKPRAM, AHBSRAM1 and AHBSRAM2 have dedicated enable bits in order to gate the bus interface clock. The CPU needs to enable them prior to use these memories.

Note: The memory interface clocks (Flash memory and RAM interfaces) can be stopped by software during Sleep mode (via SRAMyLPEN bits).

Refer to Section 7.5.12: Peripheral clock gating control and Section 7.5.13: CPU and bus matrix clock gating control sections for details on clock enabling.

7.5.11 Peripheral allocation

The CPU can allocate a peripheral and hence control its kernel and bus interface clock.

The CPU can allocate a peripheral by setting the dedicated PERxEN bit to 1.

The CPU can control the peripheral clocks gating when it is in Sleep mode via the PERxLPEN bits.

Refer to for additional information.

The peripheral allocation bits (PERxEN bits) are used by the hardware to provide the kernel and bus interface clocks to the peripherals. However they are also used to link peripherals to the CPU. In this way, the hardware is able to safely gate the peripheral clocks and bus matrix clocks according to CPU states.

Clock switches and gating

The input selected by the clock switches can be changed dynamically without generating spurs or timing violation. For example, if PERxSEL (In Figure 74) goes from 0 to 1, the switch first disables the clock output using the currently selected clock (in0_ck), and enables again the clock output using the new selected clock (in1_ck). The disable and enable commands are re-synchronized to their respective clocks. If one of the two clocks are not present, the sequence cannot be completed, and no clock is output. To recover from this situation, the user must either provide a valid clock to in1_ck input or set back PERxSEL to 0.

During the transition from one input to another, the kernel clock provided to the peripheral is gated, in the worst case, during 2 or 3 clock cycles of the new selected clock. As shown in Figure 74, both input clocks must be present during transition time.

Figure 74. Kernel clock switching

Figure 74: Kernel clock switching diagram. The diagram shows the timing relationship between PERxSEL, in0_ck, in1_ck, and rcc_perx_ker_ck. PERxSEL transitions from 0 to 1. During the 'Transition time', in0_ck is disabled (indicated by a dashed line) and in1_ck is enabled. The rcc_perx_ker_ck (Kernel clock provided to PERx) is shown as a continuous signal. A callout box shows a multiplexer with PERxSEL as the select line, in0_ck as input 0, and in1_ck as input 1, outputting rcc_perx_ker_ck. A note states: 'In this area, ck_in0 clock can be disabled'.

MSv54136V1

Figure 74: Kernel clock switching diagram. The diagram shows the timing relationship between PERxSEL, in0_ck, in1_ck, and rcc_perx_ker_ck. PERxSEL transitions from 0 to 1. During the 'Transition time', in0_ck is disabled (indicated by a dashed line) and in1_ck is enabled. The rcc_perx_ker_ck (Kernel clock provided to PERx) is shown as a continuous signal. A callout box shows a multiplexer with PERxSEL as the select line, in0_ck as input 0, and in1_ck as input 1, outputting rcc_perx_ker_ck. A note states: 'In this area, ck_in0 clock can be disabled'.

In the same way, the clock gating logic synchronizes the enable command (coming generally from a kernel clock request or PERxEN bits) with the selected clock, in order to avoid generation of spurs.

be the rising edge of the PERxEN bits of RCC_xxxxENR registers, or a kernel clock request asserted by a peripheral.

Note: Both the kernel and bus interface clocks are affected by this re-synchronization delay.

7.5.12 Peripheral clock gating control

As mentioned previously, each peripheral requires one or several bus interface clock, named rcc_perx_bus_ck (for peripheral 'x'). These clocks can be an APB, AHB or AXI clock, according to which bus or busses, the peripheral is connected.

The clocks used as bus interface for peripherals, can be aclk, hclk[5:1], pclk[5:4], or pclk[2:1], depending on the bus connected to each peripheral.

Some peripherals also require dedicated clocks for their communication interface. These clocks are generally asynchronous with respect to the bus interface clock. They are named kernel clocks (perx_ker_ck). Both bus interface and kernel clocks can be gated according to several conditions detailed hereafter.

As shown in Figure 75, enabling the kernel and bus interface clocks of each peripheral depends on several input signals:

Refer to Section 7.5.11: Peripheral allocation for more details.

Figure 75. Peripheral kernel clock enable logic details

Block diagram of Peripheral kernel clock enable logic details. The diagram shows the internal logic of the RCC (Reset and Clock Control) block for enabling peripheral clocks. It includes the SCGU (System clock generation) providing rcc_bus_ck, the PKSU (Peripheral kernel clock selection) with a PERxSEL multiplexer, and the SCEU (System clock enabling unit) and PKEU (Peripheral kernel clock enabling) blocks. The SCEU contains busif Control Logic and a sync block, receiving PERxEN, PERxLPEN, and CPU_state signals to generate rcc_perx_bus_en and rcc_perx_bus_ck. The PKEU contains Kernel Control Logic and a sync block, receiving the same signals plus perx_ker_ckreq to generate rcc_perx_ker_en and rcc_perx_ker_ck. Both final clocks are AND-gated with their respective enable signals before reaching the PERx block. A note indicates that perx_ker_ckreq is only present when the peripheral offers the feature.

The diagram illustrates the logic for enabling peripheral kernel and bus interface clocks within the RCC. The SCGU provides the base bus clock (rcc_bus_ck). The PKSU selects a kernel clock (PERxSEL) which is then processed by the SCEU and PKEU. The SCEU uses PERxEN, PERxLPEN, and CPU_state to generate an enable signal (rcc_perx_bus_en) for the bus interface clock (rcc_perx_bus_ck). The PKEU uses the same signals plus a peripheral request (perx_ker_ckreq) to generate an enable signal (rcc_perx_ker_en) for the kernel clock (rcc_perx_ker_ck). Both final clocks are AND-gated with their enable signals before being sent to the PERx block.

MSv54137V1

Block diagram of Peripheral kernel clock enable logic details. The diagram shows the internal logic of the RCC (Reset and Clock Control) block for enabling peripheral clocks. It includes the SCGU (System clock generation) providing rcc_bus_ck, the PKSU (Peripheral kernel clock selection) with a PERxSEL multiplexer, and the SCEU (System clock enabling unit) and PKEU (Peripheral kernel clock enabling) blocks. The SCEU contains busif Control Logic and a sync block, receiving PERxEN, PERxLPEN, and CPU_state signals to generate rcc_perx_bus_en and rcc_perx_bus_ck. The PKEU contains Kernel Control Logic and a sync block, receiving the same signals plus perx_ker_ckreq to generate rcc_perx_ker_en and rcc_perx_ker_ck. Both final clocks are AND-gated with their respective enable signals before reaching the PERx block. A note indicates that perx_ker_ckreq is only present when the peripheral offers the feature.

Table 68 gives a detailed description of the enabling logic of the peripheral clocks for peripherals located in the CPU domain and allocated by the CPU.

Table 68. Peripheral clock enabling

PERxENPERxLPENPERxSELperx_ker_ckreqCPU statercc_perx_ker_ckrcc_perx_bus_ckComments
0XXXX--No clock provided to the peripheral, because PERxEN=0
1XXXRunCKCKKernel and bus interface clocks are provided to the peripheral, because the CPU is in Run, and PERxEN = 1.
10XXSleep--No clock provided to the peripheral, because the CPU is in Sleep and PERxLPEN = 0
11CKCKKernel and bus interface clocks are provided to the peripheral, because CPU is in Sleep, and PERxLPEN = 1
10XXStop--No clock provided to the peripheral because the PERxLPEN bit is set to 0.
11no lsi_ck and no lse_ck and no hsi_ker_ck and no csi_ker_ckX--No clock provided to the peripheral because CPU is in Stop and lse_ck or lsi_ck or hsi_ker_ck or csi_ker_ck are not selected as kernel clock.
11lsi_ck or lse_ckXCK-Kernel clock is provided to the peripheral because: PERxEN = PERxLPEN = 1 and lsi_ck or lse_ck are selected and enabled.
The bus interface clock is not provided as the CPU is in Stop.
11hsi_ker_ck or csi_ker_ck1CK-Kernel clock is provided to the peripheral because: req_ker_perx = 1, and PERxEN = PERxLPEN = 1 and hsi_ker_ck or csi_ker_ck are selected and enabled.
The bus interface clock is not provided as the CPU is in Stop.
11hsi_ker_ck or csi_ker_ck0--No clock provided to the peripheral because CPU is in Stop, and no kernel clock request pending

As a summary, we can state that the kernel clock is provided to the peripherals when the following conditions are met:

  1. 1. The CPU is in Run mode, and the peripheral is enabled.
  2. 2. The CPU is in Sleep mode and the peripheral is enabled with PERxLPEN = 1.
  3. 3. The CPU is in Stop mode, the peripheral is enabled with PERxLPEN = 1, the peripheral generates a kernel clock request and the selected clock is hsi_ker_ck or csi_ker_ck.
  4. 4. The CPU is in Stop mode, the peripheral is enabled with PERxLPEN = 1 and the kernel source clock of the peripheral is lse_ck or lsi_ck.

The bus interface clock is provided to the peripherals only when conditions 1 or 2 are met.

The RNG block is not clocked as other peripherals, the table hereafter shows the way RNG is clocked.

Table 69. RNG clock enabling

RNGENRNGLPENrng_ker_ckreqCPU statehsi48_ker_ckrcc_rng_hclk3Comments
0XXX--No clock provided to the peripheral, because RNGEN=0
1X0Run-CKhsi48_ker_ck not provided because the kernel clock request is not asserted. hclk3 clock is provided
1X1CKCKBoth hsi48_ker_ck and hclk3 are provided because the kernel clock request is asserted, and RNGEN = 1.
10XSleep--No clock provided, because the CPU is in Sleep and RNGLPEN = 0
110-CKhsi48_ker_ck not provided because the kernel clock request is not asserted. hclk3 clock is provided
111CKCKBoth hsi48_ker_ck and hclk3 are provided because the kernel clock request is asserted, RNGEN = 1 and RNGLPEN = 1
1XXStop--No clock provided because the CPU is in Stop mode

7.5.13 CPU and bus matrix clock gating control

The clocks of the CPU, AHB and AXI bridges and APB busses are enabled according to the rules hereafter:

7.5.14 Low-power emulation modes

In order to ease the debugging of the circuit, the RCC is able to handle an emulation mode for Stop and Standby modes.

Sleep emulation mode

The Sleep emulation mode is controlled by the DBG_SLEEP bit of the DBGMCU_CR register. When the processor goes to Sleep with DBG_SLEEP = 1, then the processor clock, the clocks of all enabled peripherals, debug parts, and interconnect are maintained activated.

Stop emulation mode

The Stop emulation mode is controlled by the DBG_STOP bit of DBGMCU_CR register. When the processor goes to Stop with DBG_STOP = 1, then:

When a wake-up event occurs:

Standby emulation mode

The Standby emulation mode is controlled by the DBG_STANDBY bit of the DBGMCU_CR register.

When the system goes to Standby with DBG_STANDBY = '1', then:

When the system exits from Standby, then:

7.6 RCC interrupts

The RCC provides three interrupt lines:

The interrupt enable is controlled via RCC clock source interrupt enable register (RCC_CIER), except for the HSE CSS failure. When the HSE CSS feature is enabled, it not possible to mask the interrupt generation.

The interrupt flags can be checked via RCC clock source interrupt flag register (RCC_CIFR), and these flags can be cleared via RCC clock source interrupt clear register (RCC_CICR).

Note: The interrupt flags are not relevant if the corresponding interrupt enable bit is not set.

Table 70 gives a summary of the interrupt sources and the way to control them.

Table 70. Interrupt sources and control

Interrupt sourceDescriptionInterrupt enableAction to clear interruptInterrupt line
LSIRDYFLSI readyLSIRDYIESet LSIRDYC to 1rcc_it
LSERDYFLSE readyLSERDYIESet LSERDYC to 1
HSIDRYFHSI readyHSIDRYIESet HSIRDYC to 1
HSERDYFHSE readyHSERDYIESet HSERDYC to 1
CSIRDYFCSI readyCSIRDYIESet CSIRDYC to 1
HSI48RDYFHSI48 readyHSI48RDYIESet HSI48RDYC to 1
PLL1RDYFPLL1 readyPLL1RDYIESet PLL1RDYC to 1
PLL2RDYFPLL2 readyPLL2RDYIESet PLL2RDYC to 1
PLL3RDYFPLL3 readyPLL3RDYIESet PLL3RDYC to 1
LSECSSFLSE CSS failureLSECSSFIE (1)Set LSECSSC to 1rcc_lsecss_it
HSECSSFHSE CSS failure_(2)Set HSECSSC to 1rcc_hsecss_it

1. The security system feature must also be enabled (LSECSSON = 1), in order to generate interrupts.

2. It is not possible to mask this interrupt when the security system feature is enabled (HSECSSON = 1).

7.7 RCC Programming examples

7.7.1 PLL programming procedure

PLL initialization procedure

The recommended initialization sequence of the PLLs for the integer and fractional mode is given hereafter:

Note: When the PLLxRDY goes to 1, it means that the PLLx output frequency is within 2% of its target value.

Reprogramming post-dividers

When the PLLs are enabled, it is possible to change the values of a post-dividers (DIVP, DIVQ, DIVR, DIVS or DIVT) without disabling the corresponding PLLx, by performing the following sequence:

PLL disabling procedure

The recommended disabling sequence is given hereafter:

Using the SSCG block

For example, if an application needs to generate with the PLL2, a clock signal having the following characteristics:

The assumption is that the crystal oscillator is 8 MHz (\(F_{hse\_ck}\)).

DIVM2 is programmed to 0 in order to provide a reference clock of 8 MHz to the PLL2 (\(F_{ref2\_ck}\)). The VCOH must be selected when SSCG is used.

From a 8 MHz reference clock, it is possible to generate 200 MHz, by programming the PLL2 as follow: (DIVN+1) = 50, (\(F_{vco}\) = 800 MHz), (DIVS+1) = 4.

The application has to compute the following parameters:

Computing MODPER:

\[MODPER = \text{ROUND}\left(\frac{F_{ref\_ck}}{4 \times F_{MOD}}\right) = \text{ROUND}\left(\frac{8 \times 10^6}{4 \times 28 \times 10^3}\right) = 71\]

Computing INCSTEP:

\[INCSTEP = \text{ROUND}\left(\frac{(2^{15} - 1) \times M_D \times (DIVN + 1)}{100 \times 5 \times MODPER}\right) = \text{ROUND}\left(\frac{32767 \times 0.5 \times (49 + 1)}{100 \times 5 \times 71}\right) = 23\]

Check that MODPER × INCSTEP is lower than (2¹⁵-1)

In the example, \(\text{MODPER} \times \text{INCSTEP} = 1633 \implies \text{OK}\)

Due to rounding operations, the modulation period and the modulation depth does not completely match the target. The real modulation depth is:

\[M_D (\%) = \frac{\text{MODPER} \times \text{INCSTEP} \times 100 \times 5}{(2^{15} - 1) \times (\text{DIVN} + 1)} = \frac{71 \times 23 \times 100 \times 5}{(2^{15} - 1) \times (49 + 1)} = 0.498 \%\]

And the modulation frequency (\(F_{\text{mod}}\)) is:

\[F_{\text{mod}} = \frac{F_{\text{ck\_ref}}}{4 \times \text{MODPER}} = \frac{8 \times 10^6}{4 \times 71} = 28.2 \text{ kHz}\]

The down-spread modulation must be used (SPREADSEL = 1) to keep the maximum frequency to a value lower than 200 MHz.

7.7.2 Frequency configuration examples

This section gives various frequency settings for CPU and XSPI interfaces, combined with audio constraints. The case without audio constraints is not shown as it is obvious that PLL1 and PLL2 can provide the expected frequency. If audio applications are required, several options are offered to the user:

In this section, we explore the cases where PLL1 or PLL2 are used for audio.

Note as well that PLL2 is also used for XSPIs, if it is shared for audio application, it is not recommended to activate the SSCG.

The configurations listed in the tables hereafter are not exhaustive, many other setting are available. For example if the clock provided to the SAI must be shared with FDCAN, then the application would like to generate a clock around 100 MHz to insure good working conditions for FDCAN. These considerations are not taken into account in these tables.

Note also that in order to get the best clock quality at PLL output, \(F_{\text{REF}}\) must be as close as possible to 16 MHz. This is not always easy to do for PLLs in integer mode, but can be done easily when the PLLs are in fractional mode (as shown in the tables).

Table 71. Clock configuration examples with PLLs in integer mode

ConfigurationHSE (MHz)DIVM+1FREF (MHz)(1)PLLxRGEDIVN+1FRACVFVCO (MHz)(2)DIVP+1DIVQ+1DIVS/T+1FCPU (MHz)(3)FXSPI (MHz)(4)FAUDIO (MHz)(5)FCPU accuracy (%)FXSPI accuracy (%)FAUDIO accuracy (ppm)
PLL1
CPU: 500 MHz
Audio: 48 kHz
1672.28612150982.914491.4-122.86-1.7--186
24112.18212140933.8119466.9-24.574-6.6--75
PLL1
CPU: 500 MHz
Audio: 44.1 kHz
1635.3332910970.7143485.3-11.287-3--246
24102.40012070993.614496.8-124.2-0.6-116
PLL1
CPU: 550 MHz
Audio: 48 kHz
1653.200116901081.6111540.8-49.164-1.7-237
24212.00034301032.016516.0-86.00-6.2--186
PLL1
CPU: 550 MHz
Audio: 44.1 kHz
1682.000127101084.016542.0-90.333-1.5-183
24122.000127101084.016542.0-90.333-1.5-183
PLL1
CPU: 600 MHz
Audio: 48 kHz
1672.286125801179.416589.7-98.290-1.7--186
2473.429117201179.416589.7-98.290-1.7--186
PLL1
CPU: 600 MHz
Audio: 44.1 kHz
1653.200118701196.8153598.4-11.291-0.2-86
24112.182126901173.8113586.9-45.147-2.1--256
PLL2
XSPI: 200 MHz
Audio: 48 kHz
1672.286125801179.46-3-196.698.286--1.7-186
2473.429123301597.713-4-199.761.451--0.14172
PLL2
XSPI: 200 MHz
Audio: 44.1 kHz
1653.200118701196.853-3-199.511.291--0.386
24112.182135701557.823-4-194.733.866--2.6-94
PLL2
XSPI: 166 MHz
Audio: 48 kHz
1672.28612150962.94-3-163.8122.86--1.7-186
2483.000121301278.013-4-159.749.154--4.138
PLL2
XSPI: 166 MHz
Audio: 44.1 kHz
1682.000133301332.059-4-166.511.288--0.1-130
24102.40012070993.6434-165.6124.200--0.6116
  1. 1. FREF is the reference frequency at PLL1 or PLL2 inputs
  2. 2. FVCO is the clock frequency at VCO output of PLL1 or PLL2
  3. 3. FCPU is the clock frequency provided to the CPU (rcc_cpu_ck)
  4. 4. FXSPI is the kernel clock frequency provided to the XSPI1 or XSPI2 (xspi_ker_ck)
  5. 5. FAUDIO is the kernel clock frequency provided to the audio blocks SAIx, SPI/I2Sx, ...
    For a 48 kHz stream, the expected kernel clock is 48 kHz x 256 x k, with k integer
    For a 44.1 kHz stream, the expected kernel clock is 44.1 kHz x 256 x k, with k integer
Table 72. Clock configuration examples with PLLs in fractional mode(1)
ConfigurationHSE (MHz)DIVM+1FREF (MHz)(2)DIVN+1FRACVFVCO (MHz)(3)DIVP+1DIVQ+1DIVS/T+1FCPU (MHz)(4)FXSPI (MHz)(5)FAUDIO (MHz)(6)FCPU accuracy (%)FXSPI accuracy (%)FAUDIO accuracy (ppm)
PLL1
CPU: 500 MHz
Audio: 48 kHz
16116.0305898983.014491.5122.88-1.7-1
24212.0407864
PLL1
CPU: 500 MHz
Audio: 44.1 kHz
16116.031380993.514-496.7-124.2-0.6--0.4
24212.0413237-1.4
PLL1
CPU: 550 MHz
Audio: 48 kHz
16116.03364881081.3111540.749.15-1.70.2
24212.0454590.7
PLL1
CPU: 550 MHz
Audio: 44.1 kHz
16116.03371171083.816-541.9-90.32-1.5--0.7
24212.04512981.0
PLL1
CPU: 600 MHz
Audio: 48 kHz
16116.03670781179.616589.898.30-1.70
24212.04912450
PLL1
CPU: 600 MHz
Audio: 44.1 kHz
16116.03656621174.1113-587.0-45.158-2.1--1.0
24212.04875501.0
PLL2
XSPI: 200 MHz
Audio: 48 kHz
16116.03670781179.76-3-196.698.304--1.70.4
24212.0491245----0.5
PLL2
XSPI: 200 MHz
Audio: 44.1 kHz
16116.03656621174.113-3-195.745.158--2.1-1
24212.0487550---0.6
PLL2
XSPI: 166 MHz
Audio: 48 kHz
16116.0305898983.04-3-163.8122.88--1.7-0.9
24212.0407864----0.9
PLL2
XSPI: 166 MHz
Audio: 44.1 kHz
16116.031380993.54-3-165.6124.186--0.7-0.4
24212.0413237--124.185--1.4
  1. Note that for all these configurations, PLLxRGE is always equal to 3.
  2. FREF is the reference frequency at PLL1 or PLL2 inputs.
  3. FVCO is the clock frequency at VCO output of PLL1 or PLL2
  4. FCPU is the clock frequency provided to the CPU (rcc_cpu_ck)
  5. FXSPI is the kernel clock frequency provided to the XSPI1 or XSPI2 (xspi_ker_ck)
  6. FAUDIO is the kernel clock frequency provided to the audio blocks SAIx, SPI/I2Sx,...
    For a 48 kHz stream, the expected kernel clock is 48 kHz x 256 x k, with k integer
    For a 44.1 kHz stream, the expected kernel clock is 44.1 kHz x 256 x k, with k integer

7.8 RCC registers

7.8.1 RCC source control register (RCC_CR)

Address offset: 0x000

Reset value: 0x0000 0025

31302928272625242322212019181716
Res.Res.PLL3RDYPLL3ONPLL2RDYPLL2ONPLL1RDYPLL1ONRes.Res.Res.HSECSSONHSEEXTHSEBYPHSERDYHSEON
rrwrrwrrwrsrwrwrrw
1514131211109876543210
Res.Res.HSI48RDYHSI48ONRes.Res.CSIKERONCSIRDYCSIONRes.HSIDIVFHSIDIV[1:0]HSIRDYHSIKERONHSION
rrwrwrrwrrwrwrrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bit 29 PLL3RDY: PLL3 clock ready flag

Set by hardware to indicate that the PLL3 is locked.

0: PLL3 unlocked (default after reset)

1: PLL3 locked

Bit 28 PLL3ON: PLL3 enable

Set and cleared by software to enable PLL3.

Cleared by hardware when entering Stop or Standby mode.

0: PLL3 OFF (default after reset)

1: PLL3 ON

Bit 27 PLL2RDY: PLL2 clock ready flag

Set by hardware to indicate that the PLL2 is locked.

0: PLL2 unlocked (default after reset)

1: PLL2 locked

Bit 26 PLL2ON: PLL2 enable

Set and cleared by software to enable PLL2.

Cleared by hardware when entering Stop or Standby mode. Note that the hardware prevents writing this bit to 0, if FMCCCKP = 1, or XSPICKP = 1.

0: PLL2 OFF (default after reset)

1: PLL2 ON

Bit 25 PLL1RDY: PLL1 clock ready flag

Set by hardware to indicate that the PLL1 is locked.

0: PLL1 unlocked (default after reset)

1: PLL1 locked

Bit 12 HSI48ON: HSI48 clock enable

Set by software and cleared by software or by the hardware when the system enters to Stop or Standby mode.

0: HSI48 is OFF (default after reset)

1: HSI48 is ON

Bits 11:10 Reserved, must be kept at reset value.

Bit 9 CSIKERON: CSI clock enable in Stop mode

Set and reset by software to force the CSI to ON, even in Stop mode, in order to be quickly available as kernel clock for some peripherals. This bit has no effect on the value of CSION.

0: no effect on CSI (default after reset)

1: CSI is forced to ON even in Stop mode

Bit 8 CSIRDY: CSI clock ready flag

Set by hardware to indicate that the CSI oscillator is stable. This bit is activated only if the RC is enabled by CSION (it is not activated if the CSI is enabled by CSIKERON or by a peripheral request).

0: CSI clock is not ready (default after reset)

1: CSI clock is ready

Bit 7 CSION: CSI clock enable

Set and reset by software to enable/disable CSI clock for system and/or peripheral.

Set by hardware to force the CSI to ON when the system leaves Stop mode, if STOPWUCK = 1 or STOPKERWUCK = 1.

This bit cannot be cleared if the CSI is used directly (via SW mux) as system clock, or if the CSI is selected as reference clock for PLL1 with PLL1ON bit set to 1) or if FMCKP = 1, or if XSPICKP = 1.

0: CSI is OFF (default after reset)

1: CSI is ON

Bit 6 Reserved, must be kept at reset value.

Bit 5 HSIDIVF: HSI divider flag

Set and reset by hardware.

As a write operation to HSIDIV has not an immediate effect on the frequency, this flag indicates the current status of the HSI divider. HSIDIVF goes immediately to 0 when HSIDIV value is changed, and is set back to 1 when the output frequency matches the value programmed into HSIDIV.

0: new division ratio not yet propagated to hsi(_ker)_ck (default after reset)

1: hsi(_ker)_ck clock frequency reflects the new HSIDIV value (default register value when the clock setting is completed)

Bits 4:3 HSIDIV[1:0]: HSI clock divider

Set and reset by software.

These bits allow selecting a division ratio in order to configure the wanted HSI clock frequency. The HSIDIV cannot be changed if the HSI is selected as reference clock for at least one enabled PLL (PLLxON bit set to 1). In that case, the new HSIDIV value is ignored.

00: division by 1, hsi(_ker)_ck = 64 MHz (default after reset)

01: division by 2, hsi(_ker)_ck = 32 MHz

10: division by 4, hsi(_ker)_ck = 16 MHz

11: division by 8, hsi(_ker)_ck = 8 MHz

Bit 2 HSIRDY: HSI clock ready flag

Set by hardware to indicate that the HSI oscillator is stable.

0: HSI clock is not ready (default after reset)

1: HSI clock is ready

Bit 1 HSIKERON: HSI clock enable in Stop mode

Set and reset by software to force the HSI to ON, even in Stop mode, in order to be quickly available as kernel clock for peripherals. This bit has no effect on the value of HSION.

0: no effect on HSI (default after reset)

1: HSI is forced to ON even in Stop mode

Bit 0 HSION: HSI clock enable

Set and cleared by software.

Set by hardware to force the HSI to ON when the product leaves Stop mode, if STOPWUCK = 0 or STOPKERWUCK = 0.

Set by hardware to force the HSI to ON when the product leaves Standby mode or in case of a failure of the HSE which is used as the system clock source.

This bit cannot be cleared if the HSI is used directly (via SW switch) as system clock, or if the HSI is selected as reference clock for PLL1 with PLL1 enabled (PLL1ON bit set to 1) or if FMCCCKP = 1, or if XSPICKP = 1.

0: HSI is OFF

1: HSI is ON (default after reset)

7.8.2 RCC clock protection register (RCC_CKPROTR)

Address offset: 0x100

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.FMCSWP[2:0]Res.XSPI2SWP[2:0]Res.XSPI1SWP[2:0]Res.Res.FMCKPXSPICKP
rrrrrrrrrrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 FMCSWP[2:0]: FMC kernel clock switch position

Set by hardware.

This field can be used to verify the real position of FMC kernel switch selector.

000: The switch is in neutral mode and output clock is gated (default after reset)

001: The switch is selecting hclk5

010: The switch is selecting pll1_q_ck

011: The switch is selecting pll2_r_ck

100: The switch is selecting hsi_ker_ck

101: The switch is in recovery position (hclk5/4)

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 XSPI2SWP[2:0]: XSPI2 kernel clock switch position

Set by hardware.

This field can be used to verify the real position of XSPI2 kernel switch selector.

000: The switch is in neutral mode and output clock is gated (default after reset)

001: The switch is selecting hclk5

010: The switch is selecting pll2_s_ck

011: The switch is selecting pll2_t_ck

100: The switch is in recovery position (hclk5/4)

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 XSPI1SWP[2:0]: XSPI1 kernel clock switch position

Set by hardware.

This field can be used to verify the real position of XSPI1 kernel switch selector.

000: The switch is in neutral mode and output clock is gated (default after reset)

001: The switch is selecting hclk5

010: The switch is selecting pll2_s_ck

011: The switch is selecting pll2_t_ck

100: The switch is in recovery position (hclk5/4)

Bits 3:2 Reserved, must be kept at reset value.

Bit 1 FMCCKP: FMC clock protection

Set and cleared by software.

When set to 1, this bit prevents disabling accidentally the FMC. The following fields cannot be modified when this bit is set to 1:

PLL1ON, PLL2ON, PLL1QEN, PLL2REN, HSEON, HSION, CSION, FMCEN, FMCLPEN, FMCRST.

0: Clock protection is disabled (default after reset)

1: Clock protection is enabled

Bit 0 XSPICKP: XSPI clock protection

Set and cleared by software.

When set to 1, this bit prevents disabling accidentally the XSPIs. The following fields cannot be modified when this bit is set to 1:

PLL2ON, PLL2SEN, PLL2TEN, HSEON, HSION, CSION, XSPIxEN, XSPIxLPEN, XSPIxRST.

0: Clock protection is disabled (default after reset)

1: Clock protection is enabled

7.8.3 RCC HSI calibration register (RCC_HSICFGR)

Address offset: 0x004

Reset value: 0x4000 0XXX

Reset value depends on the flash option bytes setting.

31302928272625242322212019181716
Res.HSITRIM[6:0]Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.HSICAL[11:0]
rrrrrrrrrrrr

Bit 31 Reserved, must be kept at reset value.

Bits 30:24 HSITRIM[6:0]: HSI clock trimming

Set by software to adjust calibration.

HSITRIM field is added to the engineering option bytes loaded during reset phase (FLASH_HSI_opt) in order to form the calibration trimming value.

HSICAL = HSITRIM + FLASH_HSI_opt.

Note: The reset value of the field is 0x40.

Bits 23:12 Reserved, must be kept at reset value.

Bits 11:0 HSICAL[11:0]: HSI clock calibration

Set by hardware by option byte loading.

Adjusted by software through trimming bits HSITRIM.

This field represents the sum of engineering option byte calibration value and HSITRIM bits value.

7.8.4 RCC clock recovery RC register (RCC_CRRCR)

Address offset: 0x008

Reset value: 0x0000 0XXX

Reset value depends on the flash option bytes setting.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.HSI48CAL[9:0]
rrrrrrrrrr

Bits 31:10 Reserved, must be kept at reset value.

Bits 9:0 HSI48CAL[9:0]: Internal RC 48 MHz clock calibration

Set by hardware by option byte loading.

Read-only.

7.8.5 RCC CSI calibration register (RCC_CSICFGR)

Address offset: 0x00C

Reset value: 0x2000 0XXX

Reset value depends on the flash option bytes setting.

31302928272625242322212019181716
Res.Res.CSITRIM[5:0]Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.CSICAL[7:0]
rrrrrrrr

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:24 CSITRIM[5:0]: CSI clock trimming

Set by software to adjust calibration.

CSITRIM field is added to the engineering option bytes loaded during reset phase (FLASH_CSI_opt) in order to form the calibration trimming value.

CSICAL = CSITRIM+FLASH_CSI_opt.

Note: The reset value of the field is 0x20.

Bits 23:8 Reserved, must be kept at reset value.

Bits 7:0 CSICAL[7:0]: CSI clock calibration

Set by hardware by option byte loading.

Adjusted by software through trimming bits CSITRIM.

This field represents the sum of engineering option byte calibration value and CSITRIM bits value.

7.8.6 RCC clock configuration register (RCC_CFGR)

Address offset: 0x010

Reset value: 0x0000 0000

31302928272625242322212019181716
MCO2SEL[2:0]MCO2PRE[3:0]MCO1SEL[2:0]MCO1PRE[3:0]Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TIMPRERes.RTCPRE[5:0]STOPKERWUCKSTOPWUCKSWS[2:0]SW[2:0]
rwrwrwrwrwrwrwrwrwrrrrwrwrw

Bits 31:29 MCO2SEL[2:0]: microcontroller clock output 2

Set and cleared by software. Clock source selection may generate glitches on MCO2.

It is highly recommended to configure these bits only after reset, before enabling the external oscillators and the PLLs.

000: system clock selected (sys_ck) (default after reset)

001: PLL2 oscillator clock selected (pll2_p_ck)

010: HSE clock selected (hse_ck)

011: PLL1 clock selected (pll1_p_ck)

100: CSI clock selected (csi_ck)

101: LSI clock selected (lsi_ck)

others: reserved

Bits 28:25 MCO2PRE[3:0]: MCO2 prescaler

Set and cleared by software to configure the prescaler of the MCO2. Modification of this prescaler may generate glitches on MCO2. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs.

0000: prescaler disabled (default after reset)

0001: division by 1 (bypass)

0010: division by 2

0011: division by 3

0100: division by 4

...

1111: division by 15

Bits 24:22 MCO1SEL[2:0]: Microcontroller clock output 1

Set and cleared by software. Clock source selection may generate glitches on MCO1.

It is highly recommended to configure these bits only after reset, before enabling the external oscillators and the PLLs.

000: HSI clock selected (hsi_ck) (default after reset)

001: LSE oscillator clock selected (lse_ck)

010: HSE clock selected (hse_ck)

011: PLL1 clock selected (pll1_q_ck)

100: HSI48 clock selected (hsi48_ck)

others: reserved

Bits 21:18 MCO1PRE[3:0]: MCO1 prescaler

Set and cleared by software to configure the prescaler of the MCO1. Modification of this prescaler may generate glitches on MCO1. It is highly recommended to change this prescaler only after reset, before enabling the external oscillators and the PLLs.

0000: prescaler disabled (default after reset)

0001: division by 1 (bypass)

0010: division by 2

0011: division by 3

0100: division by 4

...

1111: division by 15

Bits 17:16 Reserved, must be kept at reset value.

Bit 15 TIMPRE: timers clocks prescaler selection

This bit is set and reset by software to control the clock frequency of all the timers connected to APB1 and APB2 domains.

0: The timers kernel clock is equal to rcc_hclk1 if CDPPREx is corresponding to division by 1 or 2, else it is equal to \(2 \times F_{\text{rcc\_pclkx\_d2}}\) (default after reset)

1: The timers kernel clock is equal to rcc_hclk1 if CDPPREx is corresponding to division by 1, 2 or 4, else it is equal to \(4 \times F_{\text{rcc\_pclkx\_d2}}\)

Refer to Table 67: Ratio between clock timer and pclk for more details.

Bit 14 Reserved, must be kept at reset value.

Bits 13:8 RTCPRE[5:0]: HSE division factor for RTC clock

Set and cleared by software to divide the HSE to generate a clock for RTC.

Caution: The software must set these bits correctly to ensure that the clock supplied to the RTC is lower than 1 MHz. These bits must be configured if needed before selecting the RTC clock source.

000000: no clock (default after reset)

000001: no clock

000010: HSE/2

000011: HSE/3

000100: HSE/4

...

111110: HSE/62

111111: HSE/63

Bit 7 STOPKERWUCK: kernel clock selection after a wake up from system Stop

Set and reset by software to select the kernel wake-up clock from system Stop.

0: HSI selected as wake up clock from system Stop (default after reset)

1: CSI selected as wake up clock from system Stop

See Section 1.: Dividers values can be changed on-the-fly. All dividers provide have 50% duty-cycles. for details.

7.8.7 RCC CPU domain clock configuration register (RCC_CDCFGR)

Address offset: 0x018

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CPRE[3:0]
rwrwrwrw

Bits 31:4 Reserved, must be kept at reset value.

Bits 3:0 CPRE[3:0]: CPU domain core prescaler

Set and reset by software to control the CPU clock division factor.

Changing this division ratio has an impact on the frequency of the CPU clock and all bus matrix clocks.

After changing this prescaler value, it takes up to 16 periods of the slowest APB clock before the new division ratio is taken into account. The application can check if the new division factor is taken into account by reading back this register.

0xxx: sys_ck not divided (default after reset)

1000: sys_ck divided by 2

1001: sys_ck divided by 4

1010: sys_ck divided by 8

1011: sys_ck divided by 16

1100: sys_ck divided by 64

1101: sys_ck divided by 128

1110: sys_ck divided by 256

1111: sys_ck divided by 512

Caution: Care must be taken when using the voltage scaling. Due to the propagation delay of the new division factor, after a prescaler factor change and before lowering the \(V_{CORE}\) voltage, this register must be read in order to check that the new prescaler value has been taken into account.

Depending on the clock source frequency and the voltage range, the software application must program a correct value in BMPRE to make sure that the system frequency does not exceed the maximum frequency.

7.8.8 RCC AHB clock configuration register (RCC_BMCFGR)

Address offset: 0x01C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.BMPRE[3:0]
rwrwrwrw

Bits 31:4 Reserved, must be kept at reset value.

Bits 3:0 BMPRE[3:0]: Bus matrix clock prescaler

Set and reset by software to control the division factor of rcc_hclk[5:1] and rcc_aclk. This group of clocks is also named sys_bus_ck. Changing this division ratio has an impact on the frequency of all bus matrix clocks.

0xxx: sys_bus_ck = sys_cpu_ck (default after reset)

1000: sys_bus_ck = sys_cpu_ck / 2

1001: sys_bus_ck = sys_cpu_ck / 4

1010: sys_bus_ck = sys_cpu_ck / 8

1011: sys_bus_ck = sys_cpu_ck / 16

1100: sys_bus_ck = sys_cpu_ck / 64

1101: sys_bus_ck = sys_cpu_ck / 128

1110: sys_bus_ck = sys_cpu_ck / 256

1111: sys_bus_ck = sys_cpu_ck / 512

Note: The clocks are divided by the new prescaler factor from 1 to 16 periods of the slowest APB clock among rcc_pclk1,2,4,5 after BMPRE update.

Note: Note also that frequency of rcc_hclk[5:1] = rcc_aclk = sys_bus_ck.

7.8.9 RCC APB clocks configuration register (RCC_APBCFGR)

Address offset: 0x020

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.PPRE5[2:0]Res.PPRE4[2:0]Res.PPRE2[2:0]Res.PPRE1[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 PPRE5[2:0]: CPU domain APB5 prescaler

Set and reset by software to control the division factor of rcc_pclk5.

The clock is divided by the new prescaler factor from 1 to 16 cycles of sys_bus_ck after PPRE5 write.

0xx: rcc_pclk5 = sys_bus_ck (default after reset)

100: rcc_pclk5 = sys_bus_ck / 2

101: rcc_pclk5 = sys_bus_ck / 4

110: rcc_pclk5 = sys_bus_ck / 8

111: rcc_pclk5 = sys_bus_ck / 16

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 PPRE4[2:0]: CPU domain APB4 prescaler

Set and reset by software to control the division factor of rcc_pclk4.

The clock is divided by the new prescaler factor from 1 to 16 cycles of sys_bus_ck after PPRE4 write.

0xx: rcc_pclk4 = sys_bus_ck (default after reset)

100: rcc_pclk4 = sys_bus_ck / 2

101: rcc_pclk4 = sys_bus_ck / 4

110: rcc_pclk4 = sys_bus_ck / 8

111: rcc_pclk4 = sys_bus_ck / 16

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 PPRE2[2:0]: CPU domain APB2 prescaler

Set and reset by software to control the division factor of rcc_pclk2.

The clock is divided by the new prescaler factor from 1 to 16 cycles of sys_bus_ck after PPRE2 write.

0xx: rcc_pclk2 = sys_bus_ck (default after reset)

100: rcc_pclk2 = sys_bus_ck / 2

101: rcc_pclk2 = sys_bus_ck / 4

110: rcc_pclk2 = sys_bus_ck / 8

111: rcc_pclk2 = sys_bus_ck / 16

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 PPRE1[2:0]: CPU domain APB1 prescaler

Set and reset by software to control the division factor of rcc_pclk1.

The clock is divided by the new prescaler factor from 1 to 16 cycles of sys_bus_ck after PPRE1 write.

0xx: rcc_pclk1 = sys_bus_ck (default after reset)

100: rcc_pclk1 = sys_bus_ck / 2

101: rcc_pclk1 = sys_bus_ck / 4

110: rcc_pclk1 = sys_bus_ck / 8

111: rcc_pclk1 = sys_bus_ck / 16

7.8.10 RCC PLLs clock source selection register (RCC_PLLCKSELR)

Address offset: 0x028

Reset value: 0x0202 0200

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.DIVM3[5:0]Res.Res.DIVM2[5:4]
rwrwrwrwrwrwrwrw
1514131211109876543210
DIVM2[3:0]Res.Res.DIVM1[5:0]Res.Res.PLLSRC[1:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:26 Reserved, must be kept at reset value.

Bits 25:20 DIVM3[5:0]: prescaler for PLL3

Set and cleared by software to configure the prescaler of the PLL3.

The hardware does not allow any modification of this prescaler when PLL3 is enabled (PLL3ON = 1).

In order to save power when PLL3 is not used, the value of DIVM3 must be set to 0.

000000: prescaler disabled

000001: division by 1 (bypass)

000010: division by 2

000011: division by 3

...

100000: division by 32 (default after reset)

...

111111: division by 63

Bits 19:18 Reserved, must be kept at reset value.

Bits 17:12 DIVM2[5:0]: prescaler for PLL2

Set and cleared by software to configure the prescaler of the PLL2.

The hardware does not allow any modification of this prescaler when PLL2 is enabled (PLL2ON = 1).

In order to save power when PLL2 is not used, the value of DIVM2 must be set to 0.

000000: prescaler disabled

000001: division by 1 (bypass)

000010: division by 2

000011: division by 3

...

100000: division by 32 (default after reset)

...

111111: division by 63

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:4 DIVM1[5:0]: prescaler for PLL1

Set and cleared by software to configure the prescaler of the PLL1.

The hardware does not allow any modification of this prescaler when PLL1 is enabled (PLL1ON = 1).

In order to save power when PLL1 is not used, the value of DIVM1 must be set to 0.

000000: prescaler disabled

000001: division by 1 (bypass)

000010: division by 2

000011: division by 3

...

100000: division by 32 (default after reset)

...

111111: division by 63

Bits 3:2 Reserved, must be kept at reset value.

Bits 1:0 PLLSRC[1:0]: DIVMx and PLLs clock source selection

Set and reset by software to select the PLL clock source.

These bits can be written only when all PLLs are disabled.

In order to save power, when no PLL is used, PLLSRC must be set to '11'.

00: HSI selected as PLL clock (hsi_ck) (default after reset)

01: CSI selected as PLL clock (csi_ck)

10: HSE selected as PLL clock (hse_ck)

11: no clock send to DIVMx divider and PLLs

7.8.11 RCC PLLs configuration register (RCC_PLLCFGR)

Address offset: 0x02C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.PLL3SENPLL3RENPLL3QENPLL3PENPLL3RGE[1:0]PLL3SSCGENPLL3VCOSELPLL3FRACENRes.PLL2TENPLL2SENPLL2RENPLL2QENPLL2PEN
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
PLL2RGE[1:0]PLL2SSCGENPLL2VCOSELPLL2FRACLENRes.Res.PLL1SENRes.PLL1QENPLL1PENPLL1RGE[1:0]PLL1SSCGENPLL1VCOSELPLL1FRACEN
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bit 30 PLL3SEN: PLL3 DIVS divider output enable

Set and reset by software to enable the pll3_s_ck output of the PLL3.

To save power, PLL3SEN must be set to 0 when the pll3_s_ck is not used.

0: pll3_s_ck output disabled (default after reset)

1: pll3_s_ck output enabled

Bit 29 PLL3REN: PLL3 DIVR divider output enable

Set and reset by software to enable the pll3_r_ck output of the PLL3.

To save power, PLL3REN and DIVR bits must be set to 0 when the pll3_r_ck is not used.

0: pll3_r_ck output disabled (default after reset)

1: pll3_r_ck output enabled

Bit 28 PLL3QEN: PLL3 DIVQ divider output enable

Set and reset by software to enable the pll3_q_ck output of the PLL3.

To save power, PLL3REN and DIVR bits must be set to 0 when the pll3_r_ck is not used.

0: pll3_q_ck output disabled (default after reset)

1: pll3_q_ck output enabled

Bit 27 PLL3PEN: PLL3 DIVP divider output enable

Set and reset by software to enable the pll3_p_ck output of the PLL3.

To save power, PLL3REN and DIVR bits must be set to 0 when the pll3_r_ck is not used.

0: pll3_p_ck output disabled (default after reset)

1: pll3_p_ck output enabled

Bits 26:25 PLL3RGE[1:0]: PLL3 input frequency range

Set and reset by software to select the proper reference frequency range used for PLL3.

These bits must be written before enabling the PLL3.

00: PLL3 input (ref3_ck) clock range frequency between 1 and 2 MHz (default after reset)

01: PLL3 input (ref3_ck) clock range frequency between 2 and 4 MHz

10: PLL3 input (ref3_ck) clock range frequency between 4 and 8 MHz

11: PLL3 input (ref3_ck) clock range frequency between 8 and 16 MHz

Bits 15:14 PLL2RGE[1:0]: PLL2 input frequency range

Set and reset by software to select the proper reference frequency range used for PLL2.

These bits must be written before enabling the PLL2.

00: PLL3 input (ref2_ck) clock range frequency between 1 and 2 MHz (default after reset)

01: PLL3 input (ref2_ck) clock range frequency between 2 and 4 MHz

10: PLL3 input (ref2_ck) clock range frequency between 4 and 8 MHz

11: PLL3 input (ref2_ck) clock range frequency between 8 and 16 MHz

Bit 13 PLL2SSCGEN: PLL2 SSCG enable

Set and reset by software to enable the Spread Spectrum Clock Generator of PLL2, in order to reduce the amount of EMI peaks.

0: SSCG disabled (default after reset)

1: SSCG enabled

Bit 12 PLL2VCOSEL: PLL2 VCO selection

Set and reset by software to select the proper VCO frequency range used for PLL2.

This bit must be written before enabling the PLL2. It allows the application to select the VCO range:

– VCOH: working from 384 to 1672 MHz (\(F_{\text{ref2\_ck}}\) must be between 2 and 16 MHz)

– VCOL: working from 150 to 420 MHz (\(F_{\text{ref2\_ck}}\) must be between 1 and 2 MHz)

0: VCOH selected (default after reset)

1: VCOL selected

Bit 11 PLL2FRACLEN: PLL2 fractional latch enable

Set and reset by software to latch the content of FRACN into the sigma-delta modulator.

In order to latch the FRACN value into the sigma-delta modulator, PLL2FRACLEN must be set to 0, then set to 1. The transition 0 to 1 transfers the content of FRACN into the modulator.

Refer to PLL initialization procedure on page 419 for additional information.

PLL2FRACLEN must remain at 0 for at least 5 μs.

Bits 10:9 Reserved, must be kept at reset value.

Bit 8 PLL1SEN: PLL1 DIVS divider output enable

Set and reset by software to enable the pll1_s_ck output of the PLL1.

To save power, PLL1SEN must be set to 0 when the pll1_s_ck is not used.

0: pll1_s_ck output disabled (default after reset)

1: pll1_s_ck output enabled

Bit 7 Reserved, must be kept at reset value.

Bit 6 PLL1QEN: PLL1 DIVQ divider output enable

Set and reset by software to enable the pll1_q_ck output of the PLL1.

The hardware prevents writing this bit if FMCKKP = 1.

In order to save power, when the pll1_q_ck output of the PLL1 is not used, the pll1_q_ck must be disabled.

0: pll1_q_ck output disabled (default after reset)

1: pll1_q_ck output enabled

Bit 5 PLL1PEN: PLL1 DIVP divider output enable

Set and reset by software to enable the pll1_p_ck output of the PLL1.

The hardware prevents writing this bit to 0, if the PLL1 output is used as the system clock (SW=3).

In order to save power, when the pll1_p_ck output of the PLL1 is not used, the pll1_p_ck must be disabled.

0: pll1_p_ck output disabled (default after reset)

1: pll1_p_ck output enabled

Bits 4:3 PLL1RGE[1:0]: PLL1 input frequency range

Set and reset by software to select the proper reference frequency range used for PLL1.

This bit must be written before enabling the PLL1.

00: PLL1 input (ref1_ck) clock range frequency between 1 and 2 MHz (default after reset)

01: PLL1 input (ref1_ck) clock range frequency between 2 and 4 MHz

10: PLL1 input (ref1_ck) clock range frequency between 4 and 8 MHz

11: PLL1 input (ref1_ck) clock range frequency between 8 and 16 MHz

Bit 2 PLL1SSCGEN: PLL1 SSCG enable

Set and reset by software to enable the Spread Spectrum Clock Generator of PLL1, in order to reduce the amount of EMI peaks.

0: SSCG disabled (default after reset)

1: SSCG enabled

Bit 1 PLL1VCOSEL: PLL1 VCO selection

Set and reset by software to select the proper VCO frequency range used for PLL1.

This bit must be written before enabling the PLL1. It allows the application to select the VCO range:

– VCOH: working from 384 to 1672 MHz (\(F_{ref1\_ck}\) must be between 2 and 16 MHz)

– VCOL: working from 150 to 420 MHz (\(F_{ref1\_ck}\) must be between 1 and 2 MHz)

0: VCOH selected (default after reset)

1: VCOL selected

Bit 0 PLL1FRACEN: PLL1 fractional latch enable

Set and reset by software to latch the content of FRACN into the sigma-delta modulator.

In order to latch the FRACN value into the sigma-delta modulator, PLL1FRACEN must be set to 0, then set to 1. The transition 0 to 1 transfers the content of FRACN into the modulator.

Refer to PLL initialization procedure on page 419 for additional information.

PLL1FRACEN must remain at 0 for at least 5 µs.

7.8.12 RCC PLL1 dividers configuration register 1 (RCC_PLL1DIVR1)

Address offset: 0x030

Reset value: 0x0101 0280

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVQ[6:0]
rwrwrwrwrwrwrw
1514131211109876543210
DIVP[6:0]DIVN[8:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 Reserved, must be kept at reset value.

Bits 22:16 DIVQ[6:0]: PLL1 DIVQ division factor

Set and reset by software to control the frequency of the pll1_q_ck clock.

These bits can be written only when the PLL1QEN = 0.

0000000: pll1_q_ck = vco1_ck

0000001: pll1_q_ck = vco1_ck / 2 (default after reset)

0000010: pll1_q_ck = vco1_ck / 3

0000011: pll1_q_ck = vco1_ck / 4

...

1111111: pll1_q_ck = vco1_ck / 128

Bits 15:9 DIVP[6:0]: PLL1 DIVP division factor

Set and reset by software to control the frequency of the pll1_p_ck clock.

These bits can be written only when the PLL1PEN = 0.

0000000: pll1_p_ck = vco1_ck

0000001: pll1_p_ck = vco1_ck / 2 (default after reset)

0000010: not allowed

0000011: pll1_p_ck = vco1_ck / 4

...

1111111: pll1_p_ck = vco1_ck / 128

Bits 8:0 DIVN[8:0]: multiplication factor for PLL1 VCO

Set and reset by software to control the multiplication factor of the VCO.

These bits can be written only when the PLL is disabled (PLL1ON = PLL1RDY = 0).

.....: not used

0x006: wrong configuration

0x007: DIVN = 8

...

0x080: DIVN = 129 (default after reset)

...

0x1A3: DIVN = 420

Others: wrong configurations

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

VCO output frequency = \(F_{\text{ref1\_ck}} \times \text{DIVN}\), when fractional value 0 has been loaded into FRACN, with:

7.8.13 RCC PLL1 dividers configuration register 2 (RCC_PLL1DIVR2)

Address offset: 0x0C0

Reset value: 0x0000 0101

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVS[2:0]
rwrwrw

Bits 31:3 Reserved, must be kept at reset value.

Bits 2:0 DIVS[2:0]: PLL1 DIVS division factor

Set and reset by software to control the frequency of the pll1_s_ck clock.

This post-divider performs divisions with 50% duty-cycle.

The duty-cycle of 50% is guaranteed only in the following conditions:

These bits can be written only when the PLL1SEN = 0.

000: pll1_s_ck = vco1_ck

001: pll1_s_ck = vco1_ck / 2 (default after reset)

010: pll1_s_ck = vco1_ck / 3

011: pll1_s_ck = vco1_ck / 4

100: pll1_s_ck = vco1_ck / 5

101: pll1_s_ck = vco1_ck / 6

110: pll1_s_ck = vco1_ck / 7

111: pll1_s_ck = vco1_ck / 8

7.8.14 RCC PLL1 fractional divider register (RCC_PLL1FRACR)

Address offset: 0x034

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
FRACN[12:0]Res.Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:3 FRACN[12:0]: fractional part of the multiplication factor for PLL1 VCO

Set and reset by software to control the fractional part of the multiplication factor of the VCO. These bits can be written at any time, allowing dynamic fine-tuning of the PLL1 VCO.

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

VCO output frequency = \(F_{\text{ref1\_ck}} \times (\text{DIVN} + (\text{FRACN} / 2^{13}))\), with

To change the FRACN value on-the-fly even if the PLL is enabled, the application must proceed as follows:

Bits 2:0 Reserved, must be kept at reset value.

7.8.15 RCC PLL1 Spread Spectrum Clock Generator register (RCC_PLL1SSCGR)

Address offset: 0x0CC

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.INCSTEP[14:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:16 INCSTEP[14:0]: Modulation Depth Adjustment for PLL1

Set and reset by software to adjust the modulation depth of the clock spreading generator.

Bit 15 SPREADSEL: Spread spectrum clock generator mode for PLL1

Set and reset by software to select the clock spreading mode.

Bit 14 RPDFNDIS: Dithering RPDF noise control for PLL1

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a rectangular probability density function.

Bit 13 TPDFNDIS: Dithering TPDF noise control for PLL1

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a triangular probability density function.

Bits 12:0 MODPER[12:0]: Modulation Period Adjustment for PLL1

Set and reset by software to adjust the modulation period of the clock spreading generator.

7.8.16 RCC PLL2 dividers configuration register 1 (RCC_PLL2DIVR1)

Address offset: 0x038

Reset value: 0x0101 0280

31302928272625242322212019181716
Res.DIVR[6:0]Res.DIVQ[6:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DIVP[6:0]DIVN[8:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:24 DIVR[6:0]: PLL2 DIVR division factor

Set and reset by software to control the frequency of the pll2_r_ck clock.

These bits can be written only when the PLL2REN = 0.

0000000: pll2_r_ck = vco2_ck

0000001: pll2_r_ck = vco2_ck / 2 (default after reset)

0000010: pll2_r_ck = vco2_ck / 3

0000011: pll2_r_ck = vco2_ck / 4

...

1111111: pll2_r_ck = vco2_ck / 128

Bit 23 Reserved, must be kept at reset value.

Bits 22:16 DIVQ[6:0]: PLL2 DIVQ division factor

Set and reset by software to control the frequency of the pll2_q_ck clock.

These bits can be written only when the PLL2QEN = 0.

0000000: pll2_q_ck = vco2_ck

0000001: pll2_q_ck = vco2_ck / 2 (default after reset)

0000010: pll2_q_ck = vco2_ck / 3

0000011: pll2_q_ck = vco2_ck / 4

...

1111111: pll2_q_ck = vco2_ck / 128

Bits 15:9 DIVP[6:0]: PLL2 DIVP division factor

Set and reset by software to control the frequency of the pll2_p_ck clock.

These bits can be written only when the PLL2PEN = 0.

0000000: pll2_p_ck = vco2_ck

0000001: pll2_p_ck = vco2_ck / 2 (default after reset)

0000010: pll2_p_ck = vco2_ck / 3

0000011: pll2_p_ck = vco2_ck / 4

...

1111111: pll2_p_ck = vco2_ck / 128

Bits 8:0 DIVN[8:0]: multiplication factor for PLL2 VCO

Set and reset by software to control the multiplication factor of the VCO.

These bits can be written only when the PLL is disabled (PLL2ON = PLL2RDY = 0).

.........: not used

0x006: wrong configuration

0x007: DIVN = 8

...

0x080: DIVN = 129 (default after reset)

...

0x1A3: DIVN = 420

Others: wrong configurations

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

– 192 to 836 MHz if PLL2VCOSEL = 0

– 150 to 420 MHz if PLL2VCOSEL = 1

VCO output frequency = Fref2_ck x DIVN, when fractional value 0 has been loaded into FRACN, with

– DIVN between 8 and 420

– The input frequency Fref2_ck must be between 1 and 16MHz.

7.8.17 RCC PLL2 dividers configuration register 2 (RCC_PLL2DIVR2)

Address offset: 0x0C4

Reset value: 0x0000 0101

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.DIVT[2:0]Res.Res.Res.Res.Res.DIVS[2:0]
rwrwrwrwrwrw

Bits 31:11 Reserved, must be kept at reset value.

Bits 10:8 DIVT[2:0]: PLL2 DIVT division factor

Set and reset by software to control the frequency of the pll2_t_ck clock.

This post-divider performs divisions with 50% duty-cycle.

The duty-cycle of 50% is guaranteed only in the following conditions:

These bits can be written only when the PLL2TEN = 0.

000: pll2_t_ck = vco2_ck

001: pll2_t_ck = vco2_ck / 2 (default after reset)

010: pll2_t_ck = vco2_ck / 3

011: pll2_t_ck = vco2_ck / 4

100: pll2_t_ck = vco2_ck / 5

101: pll2_t_ck = vco2_ck / 6

110: pll2_t_ck = vco2_ck / 7

111: pll2_t_ck = vco2_ck / 8

Bits 7:3 Reserved, must be kept at reset value.

Bits 2:0 DIVS[2:0]: PLL2 DIVS division factor

Set and reset by software to control the frequency of the pll2_s_ck clock.

This post-divider performs divisions with 50% duty-cycle.

The duty-cycle of 50% is guaranteed only in the following conditions:

These bits can be written only when the PLL2SEN = 0.

000: pll2_s_ck = vco2_ck

001: pll2_s_ck = vco2_ck / 2 (default after reset)

010: pll2_s_ck = vco2_ck / 3

011: pll2_s_ck = vco2_ck / 4

100: pll2_s_ck = vco2_ck / 5

101: pll2_s_ck = vco2_ck / 6

110: pll2_s_ck = vco2_ck / 7

111: pll2_s_ck = vco2_ck / 8

7.8.18 RCC PLL2 fractional divider register (RCC_PLL2FRACR)

Address offset: 0x03C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
FRACN[12:0]Res.Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:3 FRACN[12:0]: fractional part of the multiplication factor for PLL2 VCO

Set and reset by software to control the fractional part of the multiplication factor of the VCO.

These bits can be written at any time, allowing dynamic fine-tuning of the PLL2 VCO.

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

VCO output frequency = \(F_{ref2\_ck} \times (DIVN + (FRACN / 2^{13}))\), with

In order to change the FRACN value on-the-fly even if the PLL is enabled, the application must proceed as follows:

Bits 2:0 Reserved, must be kept at reset value.

7.8.19 RCC PLL2 Spread Spectrum Clock Generator register (RCC_PLL2SSCGR)

Address offset: 0x0D0

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.INCSTEP[14:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:16 INCSTEP[14:0]: Modulation Depth Adjustment for PLL2

Set and reset by software to adjust the modulation depth of the clock spreading generator.

Bit 15 SPREADSEL: Spread spectrum clock generator mode for PLL2

Set and reset by software to select the clock spreading mode.

Bit 14 RPDFNDIS: Dithering RPDF noise control for PLL2

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a rectangular probability density function.

Bit 13 TPDFNDIS: Dithering TPDF noise control for PLL2

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a triangular probability density function.

Bits 12:0 MODPER[12:0]: Modulation Period Adjustment for PLL2

Set and reset by software to adjust the modulation period of the clock spreading generator.

7.8.20 RCC PLL3 dividers configuration register 1 (RCC_PLL3DIVR1)

Address offset: 0x040

Reset value: 0x0101 0280

31302928272625242322212019181716
Res.DIVR[6:0]Res.DIVQ[6:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
DIVP[6:0]DIVN[8:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:24 DIVR[6:0]: PLL3 DIVR division factor

Set and reset by software to control the frequency of the pll3_r_ck clock.

These bits can be written only when the PLL3REN = 0.

0000000: pll3_r_ck = vco3_ck

0000001: pll3_r_ck = vco3_ck / 2 (default after reset)

0000010: pll3_r_ck = vco3_ck / 3

0000011: pll3_r_ck = vco3_ck / 4

...

1111111: pll3_r_ck = vco3_ck / 128

Bit 23 Reserved, must be kept at reset value.

Bits 22:16 DIVQ[6:0]: PLL3 DIVQ division factor

Set and reset by software to control the frequency of the pll3_q_ck clock.

These bits can be written only when the PLL3QEN = 0.

0000000: pll3_q_ck = vco3_ck

0000001: pll3_q_ck = vco3_ck / 2 (default after reset)

0000010: pll3_q_ck = vco3_ck / 3

0000011: pll3_q_ck = vco3_ck / 4

...

1111111: pll3_q_ck = vco3_ck / 128

Bits 15:9 DIVP[6:0]: PLL3 DIVP division factor

Set and reset by software to control the frequency of the pll3_p_ck clock.

These bits can be written only when the PLL3PEN = 0.

0000000: pll3_p_ck = vco3_ck

0000001: pll3_p_ck = vco3_ck / 2 (default after reset)

0000010: pll3_p_ck = vco3_ck / 3

0000011: pll3_p_ck = vco3_ck / 4

...

1111111: pll3_p_ck = vco3_ck / 128

Bits 8:0 DIVN[8:0]: Multiplication factor for PLL3 VCO

Set and reset by software to control the multiplication factor of the VCO.

These bits can be written only when the PLL is disabled (PLL3ON = PLL3RDY = 0).

.....: not used

0x006: wrong configuration

0x007: DIVN = 8

...

0x080: DIVN = 129 (default after reset)

...

0x1A3: DIVN = 420

Others: wrong configurations

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

– 192 to 836 MHz if PLL3VCOSEL = 0

– 150 to 420 MHz if PLL3VCOSEL = 1

VCO output frequency = \(F_{\text{ref3\_ck}} \times \text{DIVN}\), when fractional value 0 has been loaded into FRACN, with:

– DIVN between 8 and 420

– The input frequency \(F_{\text{ref3\_ck}}\) must be between 1 and 16MHz

7.8.21 RCC PLL3 dividers configuration register 2 (RCC_PLL3DIVR2)

Address offset: 0x0C8

Reset value: 0x0000 0101

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVS[2:0]
rwrwrw

Bits 31:3 Reserved, must be kept at reset value.

Bits 2:0 DIVS[2:0]: PLL3 DIVS division factor

Set and reset by software to control the frequency of the pll3_s_ck clock.

This post-divider performs divisions with 50% duty-cycle.

The duty-cycle of 50% is guaranteed only in the following conditions:

These bits can be written only when the PLL3SEN = 0.

000: pll3_s_ck = vco3_ck

001: pll3_s_ck = vco3_ck / 2 (default after reset)

010: pll3_s_ck = vco3_ck / 3

011: pll3_s_ck = vco3_ck / 4

100: pll3_s_ck = vco3_ck / 5

101: pll3_s_ck = vco3_ck / 6

110: pll3_s_ck = vco3_ck / 7

111: pll3_s_ck = vco3_ck / 8

7.8.22 RCC PLL3 fractional divider register (RCC_PLL3FRACR)

Address offset: 0x044

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
FRACN[12:0]Res.Res.Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:3 FRACN[12:0]: fractional part of the multiplication factor for PLL3 VCO

Set and reset by software to control the fractional part of the multiplication factor of the VCO. These bits can be written at any time, allowing dynamic fine-tuning of the PLL3 VCO.

Caution: The software must set correctly these bits to insure that the VCO output frequency is between its valid frequency range, that is:

VCO output frequency = \(F_{\text{ref3\_ck}} \times (\text{DIVN} + (\text{FRACN} / 2^{13}))\), with

In order to change the FRACN value on-the-fly even if the PLL is enabled, the application must proceed as follows:

Bits 2:0 Reserved, must be kept at reset value.

7.8.23 RCC PLL3 Spread Spectrum Clock Generator register (RCC_PLL3SSCGR)

Address offset: 0x0D4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.INCSTEP[14:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:16 INCSTEP[14:0]: Modulation Depth Adjustment for PLL3

Set and reset by software to adjust the modulation depth of the clock spreading generator.

Bit 15 SPREADSEL: Spread spectrum clock generator mode for PLL3

Set and reset by software to select the clock spreading mode.

0: Center-spread modulation selected (default after reset)

1: Down-spread modulation selected

Bit 14 RPDFNDIS: Dithering RPDF noise control for PLL3

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a rectangular probability density function.

0: Dithering noise injection enabled (default after reset)

1: Dithering noise injection disabled

Bit 13 TPDFNDIS: Dithering TPDF noise control for PLL3

Set and reset by software.

This bit is used to enable or disable the injection of a dithering noise into the SSCG modulator. This dithering noise is generated using a triangular probability density function.

0: Dithering noise injection enabled (default after reset)

1: Dithering noise injection disabled

Bits 12:0 MODPER[12:0]: Modulation Period Adjustment for PLL3

Set and reset by software to adjust the modulation period of the clock spreading generator.

7.8.24 RCC AHB peripheral kernel clock selection register (RCC_CCIPR1)

Address offset: 0x04C

Reset value: 0x0000 0A00

Changing the clock source on-the-fly is allowed (except for CKPERSEL and ETH1REFCKSEL[1:0] !) and does not generate any timing violation. However the user must make sure that both the previous and the new clock sources are present during the switching, and during the whole transition time. Refer to Clock switches and gating.

31302928272625242322212019181716
Res.Res.CKPERSEL[1:0]PSSISELRes.ADCSEL[1:0]Res.ADF1SEL[2:0]Res.ETH1PHYCKSELETH1REFCKSEL[1:0]
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
OTGFSSEL[1:0]USBPHYCSEL[1:0]USBREFCKSEL[3:0]XSPI2SEL[1:0]XSPI1SEL[1:0]Res.SDMMC12SELFMCSEL[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:28 CKPERSEL[1:0]: per_ck clock source selection

Bit 27 PSSISEL: PSSI kernel clock source selection

Set and reset by software.

Bit 26 Reserved, must be kept at reset value.

Bits 25:24 ADCSEL[1:0]: SAR ADC kernel clock source selection

Set and reset by software.

Bit 23 Reserved, must be kept at reset value.

Bits 22:20 ADF1SEL[2:0]: ADF kernel clock source selection

Set and reset by software.

0: hclk1 selected as ADF kernel clock (default after reset)

1: pll2_p_ck selected as ADF kernel clock

2: pll3_p_ck selected as ADF kernel clock

3: I2S_CKIN selected as ADF kernel clock

4: csi_ker_ck selected as ADF kernel clock

5: hsi_ker_ck selected as ADF kernel clock

Note: I2S_CKIN is an external clock taken from a pin.

Bit 19 Reserved, must be kept at reset value.

Bit 18 ETH1PHYCKSEL: Clock source selection for external Ethernet PHY

Set and reset by software.

0: hse_ker_ck selected as clock source (default after reset)

1: pll3_s_ck selected clock source

Bits 17:16 ETH1REFCKSEL[1:0]: Ethernet reference clock source selection

Set and reset by software.

00: PAD ETH_RMII_REF_CLK selected as kernel peripheral clock (default after reset)

01: hse_ker_ck selected as kernel peripheral clock

10: eth_clk_fb selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

Bits 15:14 OTGFSSEL[1:0]: OTGFS kernel clock source selection

Set and reset by software.

00: hsi48_ker_ck (default after reset)

01: pll3_q_ck

10: hse_ker_ck

11: clk48mohci

Bits 13:12 USBPHYCSEL[1:0]: USBPHYC kernel clock source selection

Set and reset by software.

00: hse_ker_ck (default after reset)

01: hse_ker_ck / 2

10: pll3_q_ck

11: reserved, the kernel clock is disabled

Bits 11:8 USBREFCKSEL[3:0]: USBPHYC kernel clock frequency selection

Set and reset by software.

This field is used to indicate to the USBPHYC, the frequency of the reference kernel clock provided to the USBPHYC.

0011: The kernel clock frequency provided to the USBPHYC is 16 MHz

1000: The kernel clock frequency provided to the USBPHYC is 19.2 MHz

1001: The kernel clock frequency provided to the USBPHYC is 20MHz

1010: The kernel clock frequency provided to the USBPHYC is 24 MHz (default after reset)

1110: The kernel clock frequency provided to the USBPHYC is 26 MHz

1011: The kernel clock frequency provided to the USBPHYC is 32 MHz

others: reserved

Bits 7:6 XSPI2SEL[1:0]: XSPI2 kernel clock source selection

Set and reset by software.

00: hclk5 selected as kernel peripheral clock (default after reset)

01: pll2_s_ck selected as kernel peripheral clock

1x: pll2_t_ck selected as kernel peripheral clock

Bits 5:4 XSPI1SEL[1:0]: XSPI1 kernel clock source selection

Set and reset by software.

00: hclk5 selected as kernel peripheral clock (default after reset)

01: pll2_s_ck selected as kernel peripheral clock

1x: pll2_t_ck selected as kernel peripheral clock

Bit 3 Reserved, must be kept at reset value.

Bit 2 SDMMC12SEL: SDMMC1 and SDMMC2 kernel clock source selection

Set and reset by software.

0: pll2_s_ck selected as kernel peripheral clock (default after reset)

1: pll2_t_ck selected as kernel peripheral clock

Bits 1:0 FMCSEL[1:0]: FMC kernel clock source selection

Set and reset by software.

00: hclk5 selected as kernel peripheral clock (default after reset)

01: pll1_q_ck selected as kernel peripheral clock

10: pll2_r_ck selected as kernel peripheral clock

11: hsi_ker_ck selected as kernel peripheral clock

7.8.25 RCC APB1 peripherals kernel clock selection register (RCC_CCIPR2)

Address offset: 0x050

Reset value: 0x0000 0000

Changing the clock source on-the-fly is allowed and does not generate any timing violation. However the user must make sure that both the previous and the new clock sources are present during the switching, and during the whole transition time. Refer to Clock switches and gating.

RM0477 7.8.25column_2column_3and gating.column_6column_7column_8column_9column_10column_11column_12column_13column_14Clock switchescolumn_16
31302928272625242322212019181716
Res.Res.CECSEL[1:0]Res.Res.Res.Res.Res.LPTIM1SEL[2:0]
C S F D A N E L[1:0]
S P DIF R X S E L[1:0]
rwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.I2C23SEL[1:0]Res.Res.UART234578SEL[2:0]
I2C1 _I3C1S E L[1:0]
S S PI2 3 E L[2:0]
rwrwrwrwrwrwrwrwrwrw
Bits 29:28CECSEL[1:0]: HDMI-CEC kernel clock source selection
00:lse_ckselected as kernel clock (default after reset)
01:lsi_ckselected as kernel clock
10:csi_ker_ckdivided by 122 selected as kernel clock
Bits 25:24SPDIFRXSEL[1:0]: SPDIFRX kernel clock source selection
00:pll1_q_ckselected as SPDIFRX kernel clock (default after reset)
01:pll2_r_ckselected as SPDIFRX kernel clock
10:pll3_r_ckselected as SPDIFRX kernel clock
11:hsi_ker_ckselected as SPDIFRX kernel clock
Bits 23:22FDCANSEL[1:0]: FDCAN kernel clock source selection
00:hse_ker_ckselected as FDCAN kernel clock (default after reset)
01:pll1_q_ckselected as FDCAN kernel clock
10:pll2_p_ckselected as FDCAN kernel clock

Bits 31:30 Reserved, must be kept at reset value.

Bits 29:28 CECSEL[1:0]: HDMI-CEC kernel clock source selection

Set and reset by software.

00: lse_ck selected as kernel clock (default after reset)

01: lsi_ck selected as kernel clock

10: csi_ker_ck divided by 122 selected as kernel clock

11: reserved, the kernel clock is disabled

Bits 27:26 Reserved, must be kept at reset value.

Bits 25:24 SPDIFRXSEL[1:0]: SPDIFRX kernel clock source selection

00: pll1_q_ck selected as SPDIFRX kernel clock (default after reset)

01: pll2_r_ck selected as SPDIFRX kernel clock

10: pll3_r_ck selected as SPDIFRX kernel clock

11: hsi_ker_ck selected as SPDIFRX kernel clock

Bits 23:22 FDCANSEL[1:0]: FDCAN kernel clock source selection

00: hse_ker_ck selected as FDCAN kernel clock (default after reset)

01: pll1_q_ck selected as FDCAN kernel clock

10: pll2_p_ck selected as FDCAN kernel clock

11: reserved, the kernel clock is disabled

Bits 21:19 Reserved, must be kept at reset value.

Bits 18:16 LPTIM1SEL[2:0]: LPTIM1 kernel clock source selection

Set and reset by software.

000: pclk1 selected as kernel peripheral clock (default after reset)

001: pll2_p_ck selected as kernel peripheral clock

010: pll3_r_ck selected as kernel peripheral clock

011: lse_ck selected as kernel peripheral clock

100: lsi_ck selected as kernel peripheral clock

101: per_ck selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

Bits 15:14 Reserved, must be kept at reset value.

Bits 13:12 I2C1_I3C1SEL[1:0]: I2C1 or I3C1 kernel clock source selection

Set and reset by software.

00: pclk1 selected as kernel peripheral clock (default after reset)

01: pll3_r_ck selected as kernel peripheral clock

10: hsi_ker_ck selected as kernel peripheral clock

11: csi_ker_ck selected as kernel peripheral clock

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:8 I2C23SEL[1:0]: I2C2, I2C3 kernel clock source selection

Set and reset by software.

00: pclk1 selected as kernel clock (default after reset)

01: pll3_r_ck selected as kernel clock

10: hsi_ker_ck selected as kernel clock

11: csi_ker_ck selected as kernel clock

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 SPI23SEL[2:0]: SPI/I2S2 and SPI/I2S3 kernel clock source selection

Set and reset by software.

Caution: If the selected clock is the external clock and this clock is stopped, it is not be possible to switch to another clock. Refer to Clock switches and gating on page 412 for additional information.

000: pll1_q_ck selected as kernel clock (default after reset)

001: pll2_p_ck selected as kernel clock

010: pll3_p_ck selected as kernel clock

011: I2S_CKIN selected as kernel clock

100: per_ck selected as kernel clock

others: reserved, the kernel clock is disabled

Note: I2S_CKIN is an external clock taken from a pin.

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 UART234578SEL[2:0]: USART2,3, UART4,5,7,8 (APB1) kernel clock source selection

Set and reset by software.

000: pclk1 selected as kernel clock (default after reset)

001: pll2_q_ck selected as kernel clock

010: pll3_q_ck selected as kernel clock

011: hsi_ker_ck selected as kernel clock

100: csi_ker_ck selected as kernel clock

101: lse_ck selected as kernel clock

others: reserved, the kernel clock is disabled

7.8.26 RCC APB2 peripherals kernel clock selection register (RCC_CCIPR3)

Address offset: 0x054

Reset value: 0x0000 0000

Changing the clock source on-the-fly is allowed and does not generate any timing violation. However the user must make sure that both the previous and the new clock sources are present during the switching, and during the whole transition time. Refer to Clock switches and gating.

RM0477 7.8.26column_2column_3and gating .column_5column_6column_7column_8column_9column_10column_11column_12column_13column_14Clock switchescolumn_16
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.SAI2SEL[2:0]Res.SAI1SEL[2:0]
rwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.SPI1SEL[2:0]Res.SPI45SEL[2:0]Res.USART1SEL[2:0]
rwrwrwrwrwrwrwrwrw
Bits 22:20SAI2SEL[2:0]: SAI2 kernel clock source selection
switch to another clock. Refer toClock switches and gating on page 412for additional
000:pll1_q_ckselected as SAI2 kernel clock (default after reset)
001:pll2_p_ckselected as SAI2 kernel clock
010:pll3_p_ckselected as SAI2 kernel clock
100:per_ckselected as SAI2 kernel clock
101:spdifrx_symb_ckselected as SAI2 kernel clock
Note: I2S_CKIN is an external clock taken from a pin.spdifrx_symb_ckis the symbol clock
generated by the spdifrx (seeFigure 53).
Bits 18:16SAI1SEL[2:0]: SAI1 kernel clock source selection
switch to another clock. Refer toClock switches and gating on page 412for additional
000:pll1_q_ckselected as SAI1 kernel clock (default after reset)
001:pll2_p_ckselected as SAI1 kernel clock
010:pll3_p_ckselected as SAI1 kernel clock
100:per_ckselected as SAI1 kernel clock

Bits 31:23 Reserved, must be kept at reset value.

Bits 22:20 SAI2SEL[2:0]: SAI2 kernel clock source selection

Set and reset by software.

Caution: If the selected clock is the external clock and this clock is stopped, it is not possible to switch to another clock. Refer to Clock switches and gating on page 412 for additional information.

000: pll1_q_ck selected as SAI2 kernel clock (default after reset)

001: pll2_p_ck selected as SAI2 kernel clock

010: pll3_p_ck selected as SAI2 kernel clock

011: I2S_CKIN selected as SAI2 kernel clock

100: per_ck selected as SAI2 kernel clock

101: spdifrx_symb_ck selected as SAI2 kernel clock

others: reserved, the kernel clock is disabled

Note: I2S_CKIN is an external clock taken from a pin. spdifrx_symb_ck is the symbol clock generated by the spdifrx (see Figure 53).

Bit 19 Reserved, must be kept at reset value.

Bits 18:16 SAI1SEL[2:0]: SAI1 kernel clock source selection

Set and reset by software.

Caution: If the selected clock is the external clock and this clock is stopped, it is not possible to switch to another clock. Refer to Clock switches and gating on page 412 for additional information.

000: pll1_q_ck selected as SAI1 kernel clock (default after reset)

001: pll2_p_ck selected as SAI1 kernel clock

010: pll3_p_ck selected as SAI1 kernel clock

011: I2S_CKIN selected as SAI1 kernel clock

100: per_ck selected as SAI1 kernel clock

others: reserved, the kernel clock is disabled

Note: I2S_CKIN is an external clock taken from a pin.

Bits 15:11 Reserved, must be kept at reset value.

Bits 10:8 SPI1SEL[2:0]: SPI/I2S1 kernel clock source selection

Set and reset by software.

Caution: If the selected clock is the external clock and this clock is stopped, it is not be possible to switch to another clock. Refer to Clock switches and gating on page 412 for additional information.

000: pll1_q_ck selected as SPI/I2S1 and 7 kernel clock (default after reset)

001: pll2_p_ck selected as SPI/I2S1 and 7 kernel clock

010: pll3_p_ck selected as SPI/I2S1 and 7 kernel clock

011: I2S_CKIN selected as SPI/I2S1 and 7 kernel clock

100: per_ck selected as SPI/I2S1, and 7 kernel clock

others: reserved, the kernel clock is disabled

Note: I2S_CKIN is an external clock taken from a pin.

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 SPI45SEL[2:0]: SPI4 and 5 kernel clock source selection

Set and reset by software.

000: pclk2 selected as kernel clock (default after reset)

001: pll2_q_ck is selected as kernel clock

010: pll3_q_ck is selected as kernel clock

011: hsi_ker_ck is selected as kernel clock

100: csi_ker_ck is selected as kernel clock

101: hse_ker_ck is selected as kernel clock

others: reserved, the kernel clock is disabled

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 USART1SEL[2:0]: USART1 kernel clock source selection

Set and reset by software.

000: pclk2 selected as kernel clock (default after reset)

001: pll2_q_ck selected as kernel clock

010: pll3_q_ck selected as kernel clock

011: hsi_ker_ck selected as kernel clock

100: csi_ker_ck selected as kernel clock

101: lse_ck selected as kernel clock

others: reserved, the kernel clock is disabled

7.8.27 RCC APB4,5 peripherals kernel clock selection register (RCC_CCIPR4)

Address offset: 0x058

Reset value: 0x0000 0000

Changing the clock source on-the-fly is allowed and does not generate any timing violation. However the user must make sure that both the previous and the new clock sources are present during the switching, and during the whole transition time. Refer to Clock switches and gating.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.LPTIM45SEL[2:0]Res.LPTIM23SEL[2:0]Res.SPI6SEL[2:0]Res.LPUART1SEL[2:0]
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bits 14:12 LPTIM45SEL[2:0]: LPTIM4, and LPTIM5 kernel clock source selection

Set and reset by software.

000: pclk4 selected as kernel peripheral clock (default after reset)

001: pll2_p_ck selected as kernel peripheral clock

010: pll3_r_ck selected as kernel peripheral clock

011: lse_ck selected as kernel peripheral clock

100: lsi_ck selected as kernel peripheral clock

101: per_ck selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

Bit 11 Reserved, must be kept at reset value.

Bits 10:8 LPTIM23SEL[2:0]: LPTIM2 and LPTIM3 kernel clock source selection

Set and reset by software.

000: pclk4 selected as kernel peripheral clock (default after reset)

001: pll2_p_ck selected as kernel peripheral clock

010: pll3_r_ck selected as kernel peripheral clock

011: lse_ck selected as kernel peripheral clock

100: lsi_ck selected as kernel peripheral clock

101: per_ck selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 SPI6SEL[2:0]: SPI/I2S6 kernel clock source selection

Set and reset by software.

000: pclk4 selected as kernel peripheral clock (default after reset)

001: pll2_q_ck selected as kernel peripheral clock

010: pll3_q_ck selected as kernel peripheral clock

011: hsi_ker_ck selected as kernel peripheral clock

100: csi_ker_ck selected as kernel peripheral clock

101: hse_ker_ck selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 LPUART1SEL[2:0]: LPUART1 kernel clock source selection

Set and reset by software.

000: pclk4 selected as kernel peripheral clock (default after reset)

001: pll2_q_ck selected as kernel peripheral clock

010: pll3_q_ck selected as kernel peripheral clock

011: hsi_ker_ck selected as kernel peripheral clock

100: csi_ker_ck selected as kernel peripheral clock

101: lse_ck selected as kernel peripheral clock

others: reserved, the kernel clock is disabled

7.8.28 RCC clock source interrupt enable register (RCC_CIER)

Address offset: 0x060

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.LSECSSIEPLL3RDYIEPLL2RDYIEPLL1RDYIEHSI48RDYIECSIRDYIEHSERDYIEHSIRDYIELSERDYIELSIRDYIE
rwrwrwrwrwrwrwrwrwrw

Bits 31:10 Reserved, must be kept at reset value.

Bit 9 LSECSSIE: LSE clock security system interrupt enable

Set and reset by software to enable/disable interrupt caused by the clock security system (CSS) on external 32 kHz oscillator.

0: LSE CSS interrupt disabled (default after reset)

1: LSE CSS interrupt enabled

Bit 8 PLL3RDYIE: PLL3 ready interrupt enable

Set and reset by software to enable/disable interrupt caused by PLL3 lock.

0: PLL3 lock interrupt disabled (default after reset)

1: PLL3 lock interrupt enabled

Bit 7 PLL2RDYIE: PLL2 ready interrupt enable

Set and reset by software to enable/disable interrupt caused by PLL2 lock.

0: PLL2 lock interrupt disabled (default after reset)

1: PLL2 lock interrupt enabled

Bit 6 PLL1RDYIE: PLL1 ready interrupt enable

Set and reset by software to enable/disable interrupt caused by PLL1 lock.

0: PLL1 lock interrupt disabled (default after reset)

1: PLL1 lock interrupt enabled

Bit 5 HSI48RDYIE: HSI48 ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the HSI48 oscillator stabilization.

0: HSI48 ready interrupt disabled (default after reset)

1: HSI48 ready interrupt enabled

Bit 4 CSIRDYIE: CSI ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the CSI oscillator stabilization.

0: CSI ready interrupt disabled (default after reset)

1: CSI ready interrupt enabled

Bit 3 HSERDYIE: HSE ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the HSE oscillator stabilization.

0: HSE ready interrupt disabled (default after reset)

1: HSE ready interrupt enabled

Bit 2 HSIRDYIE: HSI ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the HSI oscillator stabilization.

0: HSI ready interrupt disabled (default after reset)

1: HSI ready interrupt enabled

Bit 1 LSERDYIE: LSE ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the LSE oscillator stabilization.

0: LSE ready interrupt disabled (default after reset)

1: LSE ready interrupt enabled

Bit 0 LSIRDYIE: LSI ready interrupt enable

Set and reset by software to enable/disable interrupt caused by the LSI oscillator stabilization.

0: LSI ready interrupt disabled (default after reset)

1: LSI ready interrupt enabled

7.8.29 RCC clock source interrupt flag register (RCC_CIFR)

Address offset: 0x64

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.HSECSSFLSECSSFPLL3RDYFPLL2RDYFPLL1RDYFHSI48RDYFCSIRDYFHSERDYFHSIRDYFLSERDYFLSIRDYF
rrrrrrrrrrr

Bits 31:11 Reserved, must be kept at reset value.

Bit 10 HSECSSF: HSE clock security system interrupt flag

Reset by software by writing HSECSSC bit.

Set by hardware in case of HSE clock failure.

0: no clock security interrupt caused by HSE clock failure (default after reset)

1: clock security interrupt caused by HSE clock failure

Bit 9 LSECSSF: LSE clock security system interrupt flag

Reset by software by writing LSECSSC bit.

Set by hardware when a failure is detected on the external 32 kHz oscillator and LSECSSIE is set.

0: no failure detected on the external 32 kHz oscillator (default after reset)

1: failure detected on the external 32 kHz oscillator

Bit 8 PLL3RDYF: PLL3 ready interrupt flag

Reset by software by writing PLL3RDYC bit.

Set by hardware when the PLL3 locks and PLL3RDYIE is set.

0: no clock ready interrupt caused by PLL3 lock (default after reset)

1: clock ready interrupt caused by PLL3 lock

7.8.30 RCC clock source interrupt clear register (RCC_CICR)

Address offset: 0x68

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.HSECSSCLSECSSCPLL3RDYCPLL2RDYCPLL1RDYCHSI48RDYCCSIRDYCHSERDYCHSIRDYCLSERDYCLSIRDYC
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:11 Reserved, must be kept at reset value.

Bit 10 HSECSSC: HSE clock security system interrupt clear

Set by software to clear HSECSSF.

Reset by hardware when clear done.

0: HSECSSF no effect (default after reset)

1: HSECSSF cleared

Bit 9 LSECSSC: LSE clock security system interrupt clear

Set by software to clear LSECSSF.

Reset by hardware when clear done.

0: LSECSSF no effect (default after reset)

1: LSECSSF cleared

Bit 8 PLL3RDYC: PLL3 ready interrupt clear

Set by software to clear PLL3RDYF.

Reset by hardware when clear done.

0: PLL3RDYF no effect (default after reset)

1: PLL3RDYF cleared

Bit 7 PLL2RDYC: PLL2 ready interrupt clear

Set by software to clear PLL2RDYF.

Reset by hardware when clear done.

0: PLL2RDYF no effect (default after reset)

1: PLL2RDYF cleared

Bit 6 PLL1RDYC: PLL1 ready interrupt clear

Set by software to clear PLL1RDYF.

Reset by hardware when clear done.

0: PLL1RDYF no effect (default after reset)

1: PLL1RDYF cleared

Bit 5 HSI48RDYC: HSI48 ready interrupt clear

Set by software to clear HSI48RDYF.

Reset by hardware when clear done.

0: HSI48RDYF no effect (default after reset)

1: HSI48RDYF cleared

7.8.31 RCC Backup domain control register (RCC_BDCR)

Address offset: 0x070

Reset value: 0x0000 0010

Reset by Backup domain reset.

Access: 4 wait states (resynchronization) are inserted in case of successive accesses to this register.

After a system reset, the RCC_BDCR register is write-protected. To modify this register, the DBP bit in the PWR control register 1 (PWR_CR1) must be set to 1. RCC_BDCR bits are only reset after a Backup domain reset (see Section 7.4.5: Backup domain reset). Any other internal or external reset does not have any effect on these bits.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VSWRST
rw
1514131211109876543210
RTCENRes.Res.LSECSSRARes.Res.RTCSEL[1:0]LSEEXTLSECSSDLSECSSONLSEDRV[1:0]LSEBYPLSERDYLSEON
rwrwrworworwrrsrwrwrwrrw

Bits 31:17 Reserved, must be kept at reset value.

Bit 16 VSWRST: VSwitch domain software reset

Set and reset by software.

To generate a VSW reset, it is recommended to write this bit to 1, then back to 0.

0: reset not activated (default after Backup domain reset)

1: generates a reset pulse, resetting the entire VSW domain.

Bit 15 RTCEN: RTC clock enable

Set and reset by software.

0: rtc_ck disabled (default after Backup domain reset)

1: rtc_ck enabled

Bits 14:13 Reserved, must be kept at reset value.

Bit 12 LSECSSRA: Re-Arm the LSECSS function

Set by software.

After a LSE failure detection, the software application can re-enable the LSECSS by writing this bit to 1. Reading this bit returns the written value. Prior to set this bit to 1, LSECSSON must be set to 0. Refer to Section : CSS on LSE for details.

0: Writing 0 has no effect (default after Backup domain reset)

1: Writing 1 generates a re-arm pulse for the LSECSS function

Bits 11:10 Reserved, must be kept at reset value.

Bits 9:8 RTCSEL[1:0]: RTC clock source selection

Set by software to select the clock source for the RTC. These bits can be written only one time (except in case of failure detection on LSE). These bits must be written before LSECSSON is enabled. The VSWRST bit can be used to reset them, then it can be written one time again.

If HSE is selected as RTC clock, this clock is lost when the system is in Stop mode or in case of a pin reset (NRST).

00: no clock (default after Backup domain reset)

01: LSE selected as RTC clock

10: LSI selected as RTC clock

11: HSE divided by RTCPRE value selected as RTC clock

Bit 7 LSEEXT: low-speed external clock type in Bypass mode

Set and reset by software to select the external clock type (analog or digital).

The external clock must be enabled with the LSEON bit, to be used by the device.

The LSEEXT bit can be written only if the LSE oscillator is disabled.

0: LSE in analog mode (default after Backup domain reset)

1: LSE in digital mode (do not use if RTC is active).

Bit 6 LSECSSD: LSE clock security system failure detection

Set by hardware to indicate when a failure has been detected by the clock security system on the external 32 kHz oscillator.

0: no failure detected on 32 kHz oscillator (default after Backup domain reset)

1: failure detected on 32 kHz oscillator

Bit 5 LSECSSON: LSE clock security system enable

Set by software to enable the clock security system on 32 kHz oscillator.

LSECSSON must be enabled after LSE is enabled (LSEON enabled) and ready (LSERDY set by hardware) and after RTCSEL is selected.

Once enabled, this bit can only be disabled,

0: CSS on 32 kHz oscillator OFF (default after Backup domain reset)

1: CSS on 32 kHz oscillator ON

Bits 4:3 LSEDRV[1:0]: LSE oscillator driving capability

Set by software to select the driving capability of the LSE oscillator.

00: lowest drive

01: medium-low drive

10: medium-high drive (default after backup domain if LSEON=0)

11: highest drive

Bit 2 LSEBYP: LSE oscillator bypass

Set and reset by software to bypass oscillator in debug mode. This bit must not be written when the LSE is enabled (by LSEON) or ready (LSERDY = 1)

0: LSE oscillator not bypassed (default after Backup domain reset)

1: LSE oscillator bypassed

Bit 1 LSERDY: LSE oscillator ready

Set and reset by hardware to indicate when the LSE is stable. This bit needs 6 cycles of lse_ck clock to fall down after LSEON has been set to 0.

0: LSE oscillator not ready (default after Backup domain reset)

1: LSE oscillator ready

Bit 0 LSEON: LSE oscillator enabled

Set and reset by software.

0: LSE oscillator OFF (default after Backup domain reset)

1: LSE oscillator ON

7.8.32 RCC clock control and status register (RCC_CSR)

Address offset: 0x074

Reset value: 0x0000 0000

Access: 4 wait states (resynchronization) are inserted are inserted in case of successive accesses to this register.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LSIRDYLSION
rrw

Bits 31:2 Reserved, must be kept at reset value.

Bit 1 LSIRDY: LSI oscillator ready

Set and reset by hardware to indicate when the low-speed internal RC oscillator is stable.

This bit needs 3 cycles of lsi_ck clock to fall down after LSION has been set to 0.

This bit can be set even when LSION is not enabled if there is a request for LSI clock by the clock security system on LSE or by the low-speed watchdog or by the RTC.

0: LSI clock is not ready (default after reset)

1: LSI clock is ready

Bit 0 LSION: LSI oscillator enable

Set and reset by software.

0: LSI is OFF (default after reset)

1: LSI is ON

7.8.33 RCC AHB1 peripheral reset register (RCC_AHB1RSTR)

Address offset: 0x080

Reset value: 0x0000 0000

31302928272625242322212019181716
ADF1RSTRes.Res.Res.OTGFSRSTUSBPHYCRSTOTGHSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrwrw
1514131211109876543210
ETH1RSTRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12RSTGPDMA1RSTRes.Res.Res.Res.
rwrwrw

Bit 31 ADF1RST: ADF block reset
Set and reset by software.
0: does not reset ADF block (default after reset)
1: resets ADF block

Bits 30:28 Reserved, must be kept at reset value.

Bit 27 OTGFSRST: OTGFS block reset
Set and reset by software.
0: does not reset OTGFS block (default after reset)
1: resets OTGFS block

Bit 26 USBPHYCRST: USBPHYC block reset
Set and reset by software.
0: does not reset USBPHYC block (default after reset)
1: resets USBPHYC block

Bit 25 OTGHSRST: OTGHS block reset
Set and reset by software.
0: does not reset OTGHS block (default after reset)
1: resets OTGHS block

Bits 24:16 Reserved, must be kept at reset value.

Bit 15 ETH1RST: ETH1 block reset
Set and reset by software.
0: does not reset ETH1 block (default after reset)
1: resets ETH1 block

Bits 14:6 Reserved, must be kept at reset value.

Bit 5 ADC12RST: ADC1 and 2 blocks reset

Set and reset by software.

0: does not reset ADC1 and 2 blocks (default after reset)

1: resets ADC1 and 2 blocks

Bit 4 GPDMA1RST: GPDMA1 blocks reset

Set and reset by software.

0: does not reset GPDMA1 block (default after reset)

1: resets GPDMA1 block

Bits 3:0 Reserved, must be kept at reset value.

7.8.34 RCC AHB2 peripheral reset register (RCC_AHB2RSTR)

Address offset: 0x084

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.CORDICRSTRes.Res.Res.Res.SDMMC2RSTRes.Res.Res.Res.Res.Res.Res.PSSIIRSTRes.
rwrwrw

Bits 31:15 Reserved, must be kept at reset value.

Bit 14 CORDICRST: CORDIC reset

Set and reset by software.

0: does not reset CORDIC block (default after reset)

1: resets CORDIC block

Bits 13:10 Reserved, must be kept at reset value.

Bit 9 SDMMC2RST: SDMMC2 and SDMMC2 delay blocks reset

Set and reset by software.

0: does not reset SDMMC2 and SDMMC2 delay blocks (default after reset)

1: resets SDMMC2 and SDMMC2 delay blocks

Bits 8:2 Reserved, must be kept at reset value.

Bit 1 PSSIIRST: PSSI block reset

Set and reset by software.

0: does not reset PSSI block (default after reset)

1: resets PSSI block

Bit 0 Reserved, must be kept at reset value.

7.8.35 RCC AHB3 peripheral reset register (RCC_AHB3RSTR)

Address offset: 0x0A4

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.PKARSTRes.SAESRSTRes.CRYPRSTHASHRSTRNGRST
rwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 PKARST: PKA block reset

Set and reset by software.

0: does not reset PKA block (default after reset)

1: resets PKA block

Bit 5 Reserved, must be kept at reset value.

Bit 4 SAESRST: SAES block reset

Set and reset by software.

0: does not reset SAES block (default after reset)

1: resets SAES block

Bit 3 Reserved, must be kept at reset value.

Bit 2 CRYPRST: CRYP block reset

Set and reset by software.

0: does not reset CRYP block (default after reset)

1: resets CRYP block

Bit 1 HASHRST: HASH block reset

Set and reset by software.

0: does not reset HASH block (default after reset)

1: resets HASH block

Bit 0 RNGRST: random number generator block reset

Set and reset by software.

0: does not reset RNG block (default after reset)

1: resets RNG block

7.8.36 RCC AHB4 peripheral reset register (RCC_AHB4RSTR)

Address offset: 0x088

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCRSTRes.Res.Res.
rw
1514131211109876543210
GPIOPRSTGPIOORSTGPIONRSTGPIOMRSTRes.Res.Res.Res.GPIOHRSTGPIOGRSTGPIOFRSTGPIOERSTGPIODRSTGPIOCRSTGPIOBRSTGPIOARST
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:20 Reserved, must be kept at reset value.

Bit 19 CRCRST: CRC block reset

Set and reset by software.

0: does not reset the CRC block (default after reset)

1: resets the CRC block

Bits 18:16 Reserved, must be kept at reset value.

Bit 15 GPIOPRST: GPIOP block reset

Set and reset by software.

0: does not reset the GPIOP block (default after reset)

1: resets the GPIOP block

Bit 14 GPIOORST: GPIOO block reset

Set and reset by software.

0: does not reset the GPIOO block (default after reset)

1: resets the GPIOO block

Bit 13 GPIONRST: GPION block reset

Set and reset by software.

0: does not reset the GPION block (default after reset)

1: resets the GPION block

Bit 12 GPIOMRST: GPIOM block reset

Set and reset by software.

0: does not reset the GPIOM block (default after reset)

1: resets the GPIOM block

Bits 11:8 Reserved, must be kept at reset value.

Bit 7 GPIOHRST: GPIOH block reset

Set and reset by software.

0: does not reset the GPIOH block (default after reset)

1: resets the GPIOH block

7.8.37 RCC AHB5 peripheral reset register (RCC_AHB5RSTR)

Address offset: 0x07C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPU2DRSTGFXMMURSTRes.Res.Res.
rwrw
1514131211109876543210
Res.XSPIMRSTRes.XSPI2RSTRes.Res.Res.SDMMC1RSTRes.Res.XSPI1RSTFMCRSTJPEGRSTRes.DMA2DRSTHPDMA1RST
rwrwrwrwrwrwrwrw

Bits 31:21 Reserved, must be kept at reset value.

Bit 20 GPU2DRST: GPU2D block reset
Set and reset by software.
0: reset is released (default after reset)
1: reset is asserted

Bit 19 GFXMMURST: GFXMMU block reset
Set and reset by software.
0: reset is released (default after reset)
1: reset is asserted

Bits 18:15 Reserved, must be kept at reset value.

Bit 14 XSPIMRST: XSPIM reset
Set and reset by software.
0: reset is released (default after reset)
1: reset is asserted

Bit 13 Reserved, must be kept at reset value.

Bit 12 XSPI2RST: XSPI2 and MCE2 blocks reset
Set and reset by software.
The hardware prevents writing this bit if XSPICKP = 1.
0: reset is released (default after reset)
1: reset is asserted

Bits 11:9 Reserved, must be kept at reset value.

Bit 8 SDMMC1RST: SDMMC1 and DB_SDMMC1 blocks reset
Set and reset by software.
0: reset is released (default after reset)
1: reset is asserted

Bits 7:6 Reserved, must be kept at reset value.

7.8.38 RCC APB1 peripheral reset register 1 (RCC_APB1RSTR1)

Address offset: 0x090

Reset value: 0x0000 0000

31302928272625242322212019181716
UART8RSTUART7RSTRes.Res.CECRSTRes.Res.Res.I2C3RSTI2C2RSTI2C1_I3C1RSTUART5RSTUART4RSTUSART3RSTUSART2RSTSPDIFRXRST
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPI3RSTSPI2RSTRes.Res.Res.Res.LPTIM1RSTTIM14RSTTIM13RSTTIM12RSTTIM7RSTTIM6RSTTIM5RSTTIM4RSTTIM3RSTTIM2RST
rwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 UART8RST: UART8 block reset

Set and reset by software.

0: does not reset the UART8 block (default after reset)

1: resets the UART8 block

Bit 30 UART7RST: UART7 block reset

Set and reset by software.

0: does not reset the UART7 block (default after reset)

1: resets the UART7 block

Bits 29:28 Reserved, must be kept at reset value.

Bit 27 CECRST: HDMI-CEC block reset

Set and reset by software.

0: does not reset the HDMI-CEC block (default after reset)

1: resets the HDMI-CEC block

Bits 26:24 Reserved, must be kept at reset value.

Bit 23 I2C3RST: I2C3 block reset

Set and reset by software.

0: does not reset the I2C3 block (default after reset)

1: resets the I2C3 block

Bit 22 I2C2RST: I2C2 block reset

Set and reset by software.

0: does not reset the I2C2 block (default after reset)

1: resets the I2C2 block

Bit 21 I2C1_I3C1RST: I2C1/I3C1 block reset

Set and reset by software.

0: does not reset the I2C1/I3C1 block (default after reset)

1: resets the I2C1/I3C1 block

7.8.39 RCC APB1 peripheral reset register 2 (RCC_APB1RSTR2)

Address offset: 0x094

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.UCPD1RSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.FDCANRSTRes.Res.MDIOSRSTRes.Res.Res.CRSRSTRes.
rwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bit 27 UCPD1RST: UCPD block reset

Set and reset by software.

0: does not reset the UCPD block (default after reset)

1: resets the UCPD block

Bits 26:9 Reserved, must be kept at reset value.

Bit 8 FDCANRST: FDCAN block reset

Set and reset by software.

0: does not reset the FDCAN block (default after reset)

1: resets the FDCAN block

Bits 7:6 Reserved, must be kept at reset value.

Bit 5 MDIOSRST: MDIOS block reset

Set and reset by software.

0: does not reset the MDIOS block (default after reset)

1: resets the MDIOS block

Bits 4:2 Reserved, must be kept at reset value.

Bit 1 CRSRST: clock recovery system reset

Set and reset by software.

0: does not reset CRS (default after reset)

1: resets CRS

Bit 0 Reserved, must be kept at reset value.

7.8.40 RCC APB2 peripheral reset register (RCC_APB2RSTR)

Address offset: 0x098

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.SAI2RSTSAI1RSTRes.SPI5RSTTIM9RSTTIM17RSTTIM16RSTTIM15RST
rwrwrwrwrwrwrw
1514131211109876543210
Res.Res.SPI4RSTSPI1RSTRes.Res.Res.Res.Res.Res.Res.USART1RSTRes.Res.Res.TIM1RST
rwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 SAI2RST: SAI2 block reset

Set and reset by software.

0: does not reset the SAI2 (default after reset)

1: resets the SAI2

Bit 22 SAI1RST: SAI1 block reset

Set and reset by software.

0: does not reset the SAI1 (default after reset)

1: resets the SAI1

Bit 21 Reserved, must be kept at reset value.

Bit 20 SPI5RST: SPI5 block reset

Set and reset by software.

0: does not reset the SPI5 block (default after reset)

1: resets the SPI5 block

Bit 19 TIM9RST: TIM9 block reset

Set and reset by software.

0: does not reset the TIM9 block (default after reset)

1: resets the TIM9 block

Bit 18 TIM17RST: TIM17 block reset

Set and reset by software.

0: does not reset the TIM17 block (default after reset)

1: resets the TIM17 block

Bit 17 TIM16RST: TIM16 block reset

Set and reset by software.

0: does not reset the TIM16 block (default after reset)

1: resets the TIM16 block

Bit 16 TIM15RST: TIM15 block reset

Set and reset by software.

0: does not reset the TIM15 block (default after reset)

1: resets the TIM15 block

Bits 15:14 Reserved, must be kept at reset value.

Bit 13 SPI4RST: SPI4 block reset

Set and reset by software.

0: does not reset the SPI4 block (default after reset)

1: resets the SPI4 block

Bit 12 SPI1RST: SPI2S1 block reset

Set and reset by software.

0: does not reset the SPI2S1 block (default after reset)

1: resets the SPI2S1 block

Bits 11:5 Reserved, must be kept at reset value.

Bit 4 USART1RST: USART1 block reset

Set and reset by software.

0: does not reset the USART1 block (default after reset)

1: resets the USART1 block

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 TIM1RST: TIM1 block reset

Set and reset by software.

0: does not reset the TIM1 block (default after reset)

1: resets the TIM1 block

7.8.41 RCC APB4 peripheral reset register (RCC_APB4RSTR)

Address offset: 0x09C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.DTSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
VREFRSTRes.Res.LPTIM5RSTLPTIM4RSTLPTIM3RSTLPTIM2RSTRes.Res.Res.SPI6RSTRes.LPUART1RSTRes.SBSRSTRes.
rwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bit 26 DTSRST: DTS block reset

Set and reset by software.

0: does not reset the DTS block (default after reset)

1: resets the DTS block

Bits 25:16 Reserved, must be kept at reset value.

Bit 15 VREFRST: VREF block reset

Set and reset by software.

0: does not reset the VREF block (default after reset)

1: resets the VREF block

Bits 14:13 Reserved, must be kept at reset value.

Bit 12 LPTIM5RST: LPTIM5 block reset

Set and reset by software.

0: does not reset the LPTIM5 block (default after reset)

1: resets the LPTIM5 block

Bit 11 LPTIM4RST: LPTIM4 block reset

Set and reset by software.

0: does not reset the LPTIM4 block (default after reset)

1: resets the LPTIM4 block

Bit 10 LPTIM3RST: LPTIM3 block reset

Set and reset by software.

0: does not reset the LPTIM3 block (default after reset)

1: resets the LPTIM3 block

Bit 9 LPTIM2RST: LPTIM2 block reset

Set and reset by software.

0: does not reset the LPTIM2 block (default after reset)

1: resets the LPTIM2 block

Bits 8:6 Reserved, must be kept at reset value.

7.8.42 RCC APB5 peripheral reset register (RCC_APB5RSTR)

Address offset: 0x08C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMRSTRes.DCMIPPRSTLTDCRSTRes.
rwrwrw

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 GFXTIMRST: GFXTIM block reset
Set and reset by software.
0: does not reset the GFXTIM block (default after reset)
1: resets the GFXTIM block

Bit 3 Reserved, must be kept at reset value.

Bit 2 DCMIPPRST: DCMIPP block reset
Set and reset by software.
0: does not reset the DCMIPP block (default after reset)
1: resets the DCMIPP block

Bit 1 LTDCRST: LTDC block reset
Set and reset by software.
0: does not reset the LTDC block (default after reset)
1: resets the LTDC block

Bit 0 Reserved, must be kept at reset value.

ST logo
ST logo

7.8.43 RCC AXI clocks gating disable register (RCC_CKGDISR)

Address offset: 0x0B0

Reset value: 0x8000 0000

The dynamic power consumption can be optimized by enabling the functional clock gating.

31302928272625242322212019181716
JTAGCKGEXTICKGRes.Res.Res.Res.Res.Res.Res.Res.FLASHCKGAXISRAM1CKGAXISRAM2CKGAXISRAM3CKGAXISRAM4CKGXSPI2CKG
rwrwrwrwrwrwrwrw
1514131211109876543210
XSPI1CKGFMCKGAHBCKGGFXMMUMCKGLTDCKGGFXMMUSCKGDMA2DCKGDCMIPPCKGGPU2DCLKGGPU2DS1CKGGPU2DS0CKGCPUCKGHPDMA1CKGSDMMC1CKGAHBMCKGAXICKG
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 JTAGCKG: JTAG automatic clock gating disabling

This bit is set and reset by software.

0: The clock gating is enabled. The clock is disabled except if a JTAG connection has been detected

1: The clock gating is disabled. The clock is always enabled. (default after reset)

Bit 30 EXTICKG: EXTI clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock is enabled after an event detection and stopped again when the event flag is cleared. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bits 29:22 Reserved, must be kept at reset value.

Bit 21 FLASHCKG: AXI slave Flash interface (FLIFT) clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI slave port connected to the FLASH is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 20 AXISRAM1CKG: AXI slave SRAM1 / error code correction (ECC) clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI slave port connected to the SRAM1 is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 19 AXISRAM2CKG: AXI slave SRAM2 clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI slave port connected to the SRAM2 is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 9 DMA2DCKG: AXI master DMA2D clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the DMA2D is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled

Bit 8 DCMIPPCKG: AXI master DCMIPP clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the DCMIPP is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 7 GPU2DCLKG: AXI master cache GPU2D clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the GPU2D I-Cache is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 6 GPU2DS1CKG: AXI master 1 GPU2D clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the GPU2D port 1 is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 5 GPU2DS0CKG: AXI master 0 GPU2D clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the GPU2D port 0 is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 4 CPUCKG: AXI master CPU clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the CPU is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled.

Bit 3 HPDMA1CKG: AXI master HPDMA1 clock gating disable

This bit is set and reset by software.

0: The clock gating is enabled. The clock of the AXI master port connected to the HPDMA1 is enabled on bus transaction request. (default after reset)

1: The clock gating is disabled. The clock is always enabled

7.8.44 RCC Reset status register (RCC_RSR)

Address offset: 0x130

Reset value: 0x00E0 0000

Reset by power-on reset only.

Access: 4 wait states (resynchronization) are inserted in case of successive accesses to this register.

31302928272625242322212019181716
Res.LPWRRSTFRes.WWDGRSTFRes.IWDGRSTFRes.SFTRSTFPORRSTFPINRSTFBORRSTFRes.Res.Res.OBLRSTFRMVF
rrrrrrrrrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.

Bit 31 Reserved, must be kept at reset value.

Bit 30 LPWRRSTF: reset due to illegal Stop or Standby flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when the CPU goes erroneously in Stop or Standby mode,

0: no illegal reset occurred (default after power-on reset)

1: illegal Stop or Standby reset occurred

Bit 29 Reserved, must be kept at reset value.

Bit 28 WWDGRSTF: window watchdog reset flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when a window watchdog reset occurs.

0: no window watchdog reset occurred from WWDG (default after power-on reset)

1: window watchdog reset occurred from WWDG

Bit 27 Reserved, must be kept at reset value.

Bit 26 IWDGRSTF: independent watchdog reset flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when an independent watchdog reset occurs.

0: no independent watchdog reset occurred (default after power-on reset)

1: independent watchdog reset occurred

Bit 25 Reserved, must be kept at reset value.

Bit 24 SFTRSTF: system reset from CPU reset flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when the system reset is due to CPU. The CPU can generate a system reset by writing SYSRESETREQ bit of AIRCR register of the core M7.

0: no CPU software reset occurred (default after power-on reset)

1: a system reset has been generated by the CPU

Bit 23 PORRSTF: POR/PDR reset flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when a POR/PDR reset occurs.

0: no POR/PDR reset occurred

1: POR/PDR reset occurred (default after power-on reset)

Bit 22 PINRSTF: pin reset flag (NRST) (1)

Reset by software by writing the RMVF bit.

Set by hardware when a reset from pin occurs.

0: no reset from pin occurred

1: reset from pin occurred (default after power-on reset)

Bit 21 BORRSTF: BOR reset flag (1)

Reset by software by writing the RMVF bit.

Set by hardware when a BOR reset occurs (pwr_bor_rst).

0: no BOR reset occurred

1: BOR reset occurred (default after power-on reset)

Bits 20:18 Reserved, must be kept at reset value.

Bit 17 OBLRSTF: Option byte loading reset flag (1)

Reset by software by the RMVF bit.

Set by hardware when a reset from the option byte loading occurs.

0: No reset from option byte loading occurred

1: Reset from option byte loading occurred

Bit 16 RMVF: remove reset flag

Set and reset by software to reset the value of the reset flags.

0: reset of the reset flags not activated (default after power-on reset)

1: resets the value of the reset flags

Bits 15:0 Reserved, must be kept at reset value.

  1. 1. Refer to Table 57: Reset source identification (RCC_RSR) for details on flag behavior.

7.8.45 RCC AHB1 clock enable register (RCC_AHB1ENR)

Address offset: 0x138

Reset value: 0x0000 0000

31302928272625242322212019181716
ADF1ENRes.Res.Res.OTGFSENUSBPHYCENOTGHSENRes.Res.Res.Res.Res.Res.Res.ETH1RXENETH1TXEN
rwrwrwrwrwrw
1514131211109876543210
ETH1MACENRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12ENGPDMA1ENRes.Res.Res.Res.
rwrwrw

Bit 31 ADF1EN: ADF clocks enable

Set and reset by software.

0: ADF clocks disabled (default after reset)

1: ADF clocks enabled

Bits 30:28 Reserved, must be kept at reset value.

Bit 27 OTGFSEN: OTGFS peripheral clocks enable

Set and reset by software.

0: OTGFS peripheral clocks disabled (default after reset)

1: OTGFS peripheral clocks enabled

Bit 26 USBPHYCEN: USBPHYC clocks enable

Set and reset by software.

0: USBPHYC clocks disabled (default after reset)

1: USBPHYC clocks enabled

Bit 25 OTGHSEN: OTGHS clocks enable

Set and reset by software.

0: OTGHS clocks disabled (default after reset)

1: OTGHS clocks enabled

Bits 24:18 Reserved, must be kept at reset value.

Bit 17 ETH1RXEN: ETH1 reception clock enable

Set and reset by software.

0: ETH1 reception clock disabled (default after reset)

1: ETH1 reception clock enabled

Bit 16 ETH1TXEN: ETH1 transmission clock enable

Set and reset by software.

0: ETH1 transmission clock disabled (default after reset)

1: ETH1 transmission clock enabled

7.8.46 RCC AHB2 clock enable register (RCC_AHB2ENR)

Address offset: 0x13C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.SRAM2ENSRAM1ENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw
1514131211109876543210
Res.CORDICENRes.Res.Res.Res.SDMMC2ENRes.Res.Res.Res.Res.Res.Res.PSSIENRes.
rwrwrw

Bit 31 Reserved, must be kept at reset value.

Bit 30 SRAM2EN: SRAM2 clock enable

Set and reset by software.

0: SRAM2 clock disabled (default after reset)

1: SRAM2 clock enabled

Bit 29 SRAM1EN: SRAM1 clock enable

Set and reset by software.

0: SRAM1 clock disabled (default after reset)

1: SRAM1 clock enabled

Bits 28:15 Reserved, must be kept at reset value.

Bit 14 CORDICEN: CORDIC clock enable

Set and reset by software.

0: CORDIC clock disabled (default after reset)

1: CORDIC clock enabled

Bits 13:10 Reserved, must be kept at reset value.

Bit 9 SDMMC2EN: SDMMC2 and SDMMC2 delay clock enable

Set and reset by software.

0: SDMMC2 and SDMMC2 delay clock disabled (default after reset)

1: SDMMC2 and SDMMC2 delay clock enabled

Bits 8:2 Reserved, must be kept at reset value.

Bit 1 PSSIEN: PSSI peripheral clocks enable

Set and reset by software.

0: PSSI peripheral clocks disabled (default after reset)

1: PSSI peripheral clocks enabled:

Bit 0 Reserved, must be kept at reset value.

7.8.47 RCC AHB3 clock enable register (RCC_AHB3ENR)

Address offset: 0x158

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.PKAENRes.SAESENRes.CRYPENHASHENRNGEN
rwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 PKAEN: PKA peripheral clock enable

Set and reset by software.

0: PKA peripheral clock disabled (default after reset)

1: PKA peripheral clock enabled

Bit 5 Reserved, must be kept at reset value.

Bit 4 SAESEN: SAES peripheral clock enable

Set and reset by software.

This bit controls the enable of the clock delivered to the SAES.

0: The SAES peripheral clocks are disabled (default after reset)

1: The SAES peripheral clocks are enabled

Bit 3 Reserved, must be kept at reset value.

Bit 2 CRYPEN: CRYP peripheral clock enable

Set and reset by software.

0: CRYP peripheral clock disabled (default after reset)

1: CRYP peripheral clock enabled

Bit 1 HASHEN: HASH peripheral clock enable

Set and reset by software.

0: HASH peripheral clock disabled (default after reset)

1: HASH peripheral clock enabled

Bit 0 RNGEN: RNG peripheral clocks enable

Set and reset by software.

0: RNG peripheral clocks disabled (default after reset)

1: RNG peripheral clocks enabled.

7.8.48 RCC AHB4 clock enable register (RCC_AHB4ENR)

Address offset: 0x140

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.BKPRAMENRes.Res.Res.Res.Res.Res.Res.Res.CRCENRes.Res.Res.
rwrw
1514131211109876543210
GPIOPENGPIOOENGPIONENGPIOMENRes.Res.Res.Res.GPIOHENGPIOGENGPIOFENGPIOEENGPIODENGPIOCENGPIOBENGPIOAEN
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bit 28 BKPRAMEN: Backup RAM clock enable

Set and reset by software.

0: Backup RAM clock disabled (default after reset)

1: Backup RAM clock enabled

Bits 27:20 Reserved, must be kept at reset value.

Bit 19 CRCEN: CRC clock enable

Set and reset by software.

0: CRC clock disabled (default after reset)

1: CRC clock enabled

Bits 18:16 Reserved, must be kept at reset value.

Bit 15 GPIOPEN: GPIOP peripheral clock enable

Set and reset by software.

0: GPIOP peripheral clock disabled (default after reset)

1: GPIOP peripheral clock enabled

Bit 14 GPIOOEN: GPIOO peripheral clock enable

Set and reset by software.

0: GPIOO peripheral clock disabled (default after reset)

1: GPIOO peripheral clock enabled

Bit 13 GPIONEN: GPION peripheral clock enable

Set and reset by software.

0: GPION peripheral clock disabled (default after reset)

1: GPION peripheral clock enabled

Bit 12 GPIOMEN: GPIOM peripheral clock enable

Set and reset by software.

0: GPIOM peripheral clock disabled (default after reset)

1: GPIOM peripheral clock enabled

Bits 11:8 Reserved, must be kept at reset value.

7.8.49 RCC AHB5 clock enable register (RCC_AHB5ENR)

Address offset: 0x134

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPU2DENGFXMMUENRes.Res.Res.
rwrw
1514131211109876543210
Res.XSPIMENRes.XSPI2ENRes.Res.Res.SDMMC1ENRes.Res.XSPI1ENFMCENJPEGENRes.DMA2DENHPDMA1EN
rwrwrwrwrwrwrwrw

Bits 31:21 Reserved, must be kept at reset value.

Bit 20 GPU2DEN: GPU2D peripheral clock enable

Set and reset by software.

0: GPU2D peripheral clock disabled (default after reset)

1: GPU2D peripheral clock enabled

Bit 19 GFXMMUEN: GFXMMU peripheral clock enable

Set and reset by software.

0: GFXMMU peripheral clock disabled (default after reset)

1: GFXMMU peripheral clock enabled

Bits 18:15 Reserved, must be kept at reset value.

Bit 14 XSPIMEN: XSPIM peripheral clock enable

Set and reset by software.

0: XSPIM peripheral clock disabled (default after reset)

1: XSPIM peripheral clock enabled

Bit 13 Reserved, must be kept at reset value.

Bit 12 XSPI2EN: XSPI2 and MCE2 peripheral clocks enable

Set and reset by software.

The hardware prevents writing this bit if XSPICKP = 1.

0: XSPI2 and MCE2 peripheral clocks disabled (default after reset)

1: XSPI2 and MCE2 peripheral clocks enabled

Bits 11:9 Reserved, must be kept at reset value.

Bit 8 SDMMC1EN: SDMMC1 and DB_SDMMC1 peripheral clocks enable

Set and reset by software.

0: SDMMC1 and DB_SDMMC1 peripheral clocks disabled (default after reset)

1: SDMMC1 and DB_SDMMC1 peripheral clocks enabled

Bits 7:6 Reserved, must be kept at reset value.

7.8.50 RCC APB1 clock enable register 1 (RCC_APB1ENR1)

Address offset: 0x148

Reset value: 0x0000 0000

31302928272625242322212019181716
UART8ENUART7ENRes.Res.CECENRes.Res.Res.I2C3ENI2C2ENI2C1_I3C1ENUART5ENUART4ENUSART3ENUSART2ENSPDIFRXEN
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPI3ENSPI2ENRes.Res.WWDGGENRes.LPTIM1ENTIM14ENTIM13ENTIM12ENTIM7ENTIM6ENTIM5ENTIM4ENTIM3ENTIM2EN
rwrwrsrwrwrwrwrwrwrwrwrwrw

Bit 31 UART8EN: UART8 peripheral clocks enable

Set and reset by software.

0: UART8 peripheral clocks disabled (default after reset)

1: UART8 peripheral clocks enabled

Bit 30 UART7EN: UART7 peripheral clocks enable

Set and reset by software.

0: UART7 peripheral clocks disabled (default after reset)

1: UART7 peripheral clocks enabled

Bits 29:28 Reserved, must be kept at reset value.

Bit 27 CECEN: HDMI-CEC peripheral clock enable

Set and reset by software.

0: HDMI-CEC peripheral clock disabled (default after reset)

1: HDMI-CEC peripheral clock enabled

Bits 26:24 Reserved, must be kept at reset value.

Bit 23 I2C3EN: I2C3 peripheral clocks enable

Set and reset by software.

0: I2C3 peripheral clocks disabled (default after reset)

1: I2C3 peripheral clocks enabled

Bit 22 I2C2EN: I2C2 peripheral clocks enable

Set and reset by software.

0: I2C2 peripheral clocks disabled (default after reset)

1: I2C2 peripheral clocks enabled

Bit 21 I2C1_I3C1EN: I2C1/I3C1 peripheral clocks enable

Set and reset by software.

0: I2C1/I3C1 peripheral clocks disabled (default after reset)

1: I2C1/I3C1 peripheral clocks enabled

Bit 20 UART5EN: UART5 peripheral clocks enable

Set and reset by software.

0: UART5 peripheral clocks disabled (default after reset)

1: UART5 peripheral clocks enabled

7.8.51 RCC APB1 clock enable register 2 (RCC_APB1ENR2)

Address offset: 0x14C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.UCPD1ENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.FDCANENRes.Res.MDIOSENRes.Res.Res.CRSENRes.
rwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bit 27 UCPD1EN: UCPD peripheral clock enable

Set and reset by software.

0: UCPD peripheral clock disabled (default after reset)

1: UCPD peripheral clock enabled

Bits 26:9 Reserved, must be kept at reset value.

Bit 8 FDCANEN: FDCAN peripheral clock enable

Set and reset by software.

0: FDCAN peripheral clock disabled (default after reset)

1: FDCAN peripheral clock enabled

Bits 7:6 Reserved, must be kept at reset value.

Bit 5 MDIOSEN: MDIOS peripheral clock enable

Set and reset by software.

0: MDIOS peripheral clock disabled (default after reset)

1: MDIOS peripheral clock enabled

Bits 4:2 Reserved, must be kept at reset value.

Bit 1 CRSEN: clock recovery system peripheral clock enable

Set and reset by software.

0: CRS peripheral clock disabled (default after reset)

1: CRS peripheral clock enabled

Bit 0 Reserved, must be kept at reset value.

7.8.52 RCC APB2 clock enable register (RCC_APB2ENR)

Address offset: 0x150

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.SAI2ENSAI1ENRes.SPI5ENTIM9ENTIM17ENTIM16ENTIM15EN
rwrwrwrwrwrwrw
1514131211109876543210
Res.Res.SPI4ENSPI1ENRes.Res.Res.Res.Res.Res.Res.USART1ENRes.Res.Res.TIM1EN
rwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 SAI2EN: SAI2 peripheral clocks enable

Set and reset by software.

0: SAI2 peripheral clocks disabled (default after reset)

1: SAI2 peripheral clocks enabled:

The peripheral clocks of the SAI2 are the kernel clock selected by SAI2SEL, and the pclk2 bus interface clock.

Bit 22 SAI1EN: SAI1 peripheral clocks enable

Set and reset by software.

0: SAI1 peripheral clocks disabled (default after reset)

1: SAI1 peripheral clocks enabled:

The peripheral clocks of the SAI1 are the kernel clock selected by SAI1SEL, and the pclk2 bus interface clock.

Bit 21 Reserved, must be kept at reset value.

Bit 20 SPI5EN: SPI5 peripheral clocks enable

Set and reset by software.

0: SPI5 peripheral clocks disabled (default after reset)

1: SPI5 peripheral clocks enabled:

The peripheral clocks of the SPI5 are the kernel clock selected by SPI45SEL, and the pclk2 bus interface clock.

Bit 19 TIM9EN: TIM9 peripheral clock enable

Set and reset by software.

0: TIM9 peripheral clock disabled (default after reset)

1: TIM9 peripheral clock enabled

Bit 18 TIM17EN: TIM17 peripheral clock enable

Set and reset by software.

0: TIM17 peripheral clock disabled (default after reset)

1: TIM17 peripheral clock enabled

Bit 17 TIM16EN: TIM16 peripheral clock enable

Set and reset by software.

0: TIM16 peripheral clock disabled (default after reset)

1: TIM16 peripheral clock enabled

Bit 16 TIM15EN: TIM15 peripheral clock enable

Set and reset by software.

0: TIM15 peripheral clock disabled (default after reset)

1: TIM15 peripheral clock enabled

Bits 15:14 Reserved, must be kept at reset value.

Bit 13 SPI4EN: SPI4 Peripheral Clocks Enable

Set and reset by software.

0: SPI4 peripheral clocks disabled (default after reset)

1: SPI4 peripheral clocks enabled:

The peripheral clocks of the SPI4 are: the kernel clock selected by SPI45SEL, and the clk2 bus interface clock.

Bit 12 SPI1EN: SPI2S1 Peripheral Clocks Enable

Set and reset by software.

0: SPI2S1 peripheral clocks disabled (default after reset)

1: SPI2S1 peripheral clocks enabled:

The peripheral clocks of the SPI2S1 are: the kernel clock selected by SPI1SEL, and the clk2 bus interface clock.

Bits 11:5 Reserved, must be kept at reset value.

Bit 4 USART1EN: USART1 peripheral clocks enable

Set and reset by software.

0: USART1 peripheral clocks disabled (default after reset)

1: USART1 peripheral clocks enabled:

The peripheral clocks of the USART1 are the kernel clock selected by USART1SEL, and the clk2 bus interface clock.

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 TIM1EN: TIM1 peripheral clock enable

Set and reset by software.

0: TIM1 peripheral clock disabled (default after reset)

1: TIM1 peripheral clock enabled

7.8.53 RCC APB4 clock enable register (RCC_APB4ENR)

Address offset: 0x154

Reset value: 0x0001 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.DTSENRes.Res.Res.Res.Res.Res.Res.Res.Res.RTCAPBEN
rwrw
1514131211109876543210
VREFENRes.Res.LPTIM5ENLPTIM4ENLPTIM3ENLPTIM2ENRes.Res.Res.SPI6ENRes.LPUART1ENRes.SBSSENRes.
rwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bit 26 DTSSEN: Temperature Sensor peripheral clock enable

Set and reset by software.

0: DTS peripheral clock disabled (default after reset)

1: DTS peripheral clock enabled

Bits 25:17 Reserved, must be kept at reset value.

Bit 16 RTCAPBEN: RTC APB clock enable

Set and reset by software.

0: The register clock interface of the RTC (APB) is disabled

1: The register clock interface of the RTC (APB) is enabled (default after reset)

Bit 15 VREFEN: VREF peripheral clock enable

Set and reset by software.

0: VREF peripheral clock disabled (default after reset)

1: VREF peripheral clock enabled

Bits 14:13 Reserved, must be kept at reset value.

Bit 12 LPTIM5EN: LPTIM5 peripheral clocks enable

Set and reset by software.

0: LPTIM5 peripheral clocks disabled (default after reset)

1: LPTIM5 peripheral clocks enabled

The LPTIM5 kernel clock can be selected by LPTIM45SEL.

Bit 11 LPTIM4EN: LPTIM4 peripheral clocks enable

Set and reset by software.

0: LPTIM4 peripheral clocks disabled (default after reset)

1: LPTIM4 peripheral clocks enabled

The LPTIM4 kernel clock can be selected by LPTIM45SEL.

Bit 10 LPTIM3EN: LPTIM3 peripheral clocks enable

Set and reset by software.

0: LPTIM3 peripheral clocks disabled (default after reset)

1: LPTIM3 peripheral clocks enabled

The LPTIM3 kernel clock can be selected by LPTIM23SEL.

Bit 9 LPTIM2EN: LPTIM2 peripheral clocks enable

Set and reset by software.

0: LPTIM2 peripheral clocks disabled (default after reset)

1: LPTIM2 peripheral clocks enabled

The LPTIM2 kernel clock can be selected by LPTIM23SEL.

Bits 8:6 Reserved, must be kept at reset value.

Bit 5 SPI6EN: SPI/I2S6 peripheral clocks enable

Set and reset by software.

0: SPI/I2S6 peripheral clocks disabled (default after reset)

1: SPI/I2S6 peripheral clocks enabled

The peripheral clocks of the SPI/I2S6 are the kernel clock selected by SPI6SEL and provided to com_clk input, and the pclk4 bus interface clock.

Bit 4 Reserved, must be kept at reset value.

Bit 3 LPUART1EN: LPUART1 peripheral clocks enable

Set and reset by software.

0: LPUART1 peripheral clocks disabled (default after reset)

1: LPUART1 peripheral clocks enabled

The peripheral clocks of the LPUART1 are the kernel clock selected by LPUART1SEL and provided to UCLK input, and the pclk4 bus interface clock.

Bit 2 Reserved, must be kept at reset value.

Bit 1 SBSSEN: SBS peripheral clock enable

Set and reset by software.

0: SBS peripheral clock disabled (default after reset)

1: SBS peripheral clock enabled

Bit 0 Reserved, must be kept at reset value.

7.8.54 RCC APB5 clock enable register (RCC_APB5ENR)

Address offset: 0x144

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMENRes.DCMIPPENLTDCENRes.
rwrwrw

Bits 31:5 Reserved, must be kept at reset value.

Bit 4 GFXTIMEN: GFXTIM peripheral clock enable

Set and reset by software.

0: GFXTIM peripheral clock disabled (default after reset)

1: GFXTIM peripheral clock provided

Bit 3 Reserved, must be kept at reset value.

Bit 2 DCMIPPEN: DCMIPP peripheral clock enable

Set and reset by software.

0: DCMIPP peripheral clock disabled (default after reset)

1: DCMIPP peripheral clock provided

Bit 1 LTDCEN: LTDC peripheral clock enable

Provides the pixel clock (ltdc_clk) to the LTDC block.

Set and reset by software.

0: LTDC peripheral clock disabled (default after reset)

1: LTDC peripheral clock provided to the LTDC block

Bit 0 Reserved, must be kept at reset value.

7.8.55 RCC AHB5 low-power clock enable register (RCC_AHB5LPENR)

Address offset: 0x15C

Reset value: 0xF018 513F

31302928272625242322212019181716
AXISRAMLPENITCMLPENDTCM2LPENDTCM1LPENRes.Res.Res.Res.Res.Res.Res.GPU2DLPENGFXMMULPENRes.Res.Res.
rwrwrwrwrwrw
1514131211109876543210
Res.XSPIMLPENRes.XSPI2LPENRes.Res.Res.SDMMC1LPENRes.Res.XSPI1LPENFMCLPENJPEGLPENFLASHLPENDMA2DLPENHPDMA1LPEN
rwrwrwrwrwrwrwrwrw

Bit 31 AXISRAMLPEN:

AXISRAM[4:1] low-power peripheral clock enable

Set and reset by software.

0: AXISRAM[4:1] interface peripheral clock disabled in low-power mode

1: AXISRAM[4:1] interface peripheral clock enabled in low-power mode (default after reset)

Bit 30 ITCMLPEN: ITCM low-power peripheral clock enable

Set and reset by software.

0: ITCM interface peripheral clock disabled in low-power mode

1: ITCM interface peripheral clock enabled in low-power mode (default after reset)

Bit 29 DTCM2LPEN: DTCM2 low-power peripheral clock enable

Set and reset by software.

0: DTCM2 interface peripheral clock disabled in low-power mode

1: DTCM2 interface peripheral clock enabled in low-power mode (default after reset)

Bit 28 DTCM1LPEN: DTCM1 low-power peripheral clock enable

Set and reset by software.

0: DTCM1 interface peripheral clock disabled in low-power mode

1: DTCM1 interface peripheral clock enabled in low-power mode (default after reset)

Bits 27:21 Reserved, must be kept at reset value.

Bit 20 GPU2DLPEN: GPU2D low-power peripheral clock enable

Set and reset by software.

0: GPU2D interface clock peripheral disabled in low-power mode

1: GPU2D interface clock peripheral enabled in low-power mode (default after reset)

Bit 19 GFXMMULPEN: GFXMMU low-power peripheral clock enable

Set and reset by software.

0: GFXMMU interface peripheral clock disabled in low-power mode

1: GFXMMU interface peripheral clock enabled in low-power mode (default after reset)

Bits 18:15 Reserved, must be kept at reset value.

7.8.56 RCC AHB1 low-power clock enable register (RCC_AHB1LPENR)

Address offset: 0x160

Reset value: 0x8E03 8030

31302928272625242322212019181716
ADF1LPENRes.Res.Res.OTGFSLPENUSBPHYCLPENOTGHSLPENUCPDCTRLRes.Res.Res.Res.Res.Res.ETH1RXLPENETH1TXLPEN
rwrwrwrwrwrwrw
1514131211109876543210
ETH1MACLPENRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12LPENGPDMA1LPENRes.Res.Res.Res.
rwrwrw

Bit 31 ADF1LPEN: ADF clock enable in low-power mode

Set and reset by software.

0: ADF peripheral clock disabled in low-power mode

1: ADF peripheral clock enabled in low-power mode (default after reset)

Bits 30:28 Reserved, must be kept at reset value.

Bit 27 OTGFSLPEN: OTGFS clock enable in low-power mode

Set and reset by software.

0: OTGFS peripheral clock disabled in low-power mode

1: OTGFS peripheral clock enabled in low-power mode (default after reset)

Bit 26 USBPHYCLPEN: USBPHYC peripheral clock enable in low-power mode

Set and reset by software.

0: USBPHYC peripheral clock disabled in low-power mode

1: USBPHYC peripheral clock enabled in low-power mode (default after reset)

Bit 25 OTGHSLPEN: OTGHS peripheral clock enable in low-power mode

Set and reset by software.

0: OTGHS peripheral clock disabled in low-power mode

1: OTGHS peripheral clock enabled in low-power mode (default after reset)

Bit 24 UCPDCTRL: USBPHYC common block power-down control

Set and reset by software.

0: In SUSPEND, PHY state machine, bias and USBPHYC PLL remain powered (default after reset).

1: In SUSPEND, PHY state machine, bias and USBPHYC PLL are powered down.

Bits 23:18 Reserved, must be kept at reset value.

Bit 17 ETH1RXLPEN: ETH1 reception peripheral clock enable in low-power mode

Set and reset by software.

0: ETH1 reception peripheral clock disabled in low-power mode

1: ETH1 reception peripheral clock enabled in low-power mode (default after reset)

7.8.57 RCC AHB2 low-power clock enable register (RCC_AHB2LPENR)

Address offset: 0x164

Reset value: 0x6000 4202

31302928272625242322212019181716
Res.SRAM2LPENSRAM1LPENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw
1514131211109876543210
Res.CORDICLPENRes.Res.Res.Res.SDMMC2LPENRes.Res.Res.Res.Res.Res.Res.PSSILPENRes.
rwrwrw

Bit 31 Reserved, must be kept at reset value.

Bit 30 SRAM2LPEN: SRAM2 clock enable in low-power mode

Set and reset by software.

0: SRAM2 clock disabled in low-power mode

1: SRAM2 clock enabled in low-power mode (default after reset)

Bit 29 SRAM1LPEN: SRAM1 clock enable in low-power mode

Set and reset by software.

0: SRAM1 clock disabled in low-power mode

1: SRAM1 clock enabled in low-power mode (default after reset)

Bits 28:15 Reserved, must be kept at reset value.

Bit 14 CORDICLPEN: CORDIC clock enable in low-power mode

Set and reset by software.

0: CORDIC clock disabled in low-power mode

1: CORDIC clock enabled in low-power mode (default after reset)

Bits 13:10 Reserved, must be kept at reset value.

Bit 9 SDMMC2LPEN: SDMMC2 and SDMMC2 delay clock enable in low-power mode

Set and reset by software.

0: SDMMC2 and SDMMC2 delay clock disabled in low-power mode

1: SDMMC2 and SDMMC2 delay clock enabled in low-power mode (default after reset)

Bits 8:2 Reserved, must be kept at reset value.

Bit 1 PSSILPEN: PSSI peripheral clock enable in low-power mode

Set and reset by software.

0: PSSI peripheral clock disabled in low-power mode

1: PSSI peripheral clock enabled in low-power mode (default after reset)

Bit 0 Reserved, must be kept at reset value.

7.8.58 RCC AHB3 low-power clock enable register (RCC_AHB3LPENR)

Address offset: 0x16C

Reset value: 0x0000 0057

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.PKALPENRes.SAESLPENRes.CRYPLPENHASHLPENRNGLPEN
rwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 PKALPEN: PKA peripheral clock enable in low-power mode

Set and reset by software.

0: PKA peripheral clock disabled in low-power mode

1: PKA peripheral clock enabled in low-power mode (default after reset)

Bit 5 Reserved, must be kept at reset value.

Bit 4 SAESLPEN: SAES peripheral clock enable in low-power mode

Set and reset by software.

0: SAES peripheral clock disabled in low-power mode

1: SAES peripheral clock enabled in low-power mode (default after reset)

Bit 3 Reserved, must be kept at reset value.

Bit 2 CRYPLPEN: CRYP peripheral clock enable in low-power mode

Set and reset by software.

0: CRYP peripheral clock disabled in low-power mode

1: CRYP peripheral clock enabled in low-power mode (default after reset)

Bit 1 HASHLPEN: HASH peripheral clock enable in low-power mode

Set and reset by software.

0: HASH peripheral clock disabled in low-power mode

1: HASH peripheral clock enabled in low-power mode (default after reset)

Bit 0 RNGLPEN: RNG peripheral clock enable in low-power mode

Set and reset by software.

0: RNG peripheral clocks disabled in low-power mode

1: RNG peripheral clock enabled in low-power mode (default after reset)

7.8.59 RCC AHB4 low-power clock enable register (RCC_AHB4LPENR)

Address offset: 0x168

Reset value: 0x1008 F0FF

31302928272625242322212019181716
Res.Res.Res.BKPRAMLPENRes.Res.Res.Res.Res.Res.Res.Res.CRCLPENRes.Res.Res.
rwrw
1514131211109876543210
GPIOPLPENGPIOOLPENGPIONLPENGPIOMLPENRes.Res.Res.Res.GPIOHLPENGPIOGLPENGPIOFLPENGPIOELPENGPIODLPENGPIOCLPENGPIOBLPENGPIOALPEN
rwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:29 Reserved, must be kept at reset value.

Bit 28 BKPRAMLPEN: Backup RAM clock enable in low-power mode

Set and reset by software.

0: Backup RAM clock disabled in low-power mode

1: Backup RAM clock enabled in low-power mode (default after reset)

Bits 27:20 Reserved, must be kept at reset value.

Bit 19 CRCLPEN: CRC clock enable in low-power mode

Set and reset by software.

0: CRC clock disabled in low-power mode

1: CRC clock enabled in low-power mode (default after reset)

Bits 18:16 Reserved, must be kept at reset value.

Bit 15 GPIOPLPEN: GPIOP peripheral clock enable in low-power mode

Set and reset by software.

0: GPIOP peripheral clock disabled in low-power mode

1: GPIOP peripheral clock enabled in low-power mode (default after reset)

Bit 14 GPIOOLPEN: GPIOO peripheral clock enable in low-power mode

Set and reset by software.

0: GPIOO peripheral clock disabled in low-power mode

1: GPIOO peripheral clock enabled in low-power mode (default after reset)

Bit 13 GPIONLPEN: GPION peripheral clock enable in low-power mode

Set and reset by software.

0: GPION peripheral clock disabled in low-power mode

1: GPION peripheral clock enabled in low-power mode (default after reset)

Bit 12 GPIOMLPEN: GPIOM peripheral clock enable in low-power mode

Set and reset by software.

0: GPIOM peripheral clock disabled in low-power mode

1: GPIOM peripheral clock enabled in low-power mode (default after reset)

Bits 11:8 Reserved, must be kept at reset value.

7.8.60 RCC APB1 low-power clock enable register 1 (RCC_APB1LPENR1)

Address offset: 0x170

Reset value: 0xC8FF CBFF

31302928272625242322212019181716
UART8LPENUART7LPENRes.Res.CECLPENRes.Res.Res.I2C3LPENI2C2LPENI2C1_I3C1LPENUART5LPENUART4LPENUSART3LPENUSART2LPENSPDIFRXLPEN
rwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SPI3LPENSPI2LPENRes.Res.WWDGLPENRes.LPTIM1LPENTIM14LPENTIM13LPENTIM12LPENTIM7LPENTIM6LPENTIM5LPENTIM4LPENTIM3LPENTIM2LPEN
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bit 31 UART8LPEN: UART8 peripheral clocks enable in low-power mode

Set and reset by software.

0: UART8 peripheral clocks disabled in low-power mode

1: UART8 peripheral clocks enabled in low-power mode (default after reset)

Bit 30 UART7LPEN: UART7 peripheral clocks enable in low-power mode

Set and reset by software.

0: UART7 peripheral clocks disabled in low-power mode

1: UART7 peripheral clocks enabled in low-power mode (default after reset)

Bits 29:28 Reserved, must be kept at reset value.

Bit 27 CECLPEN: HDMI-CEC peripheral clocks enable in low-power mode

Set and reset by software.

0: HDMI-CEC peripheral clocks disabled in low-power mode

1: HDMI-CEC peripheral clocks enabled in low-power mode (default after reset)

Bits 26:24 Reserved, must be kept at reset value.

Bit 23 I2C3LPEN: I2C3 peripheral clocks enable in low-power mode

Set and reset by software.

0: I2C3 peripheral clocks disabled in low-power mode

1: I2C3 peripheral clocks enabled in low-power mode (default after reset):

Bit 22 I2C2LPEN: I2C2 peripheral clocks enable in low-power mode

Set and reset by software.

0: I2C2 peripheral clocks disabled in low-power mode

1: I2C2 peripheral clocks enabled in low-power mode (default after reset):.

Bit 21 I2C1_I3C1LPEN: I2C1/I3C1 peripheral clocks enable in low-power mode

Set and reset by software.

0: I2C1/I3C1 peripheral clocks disabled in low-power mode

1: I2C1/I3C1 peripheral clocks enabled in low-power mode (default after reset):

7.8.61 RCC APB1 low-power clock enable register 2 (RCC_APB1LPENR2)

Address offset: 0x174

Reset value: 0x0800 0122

31302928272625242322212019181716
Res.Res.Res.Res.UCPD1LPENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.FDCANLPENRes.Res.MDIOSLPENRes.Res.Res.CRSLPENRes.
rwrwrw

Bits 31:28 Reserved, must be kept at reset value.

Bit 27 UCPD1LPEN: UCPD peripheral clock enable in low-power mode

Set and reset by software.

0: UCPD peripheral clock disabled in low-power mode

1: UCPD peripheral clock enabled in low-power mode (default after reset)

Bits 26:9 Reserved, must be kept at reset value.

Bit 8 FDCANLPEN: FDCAN peripheral clock enable in low-power mode

Set and reset by software.

0: FDCAN peripheral clock disabled in low-power mode

1: FDCAN peripheral clock enabled in low-power mode (default after reset)

Bits 7:6 Reserved, must be kept at reset value.

Bit 5 MDIOSLPEN: MDIOS peripheral clock enable in low-power mode

Set and reset by software.

0: MDIOS peripheral clock disabled in low-power mode

1: MDIOS peripheral clock enabled in low-power mode (default after reset)

Bits 4:2 Reserved, must be kept at reset value.

Bit 1 CRSLPEN: clock recovery system peripheral clock enable in low-power mode

Set and reset by software.

0: CRS peripheral clock disabled in low-power mode

1: CRS peripheral clock enabled in low-power mode (default after reset)

Bit 0 Reserved, must be kept at reset value.

7.8.62 RCC APB2 low-power clock enable register (RCC_APB2LPENR)

Address offset: 0x178

Reset value: 0x00DF 3011

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.SAI2LPENSAI1LPENRes.SPI5LPENTIM9LPENTIM17LPENTIM16LPENTIM15LPEN
rwrwrwrwrwrwrw
1514131211109876543210
Res.Res.SPI4LPENSPI1LPENRes.Res.Res.Res.Res.Res.Res.USART1LPENRes.Res.Res.TIM1LPEN
rwrwrwrw

Bits 31:24 Reserved, must be kept at reset value.

Bit 23 SAI2LPEN: SAI2 peripheral clocks enable in low-power mode

Set and reset by software.

0: SAI2 peripheral clocks disabled in low-power mode

1: SAI2 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the SAI2 are: the kernel clock selected by SAI2SEL and provided to SAI CK_A and SAI CK_B inputs, and the pclk2 bus interface clock.

Bit 22 SAI1LPEN: SAI1 peripheral clocks enable in low-power mode

Set and reset by software.

0: SAI1 peripheral clocks disabled in low-power mode

1: SAI1 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the SAI1 are: the kernel clock selected by SAI1SEL and provided to SAI CK_A and SAI CK_B inputs, and the pclk2 bus interface clock.

Bit 21 Reserved, must be kept at reset value.

Bit 20 SPI5LPEN: SPI5 peripheral clocks enable in low-power mode

Set and reset by software.

0: SPI5 peripheral clocks disabled in low-power mode

1: SPI5 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the SPI5 are the kernel clock selected by SPI45SEL and provided to com_clk input, and the pclk2 bus interface clock.

Bit 19 TIM9LPEN: TIM9 peripheral clock enable in low-power mode

Set and reset by software.

0: TIM9 peripheral clock disabled in low-power mode

1: TIM9 peripheral clock enabled in low-power mode (default after reset)

Bit 18 TIM17LPEN: TIM17 peripheral clock enable in low-power mode

Set and reset by software.

0: TIM17 peripheral clock disabled in low-power mode

1: TIM17 peripheral clock enabled in low-power mode (default after reset)

7.8.63 RCC APB4 low-power clock enable register (RCC_APB4LPENR)

Address offset: 0x17C

Reset value: 0x0401 9E2A

31302928272625242322212019181716
Res.Res.Res.Res.Res.DTSLPENRes.Res.Res.Res.Res.Res.Res.Res.Res.RTCAPBLPEN
rwrw
1514131211109876543210
VREFLPENRes.Res.LPTIM5LPENLPTIM4LPENLPTIM3LPENLPTIM2LPENRes.Res.Res.SPI6LPENRes.LPUART1LPENRes.SBSLPENRes.
rwrwrwrwrwrwrwrw

Bits 31:27 Reserved, must be kept at reset value.

Bit 26 DTSLPEN: temperature sensor peripheral clock enable in low-power mode

Set and reset by software.

0: DTS peripheral clock disabled in low-power mode

1: DTS peripheral clock enabled in low-power mode (default after reset)

Bits 25:17 Reserved, must be kept at reset value.

Bit 16 RTCAPBLPEN: RTC APB clock enable in low-power mode

Set and reset by software.

0: The register clock interface of the RTC (APB) is disabled in low-power mode

1: The register clock interface of the RTC (APB) is enabled in low-power mode (default after reset)

Bit 15 VREFLPEN: VREF peripheral clock enable in low-power mode

Set and reset by software.

0: VREF peripheral clock disabled in low-power mode

1: VREF peripheral clock enabled in low-power mode (default after reset)

Bits 14:13 Reserved, must be kept at reset value.

Bit 12 LPTIM5LPEN: LPTIM5 peripheral clocks enable in low-power mode

Set and reset by software.

0: LPTIM5 peripheral clocks disabled in low-power mode

1: LPTIM5 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the LPTIM5 are the kernel clock selected by LPTIM45SEL and provided to clk_lpt input, and the pclk4 bus interface clock.

Bit 11 LPTIM4LPEN: LPTIM4 peripheral clocks enable in low-power mode

Set and reset by software.

0: LPTIM4 peripheral clocks disabled in low-power mode

1: LPTIM4 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the LPTIM4 are the kernel clock selected by LPTIM45SEL and provided to clk_lpt input, and the pclk4 bus interface clock.

Bit 10 LPTIM3LPEN: LPTIM3 peripheral clocks enable in low-power mode

Set and reset by software.

0: LPTIM3 peripheral clocks disabled in low-power mode

1: LPTIM3 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the LPTIM3 are the kernel clock selected by LPTIM23SEL and provided to clk_lpt input, and the pclk4 bus interface clock.

Bit 9 LPTIM2LPEN: LPTIM2 peripheral clocks enable in low-power mode

Set and reset by software.

0: LPTIM2 peripheral clocks disabled in low-power mode

1: LPTIM2 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the LPTIM2 are the kernel clock selected by LPTIM23SEL and provided to clk_lpt input, and the pclk4 bus interface clock.

Bits 8:6 Reserved, must be kept at reset value.

Bit 5 SPI6LPEN: SPI/I2S6 peripheral clocks enable in low-power mode

Set and reset by software.

0: SPI/I2S6 peripheral clocks disabled in low-power mode

1: SPI/I2S6 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the SPI/I2S6 are the kernel clock selected by SPI6SEL and provided to com_ck input, and the rcc_pclk4 bus interface clock.

Bit 4 Reserved, must be kept at reset value.

Bit 3 LPUART1LPEN: LPUART1 peripheral clocks enable in low-power mode

Set and reset by software.

0: LPUART1 peripheral clocks disabled in low-power mode

1: LPUART1 peripheral clocks enabled in low-power mode (default after reset)

The peripheral clocks of the LPUART1 are the kernel clock selected by LPUART1SEL and provided to UCLK input, and the rcc_pclk4 bus interface clock.

Bit 2 Reserved, must be kept at reset value.

Bit 1 SBSLPEN: SBS peripheral clock enable in low-power mode

Set and reset by software.

0: SBS peripheral clock disabled in low-power mode

1: SBS peripheral clock enabled in low-power mode (default after reset)

Bit 0 Reserved, must be kept at reset value.

7.8.64 RCC APB5 low-power clock enable register (RCC_APB5LPENR)

Address offset: 0x180

Reset value: 0x0000 0016

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMLPENRes.DCMIPPLPENLTDCLPENRes.
rwrwrw

Bits 31:5 Reserved, must be kept at reset value.

ST logo
ST logo

7.9 RCC register map

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x000RCC_CRRes.Res.PLL3RDYPLL3ONPLL2RDYPLL2ONPLL1RDYPLL1ONRes.Res.Res.HSECSSONHSEEXTHSEBYPHSERDYHSEONRes.Res.HSI48RDYHSI48ONRes.Res.CSIKERONCSIRDYCSIONRes.HSIDIVFHSIDIV[1:0]HSIRDYHSIKERONHSION
Reset value0000000000000000100101
0x004RCC_HSICFGRRes.Res.HSITRIM[6:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HSICAL[11:0]
Reset value100000-----------
0x008RCC_CRRCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HSI48CAL[9:0]
Reset value-----------
0x00CRCC_CSICFGRRes.Res.CSITRIM[5:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CSICAL[7:0]
Reset value100000-------
0x010RCC_CFGRMCO2SEL[2:0]MCO2PRE[3:0]MCO1SEL[2:0]MCO1PRE[3:0]Res.Res.TIMPRERes.RTCPRE[5:0]STOPKERWUCKSTOPWUCKSWS[2:0]SW[2:0]
Reset value000000000000000Res.000000000000
0x014Reserved
0x018RCC_CDCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CPRE[3:0]
Reset value0000
0x01CRCC_BMCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.BMPRE[3:0]
Reset value0000
0x020RCC_APBCFGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PPRE5[2:0]Res.PPRE4[2:0]Res.PPRE2[2:0]Res.PPRE1[2:0]PPRE1[2:0]
Reset value0000000000
0x024Reserved
0x028RCC_PLLCKSELRRes.Res.Res.Res.Res.Res.DIVM3[5:0]Res.Res.DIVM2[5:0]Res.Res.DIVM1[5:0]Res.Res.PLLSRC[1:0]
Reset value10000010000010000000

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x02CRCC_PLLCFGRRes.PLL3SENPLL3RENPLL3QENPLL3PENPLL3RGE[1:0]PLL3SSCGENPLL3VCOSELPLL3FRACENRes.Res.PLL2TENPLL2SENPLL2RENPLL2QENPLL2PENPLL2RGE[1:0]PLL2SSCGENPLL2VCOSELPLL2FRACLENRes.Res.Res.PLL1SENRes.PLL1QENPLL1PENPLL1RGE[1:0]PLL1SSCGENPLL1VCOSELPLL1FRACEN
Reset value0000000000000000000000000000000
0x030RCC_PLL1DIVR1Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVQ[6:0]DIVP[6:0]DIVN[8:0]
Reset value00000001000000101000000
0x034RCC_PLL1FRACRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FRACN[12:0]Res.Res.Res.
Reset value0000000000000
0x038RCC_PLL2DIVR1Res.DIVR[6:0]Res.Res.DIVQ[6:0]DIVP[6:0]DIVN[8:0]
Reset value000000100000001000000101000000
0x03CRCC_PLL2FRACRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FRACN[12:0]Res.Res.Res.
Reset value0000000000000
0x040RCC_PLL3DIVR1Res.DIVR[6:0]Res.Res.DIVQ[6:0]DIVP[6:0]DIVN[8:0]
Reset value000000100000001000000101000000
0x044RCC_PLL3FRACRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FRACN[12:0]Res.Res.Res.
Reset value0000000000000
0x048Reserved
0x04CRCC_CCIPR1Res.Res.CKPERSEL[1:0]PSSISELADCSEL[1:0]Res.ADF1SEL[2:0]Res.ETH1PHYCKSELETH1REFCKSEL[1:0]OTGFSSEL[1:0]USBPHYCSEL[1:0]USBREFCKSEL[3:0]XSPI2SEL[1:0]XSPI1SEL[1:0]Res.SDMMC12SELFMCSEL[1:0]
Reset value0000000000000000010100000000
0x050RCC_CCIPR2Res.Res.CECSEL[1:0]Res.Res.SPDIFRXSEL[1:0]FDCANSEL[1:0]Res.Res.Res.LPTIM1SEL[2:0]Res.Res.I2C1_I3C1SEL[1:0]Res.Res.I2C23SEL[1:0]Res.SPI23SEL[2:0]Res.UART234578SEL[2:0]
Reset value0000000000000000000
ST logo
ST logo

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x054RCC_CCIPR3Res.Res.Res.Res.Res.Res.Res.Res.Res.SAI2SEL[2:0]Res.SAI1SEL[2:0]Res.Res.Res.Res.Res.SPI1SEL[2:0]Res.SPI45SEL[2:0]Res.USART1SEL[2:0]
Reset value000000000000000
0x058RCC_CCIPR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LPTIM45SEL[2:0]Res.LPTIM23SEL[2:0]Res.SPI6SEL[2:0]Res.LPUART1SEL[2:0]
Reset value000000000000
0x05CReserved
0x060RCC_CIERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LSECSSIEPLL3RDYIEPLL2RDYIEPLL1RDYIEHSI48RDYIECSIRDYIEHSERDYIEHSIRDYIELSERDYIELSIRDYIE
Reset value0000000000
0x064RCC_CIFRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HSECSSFLSECSSFPLL3RDYFPLL2RDYFPLL1RDYFHSI48RDYFCSIRDYFHSERDYFHSIRDYFLSERDYFLSIRDYF
Reset value0000000000
0x068RCC_CICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.HSECSSCLSECSSCPLL3RDYCPLL2RDYCPLL1RDYCHSI48RDYCCSIRDYCHSERDYCHSIRDYCLSERDYCLSIRDYC
Reset value0000000000
0x06CReserved
0x070RCC_BDCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VSWRSTRTCCENRes.Res.Res.Res.Res.RTCSEL[1:0]LSEEXTLSECSSDLSECSSONLSEDRV[1:0]LSEBYPLSERDYLSEON
Reset value000000010000
0x074RCC_CSRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LSIRDYLSERDYLSION
Reset value0000
0x078Reserved

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x07CRCC_AHB5RSTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPU2DRSTGFXMMURSTRes.Res.Res.Res.XSPIMRSTRes.XSPI2RSTRes.Res.Res.SDMMC1RSTRes.Res.XSPI1RSTFMCRSTJPEGRSTRes.DMA2DRSTHPDMA1RST
Reset value0000000000
0x080RCC_AHB1RSTRADF1RSTRes.Res.Res.OTGFSRSTUSBPHYCRSTOTGHSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.ETH1RSTRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12RSTGPDMA1RSTRes.Res.Res.Res.
Reset value0000000
0x084RCC_AHB2RSTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CORDICRSTRes.Res.Res.Res.SDMMC2RSTRes.Res.Res.Res.Res.Res.Res.PSSIRSTRes.
Reset value000
0x088RCC_AHB4RSTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CRCRSTRes.Res.Res.GPIOPRSTGPIOORSTGPIONRSTGPIOMRSTRes.Res.Res.Res.GPIOHRSTGPIOGRSTGPIOFRSTGPIOERSTGPIODRSTGPIOCRSTGPIOBRSTGPIOARST
Reset value0000000000000
0x08CRCC_APB5RSTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMRSTRes.DCMIPPRSLTDCRSTRes.
Reset value000
0x090RCC_APB1RSTR1UART8RSTUART7RSTRes.Res.CECRSTRes.Res.Res.I2C3RSTI2C2RSTI2C1_I3C1RSTUART5RSTUART4RSTUSART3RSTUSART2RSTSPDIFRXRSTSPI3RSTSPI2RSTRes.Res.Res.Res.LPTIM1RSTTIM14RSTTIM13RSTTIM12RSTTIM7RSTTIM6RSTTIM5RSTTIM4RSTTIM3RSTTIM2RST
Reset value00000000000000000000000
0x094RCC_APB1RSTR2Res.Res.Res.Res.UCPD1RSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FDCANRSTRes.Res.MDIOSRSTRes.Res.Res.CRSRSTRes.
Reset value0000
Table 73. RCC register map and reset values
OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x098RCC_APB2RSTRRes.Res.Res.Res.Res.Res.Res.Res.SAI2RSTSAI1RSTRes.SPI5RSTTIM9RSTTIM17RSTTIM16RSTTIM15RSTRes.Res.Res.SPI4RSTSPI1RSTRes.Res.Res.Res.Res.Res.USART1RSTRes.Res.Res.TIM1RST
Reset value00000000000
0x09CRCC_APB4RSTRRes.Res.Res.Res.Res.DTSRSTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.VREFRSTRes.Res.LPTIM5RSTLPTIM4RSTLPTIM3RSTLPTIM2RSTRes.Res.Res.SPI6RSTRes.LPUART1RSTRes.SBSRSTRes.
Reset value000000000
0x0A0Reserved
0x0A4RCC_AHB3RSTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PKARSTReservedSAESRSTReservedCRYPRSTHASHRSTRNGRST
Reset value00000
0x0A8
-
0x0AC
Reserved
0x0B0RCC_CKGDISRJTAGCKGEXTICKGRes.Res.Res.Res.Res.Res.Res.Res.Res.FLASHCKGAXISRAM1CKGAXISRAM2CKGAXISRAM3CKGAXISRAM4CKGXSPI2CKGXSPI1CKGFMCKGAHBSCKGGFXMMUMCKGLTDCCKGGFXMMUSCKGDMA2DCKGDCMIPPCKGGPU2DCLCKGGPU2DS1CKGGPU2DS0CKGCPUCKGHPDMA1CKGSDMMC1CKGAHBMCKGAXICKG
Reset value100000000000000000000000
0x0B4
-
0x0BC
Reserved
0x0C0RCC_PLL1DIVR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVS[2:0]
Reset value001001
0x0C4RCC_PLL2DIVR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVT[2:0]Res.Res.Res.Res.Res.DIVS[2:0]
Reset value001001
0x0C8RCC_PLL3DIVR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIVS[2:0]
Reset value001001

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x0CCRCC_PLL1SSCGRRes.INCSTEP[14:0]SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
Reset value0000000000000000000000000000000
0x0D0RCC_PLL2SSCGRRes.INCSTEP[14:0]SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
Reset value0000000000000000000000000000000
0x0D4RCC_PLL3SSCGRRes.INCSTEP[14:0]SPREADSELRPDFNDISTPDFNDISMODPER[12:0]
Reset value0000000000000000000000000000000
0x0D8 - 0x0FCReserved
0x100RCC_CKPROTRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FMCSWP[2:0]Res.Res.XSPI2SWP[2:0]Res.Res.XSPI1SWP[2:0]Res.FMCCKPXSPICKP
Reset value00000000000
0x104 - 0x12CReserved
0x130RCC_RSRRes.LPWRRSTFRes.WWDGRSTFRes.IWDGRSTFRes.SFTRSTFPORRSTFPINRSTFBORRSTFRes.Res.Res.OBLRSTFRMVFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000011100
0x134RCC_AHB5ENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPU2DENGFXMMUENRes.Res.Res.Res.Res.XSPIMENRes.XSPI2ENRes.Res.Res.SDMMC1ENRes.Res.XSPI1ENFMCENJPEGENRes.DMA2DENHPDMA1EN
Reset value0000000000
ST logo
ST logo
Table 73. RCC register map and reset values
OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x138RCC_AHB1ENRADF1ENRes.Res.Res.OTGFSENUSBPHYCENOTGHSENRes.Res.Res.Res.Res.Res.Res.ETH1RXENETH1TXENETH1MACENRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12ENGPDMA1ENRes.Res.Res.Res.
Reset value000000000
0x13CRCC_AHB2ENRRes.SRAM2ENSRAM1ENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CORDICENRes.Res.Res.Res.SDMMC2ENRes.Res.Res.Res.Res.Res.Res.PSSI割ENRes.
Reset value00000
0x140RCC_AHB4ENRRes.Res.Res.BKPRAMENRes.Res.Res.Res.Res.Res.Res.Res.CRCENRes.Res.Res.GPIOPENGPIOOENGPIONENGPIOMENRes.Res.Res.GPIOHENGPIOGENGPIOFENGPIOEENGPIODENGPIOCENGPIOBENGPIOAEN
Reset value00000000000000
0x144RCC_APB5ENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMENRes.DCMIPPENLTDCENRes.Res.
Reset value000
0x148RCC_APB1ENR1UART8ENUART7ENRes.Res.CECENRes.Res.Res.I2C3ENI2C2ENI2C1_I3C1ENUART5ENUART4ENUSART3ENUSART2ENSPDIFRXENSPI3ENSPI2ENRes.WWDGENRes.Res.Res.LPTIM1ENTIM14ENTIM13ENTIM12ENTIM7ENTIM6ENTIM5ENTIM4ENTIM3ENTIM2EN
Reset value000000000000000000000000
0x14CRCC_APB1ENR2Res.Res.Res.Res.UCPD1ENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.FDCANENRes.Res.MDIOSENRes.Res.Res.CRSENRes.
Reset value0000
0x150RCC_APB2ENRRes.Res.Res.Res.Res.Res.Res.Res.SAI2ENSAI1ENRes.SPI5ENTIM9ENTIM17ENTIM16ENTIM15ENRes.Res.Res.SPI4ENSPI1ENRes.Res.Res.Res.Res.Res.USART1ENRes.Res.Res.TIM1EN
Reset value00000000000
0x154RCC_APB4ENRRes.Res.Res.Res.DTSENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RTCAPBENVREFENRes.LPTIM5ENLPTIM4ENLPTIM3ENLPTIM2ENRes.Res.Res.SPI6ENRes.LPUART1ENRes.SBSENRes.
Reset value0100000000

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x158RCC_AHB3ENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PKAENRes.SAESENRes.CRYPENHASHENRNGEN
Reset value00000
0x15CRCC_AHB5LPENRAXISRAMLPENITCMLPENDTCM2LPENDTCM1LPENRes.Res.Res.Res.Res.Res.Res.GPU2DLPENGFXMMULPENRes.Res.Res.Res.XSPIMLPENRes.XSPI2LPENRes.Res.Res.SDMMC1LPENRes.Res.XSPI1LPENFMCLPENJPEGLPENFLASHLPENDMA2DLPENHPDMA1LPEN
Reset value111111111111111
0x160RCC_AHB1LPENRADF1LPENRes.Res.Res.OTGFSLPENUSBPHYCLPENOTGHSLPENUCPDCTRLRes.Res.Res.Res.Res.Res.ETH1RXLPENETH1TXLPENETH1MACLPENRes.Res.Res.Res.Res.Res.Res.Res.Res.ADC12LPENGPDMA1LPENRes.Res.Res.Res.
Reset value1111011111
0x164RCC_AHB2LPENRRes.SRAM2LPENSRAM1LPENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CORDICLPENRes.Res.Res.Res.SDMMC2LPENRes.Res.Res.Res.Res.Res.Res.PSSILPENRes.
Reset value11111
0x168RCC_AHB4LPENRRes.Res.Res.BKPRAMLPENRes.Res.Res.Res.Res.Res.Res.Res.CRCLPENRes.Res.Res.GPIOPLPENGPIOOLPENGPIONLPENGPIOMLPENRes.Res.Res.Res.GPIOHLPENGPIOGLPENGPIOFLPENGPIOELPENGPIODLPENGPIOCLPENGPIOBLPENGPIOALPEN
Reset value11111111111111
0x16CRCC_AHB3LPENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PKALPENRes.SAESLPENRes.CRYPLPENHASHLPENRNGLPEN
Reset value11111
0x170RCC_APB1LPENR1UART8LPENUART7LPENRes.Res.CECLPENRes.Res.Res.I2C3LPENI2C2LPENI2C1_I3C1LPENUART5LPENUART4LPENUSART3LPENUSART2LPENSPDIFRXLPENSPI3LPENSPI2LPENRes.Res.WWDGLPENRes.LPTIM1LPENTIM14LPENTIM13LPENTIM12LPENTIM7LPENTIM6LPENTIM5LPENTIM4LPENTIM3LPENTIM2LPEN
Reset value111111111111111111111111

Table 73. RCC register map and reset values

OffsetRegister Name313029282726252423222120191817161514131211109876543210
0x174RCC_APB1LPENR2Res.Res.Res.Res.UCPD1LPENRes.Res.Res.FDCANLPENRes.Res.Res.MDIOSLPENRes.Res.CRSLPENRes.
Reset value1111
0x178RCC_APB2LPENRRes.Res.Res.Res.Res.Res.Res.Res.SAI2LPENSAI1LPENRes.SPI5LPENTIM9LPENTIM17LPENTIM16LPENTIM15LPENRes.Res.SPI4LPENSPI1LPENRes.Res.Res.Res.Res.Res.Res.USART1LPENRes.Res.Res.TIM1LPEN
Reset value11111111111
0x17CRCC_APB4LPENRRes.Res.Res.Res.Res.DTSLPENRes.Res.Res.Res.Res.Res.Res.Res.Res.RTCAPBLPENVREFLPENRes.Res.LPTIM5LPENLPTIM4LPENLPTIM3LPENLPTIM2LPENRes.Res.Res.SPI6LPENRes.LPUART1LPENRes.SBSLPENRes.
Reset value1111111111
0x180RCC_APB5LPENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GFXTIMLPENRes.DCMIPLPENLTDCLPENRes.
Reset value111
0x184 - 0x19CReserved
0x1A4 - 0x1FCReserved
0x200RCC_TESTCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DFTREGEN
Reset value0

Refer to Section 2.3 on page 150 for the register boundary addresses.