6. Reset and clock controller (RCC)
The RCC block manages the clock and reset generation for all the STM32WL30xx/31xx/33xx device peripherals.
Note: Comparator, DAC, I2C2, LCSC, LCD, LPAWUR are available only on STM32WL33xx devices.
ADC, temperature sensor, I2C1, SPI1, I2S are available only on STM32WL31xx/33xx devices.
Any reference to these IPs on RCC chapter is valid within this perimeter.
6.1 Reset management
6.1.1 General description
Figure 12 shows the general principle of reset generation.
Figure 12. Reset generation

The diagram illustrates the reset generation logic, divided into three main regions: 'Inside the SoC', 'RCC' (Reset and Clock Controller), and 'NRSTn pad circuitry'.
- Inside the SoC: Contains the reset sources: PORESETn, POR/BOR reset, WDOG reset, CPU LOCKUP reset, and CPU SYSRESETREQ reset.
- RCC (Reset and Clock Controller):
- The PORESETn signal is inverted by a buffer.
- The inverted PORESETn and the other four reset signals (POR/BOR, WDOG, CPU LOCKUP, CPU SYSRESETREQ) are inputs to a large OR gate.
- The output of the OR gate is connected to a 'Pulse Generator' block, which produces a pulse with a duration of 20us to 80us.
- The output of the Pulse Generator is connected to the 'NRSTn pad circuitry'.
- The output of the NRSTn pad circuitry is connected to the 'External NRSTn PAD'.
- NRSTn pad circuitry:
- Contains a 'Spikes Filter' block.
- The output of the Spikes Filter is connected to the 'External NRSTn PAD'.
- The 'External NRSTn PAD' is connected to VDD and GND through a pull-up resistor and an open-drain transistor, respectively.
Note: The system reset information is output on the NRSTn pad to inform the external world and reset other elements on the board if needed.
Two different resets are available in the design:
- • PORESETn: this reset is provided by the APMU analog block and corresponds to a POR or BOR root cause. It is linked to power voltage ramp-up or ramp-down.
The PORESETn reset impacts all the resources of the device.
Note: A Shutdown exits is equivalent to a POR/BOR situation and generates a PORESETn.
- • PADRESETn (also termed system reset): this reset is built through several sources:
- – PORESETn,
- – the watchdog reset,
- – the CPU LOCKUP reset,
- – the CPU software system reset,
- – the NRSTn external pad.
Note: The system reset is called PADRESETn as when an internal reset source is activated (watchdog, software, and so on), the NRSTn pad toggles to inform the external world a reset occurs.
This system reset resets all the resources of the device except:
- – Debug features (SWD, test registers...)
- – flash controller key management part
- – RTC timer
- – power controller (PWR)
- – part of the RCC registers
The pulse generator guarantees a minimum reset pulse duration of 20 µs for each internal reset source. In case of reset from the NRSTn external pad, the reset pulse is generated when the pad is asserted low.
6.1.2 Power reset
The PORESETn signal is active when the power supply of the device is below a threshold value or when the regulator does not provide the target voltage.
The PORESETn resets all the resources of the device
6.1.3 Watchdog reset
STM32WL30xx/31xx/33xx devices embed a watchdog timer which may be used to recover from software crashes.
See Section 23: Independent watchdog (IWDG) for details about watchdog usage and programming.
6.1.4 LOCKUP reset
The Cortex-M0+ generates a LOCKUP to indicate the core is in the lock-up state resulting from an unrecoverable exception.
The LOCKUP reset is masked if a debugger is connected to the Cortex-M0+. The user can use the SWD to reset or recover the code in this case.
6.1.5 System reset request
The system reset request is generated by the debug circuitry of the Cortex-M0+. The debugger sets the SYSRESETREQ bit of the Application Interrupt and Reset control Register (AIRCR). This system reset request through the AIRCR can also be done by the embedded software (in hard fault handler for instance).
For more details on the Cortex-M0+ system control and ID registers, refer to section B3.2.2 of the ARMv6-M Architecture Reference Manual.
6.1.6 Deepstop exit
The low power DEEPSTOP state leads to switch off a part of the 1.2 V (power domain called VDD12i), while keeping the rest of the 1.2 V at 1 V (power domain called VDD12o) and the 3.3 V (VDDIO).
When the device exits the Deepstop mode, only the VDD12i power domain is reset as it is the only power domain that lost the power supply.
6.2 Clock management
Three different clock sources may be used to drive the system clock (CLK_SYS) in the STM32WL30xx/31xx/33xx:
- • HSI: high speed internal 64 MHz RC oscillator (provided by the RC64MPLL analog block),
- • PLL: PLL clock (provided by the RC64MPLL analog block) equal to HSE x 4/3.
- • HSE (High Speed External):
- – high speed 48 MHz or 50 MHz external crystal.
- – or provided by a single ended 48 MHz or 50 MHz input instead of a crystal.
STM32WL30xx/31xx/33xx devices also have a slow frequency clock tree used by some peripherals (RTC, watchdog, LPUART, LCDC, LPAWUR, LCSC and MR_SUBG radio timer). Three different clock sources can be used for this slow clock tree:
- • LSI: low speed low drift internal RC with a fixed frequency between 24 kHz and 49 kHz depending on the sample. It is called 32 kHz clock inside this document to simplify.
- • LSE:
- – 32.768 kHz low speed external crystal.
- – or provided by a single-ended 32.768 kHz input instead of a crystal.
- • The CLK_ROOT_DIV divided by 512. In this case, the slow clock is not available in Deepstop low power mode and it has not be used for peripherals working in Deepstop low power mode.
The Figure 13 provides an overview of the fast clock tree in STM32WL30xx/31xx/33xx devices.
Figure 13. System clock details

The diagram illustrates the system clock architecture. Clock sources include LSI RC0 (32 kHz), LSE OSC (32 kHz), HSE OSC (48 MHz or 50 MHz), and RC64MPLL (HSI 64 MHz + PLL x 4/3). Signals are routed through multiplexers (LCOSEL, HSESEL, SYSCLKDIV, SPI3I2CCLKSEL, LPUCLKSEL, KRMEN, SMPSDIV, MCOSEL) and prescalers/dividers to feed clock domains including CLK_RTC, CLK_WDG, CLK_MRSUBG_WKUP, CLK_LPAWUR_WKUP, CLK_LCD, CLK_LCSC, CLK_TIM2, CLKTIM16, CLKSYS (CPU, AHB0, APB0, APB2, SRAM, AES), CLK_SPI3 / I2S, CLK_LPUART, CLK_SMPS, CLK_USART, CLK_I2C, CLK_FLASH, CLK_PWR, CLK_RNG, CLK_MR_SUBGHz, CLK_LPAWUR, CLKANA_ADC, CLKDIG_ADC, and MCO.
- Note:
- 1 Comparator, DAC, I2C2, LCSC, LCD, LPAWUR are available only on STM32WL33xx device.
- 2 ADC, temperature sensor, I2C1, SPI1, I2S are available only on STM32WL31xx/33xx devices.
The HSI and the PLL clocks are provided by the same analog block called RC64MPLL. The output of this block can be:
- – a non accurate clock (target is 1% typical) when no external XO provides an input clock to this block,
- – an accurate clock when the external XO provides the 48 MHz or 50 MHz and once its internal PLL is locked.
Note: The usage of PLL or HSE as clock source is mandatory for SUBGHz radio operations (need of a high accuracy on the clock).
The software process to switch the system on the accurate clock is indicated in Section 6.8: Programmer's model.
This fast clock source is used to generate all the fast clock of the device through dividers as shown in the Figure 13.
After reset, the CLK_SYS is divided by four to provide a 16 MHz to the whole system (CPU, DMA, memories and peripherals).
Then the software can program another system clock frequency in the following using CLKSYS DIV bits (see Clock configuration register (RCC_CFGR)):
- – 110 (forbidden when radio or ADC is in use)
- – 101 (forbidden when radio or ADC is in use)
- – 100 (forbidden when radio or ADC is in use)
- – 011 (forbidden when radio is in use)
- – 010
- – 001
- – 000
Note: Forbidden configuration means that the “in use” feature cannot work if the system clock runs at this frequency.
Note: Special care must be taken when programming the CLK_SYS as some constraints need to be respected:
CLK_SYS frequency must be an integer multiple of 16 MHz greater or equal than CLK_MR_SUBGHz, CLK_LPAWUR.
6.2.1 Peripheral clock details
This fast clock source is also used to generate several internal fast clocks in the system:
- • A TIM2/TIM16 kernel clock that is the maximum reachable frequency of the system (output of RCPLL when HSESEL=0 or HSE when HSESEL=1).
- • A fixed clock frequency CLK_ROOT_DIV requested by few peripherals like serial interfaces (to maintain fixed baud rate while system clock is switching from a frequency to another) or like flash controller, ADC (STM32WL31xx/33xx only), LPAWUR(STM32W33xx only), and MR_SUBG radio IP (to have a fixed reference clock to manage delays).
Most of the peripherals use only the system clock (CLK_SYS) except:
- • I2C (STM32WL31xx/33xx only),USART:
- – In parallel of the system clock, they use a fixed frequency clock (CLK_ROOT_DIV) to have a fixed reference clock for baud rate management. The goal is to allow the CPU to boost or slow down the system clock (depending on on-going activities) without impacting a potential on-going serial interface transfer on external I/Os.
- • LPUART:
- – In parallel of the system clock, it uses a fixed frequency clock (CLK_ROOT_DIV) to have a fixed reference clock for baud rate management and LSE clock when active in Deepstop. The goal is to allow the CPU to boost or slow down the system
clock (depending on on-going activities) without impacting a potential on-going serial interface transfer on external I/Os.
- • SPI:
- – When using the I2S mode (STM32WL31xx/33xx only), the baud rate is managed through CLK_ROOT/2 clock, CLK_ROOT_DIV clock or system clock (SYS_CLK).
Note: The CPU/system clock frequency must be equal or slower than the I2S clock frequency.
- – When running in other modes than the I2S, the baud rate is managed by the system clock. This implies the baud rate is impacted by dynamic system clock frequency changes.
- • RNG:
- – In parallel of the system clock, the RNG uses a fixed frequency clock (CLK_ROOT_DIV) to generate at a constant frequency the random number whatever the system clock frequency.
- • Flash controller:
- – In parallel of the system clock, the flash controller uses a fixed frequency clock (CLK_ROOT_DIV) to generate specific delays required by the flash memory during programming and erase operation for instance.
- • Radio IP (MR_SUBG, and LPAWUR (STM32W33xx only))
- – the radio IPs does not use directly the system clock for their APB / AHB interfaces but the system clock with a potential divider (1 or 2 or 4). Table 16 shows the supported configurations.
- – In parallel of the CLK_MR_SUBGHz, the MR_SUBG uses a fixed frequency clock (CLK_ROOT_DIV) for modulator, demodulator and to have a fixed reference clock to manage specific delays.
Table 16. System clock versus Radio IPs clock dependency
| CLKSYSDIV bits | CLK_MR_SUBGHz |
|---|---|
| 110 / 101 / 100 / 011 | Not possible to use radio IPs |
| 010 | CLK_ROOT_DIV |
| 001 | CLK_ROOT_DIV |
| 000 | CLK_ROOT_DIV |
- • ADC (STM32WL31xx/33xx only):
- – In parallel of the system clock, the ADC uses a fixed clock frequency (called CLKANA_ADC, CLKDIG_ADC) see Figure 13: System clock details.
Note: When the ADC is used, the system clock must run at minimum 8 MHz to be able to read the ADC sample before they are overloaded by a new sample.
Note: To avoid SNR degradation of the ADC, SMPS and ADC clocks must be synchronous.
6.2.1.1 Sleep mode management
Sleep mode management enables the capability to clock gate each peripherals bus clock independently during CPU sleeping mode (WFI).
Peripheral Sleep mode is configured, before WFI, thanks to three dedicated RCC registers (peripherals are split between AHB, APB0, APB1 clock domains):
- • AHB Sleep Mode Enable register (see AHB sleep mode enable register (RCC_AHBSMENR))
- • APB0 Sleep Mode Enable register (see APB0 sleep mode enable register (RCC_APB0SMENR))
- • APB1 Sleep Mode Enable register (see APB1 sleep mode enable register (RCC_APB1SMENR))
APB2 clock domain are not impacted by this feature.
Note: Some restrictions can be applied depending of each register fields, and further power consumption reduction is expected when all APB1 peripherals are in SLEEP mode.
Note: FLASH SLEEP mode is enabled only when both RCC and flash controller are configured correctly.
6.2.2 Slow clock frequency details
As explained at the beginning of the clock management sub-chapter, three different clock sources can be used for this slow clock tree:
- • LSI: low speed low drift internal RC with a fixed frequency between 24 kHz and 49 kHz depending on the sample. It is called 32 kHz clock inside this document to simplify.
- • LSE: 32.768 kHz low speed external crystal (or single-ended input frequency).
Note: If the external oscillator is used, the PB12/PB13 I/Os are automatically connected to this feature when RCC_CR.LSEON bit is set (GPIO_MODERX configuration is overloaded).
Caution: If APC bit is set, the user has to disable by software the PUB12/PUB13/PDB12/PDB13 bits on PB12/PB13 I/O Port B pull-up control register (PWR_PUCRB) and I/O Port B pull-down control register (PWR_PDCRB) to have the feature working fine. Otherwise if APC is reset, the pull-up, pull-down of PB12/13 are automatically configured.
- • An always 32 kHz clock equal to CLK_16MHz divided by 512 (see Figure 13). In this case, the slow clock is not available in Deepstop low power mode.
Only one source at a time drives the whole low speed clock tree.
Note: By default after a PORESETn, all low speed sources are OFF. After a PADRESETn, the slow clock configuration is the one programmed before the PADRESETn.
The slow clock activation and selection stays relevant during the Deepstop low power mode and at wakeup as it clocks the timers involved in wakeup events generation.
Note: If LSI configuration is used, the software must measure the slow clock frequency to know the associated period that is used by the timers. A slow clock measurement feature is available in the MR_SUBG IP.
6.3 System frequency switch while MR_SUBG is used
When the radio is used on the device, the system clock frequency selection must respect some rules:
- • The system clock frequency must be an integer multiple of 16 MHz equal or greater than the MR_SUBG frequency. Other options make the radio non functional.
- • Changing the frequency of the system must be done through the RCC_CSCMDR register mechanism to avoid any risk to crash the radio scenarios.
This proper system frequency switch is managed through the collaboration of several blocks:
- – the RCC (see Clock switch command register (RCC_CSCMDR))
- – the AHBUPCONV and the AHBDOWNCONV blocks (see Section 3: AHB up/down converter)
Using this safe mechanism, the software requests a system clock frequency change and is informed by the hardware when the new frequency is really in place through a status bit (see Clock switch command register (RCC_CSCMDR)) and an associated interrupt line on the CPU (see Section 2.3.2: Interrupts).
The software sequence is described in the Section 6.8.3: Changing the system clock frequency while the MR_SUBGHz is enabled sub-chapter.
6.4 Clock observation on external pad
It is possible to output some internal clocks on external pads:
- • the low speed clocks can be output on the LCO I/O,
- • the high speed clocks can be output on the MCO I/O.
This is possible by programming the associated I/O in the good alternate function (see Table 8: GPIO alternate options AF0 - AF3).
The selection of the clock to output for each I/O is programmable through a RCC register (see Section 6.6.2: Clock configuration register (RCC_CFGR) for more details).
The Figure 14 shows the possible configurations to output an internal clock.
Figure 14. LCO / MCO output clocks
![Figure 14: LCO / MCO output clocks diagram illustrating the multiplexing of LSI and LSE to LCO via RCC_CFGR.LCOSEL[1:0], and the multiplexing of CLKANA_ADC, CLK_SMPS, CLK_SYS, HSE, HSI, and CLK_ROOT_DIV/512 to MCO via RCC_CFGR.MCOSEL[2:0] and a prescaler (/1, /2, /4, /8, /16, /32) controlled by RCC_CFGR.CCOPRE[2:0].](/RM0511-STM32WL30-31-33/cc7baa8e5118f4b42c01166637c738ea_img.jpg)
1. ADC is available only on
STM32WL31xx/33xx devices.
MSv58349V1
6.5 IO booster
Some analog switches are used to select the analog VINM/P pair input signals to be used by the ADC(a) or the COMP(b) or the DAC(b).
An IO booster block has been added to boost the voltage on the command of those analog switches when the VBAT goes below a threshold (2.7V) to guarantee the good behavior of those switches. This block has to be enabled by the software when needed through RCC_CFGR.IOBOOSTEN bit.
- a. ADC is available only on STM32WL31xx/33xx devices.
b. Comparator and DAC are available only on STM32WL33xx devices.
6.6 RCC register descriptions
6.6.1 Clock source control register (RCC_CR)
This register controls the enable on the different clock sources (low and high speed).
- Note:
- The control bits linked to high speed clock source are reset on PADRESETn. The control bits linked to slow speed clock source are reset on PORESETn only (identified by the table footnote). As this register is in VDD12o power domain, its content is not modified after a wakeup from Deepstop and system clock is restored with configuration present before Deepstop mode entry.
- Comparator, DAC, I2C2, LCSC, LCD, LPAWUR are available only on STM32WL33xx devices.
ADC, temperature sensor, I2C1, SPI1, I2S are available only on STM32WL31xx/33xx devices.
Any reference to these IPs on RCC registers is valid within this perimeter.
Address offset: 0x00
Reset value: 0x0000 1400
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | HSERDY | HSEON |
| r | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| FMRAT | HSIPLL RDY | HSIPLL ON | HSEPL LBUFO N | Res. | HSIRD Y | LOCKDET_NSTOP[2:0] | LSEBY P | LSERD Y | LSEON | LSIRD Y | LSION | Res. | Res. | ||
| rw | r | rw | rw | r | rw | rw | rw | rw | r | rw | r | rw | |||
Bits 31:18 Reserved, must be kept at reset value.
Bit 17 HSERDY: External High Speed clock flag.
This bit is set by hardware to indicate that HSE oscillator (48 MHz or 50 MHz XO) is stable.
- – 0: HSE oscillator is not ready.
- – 1: HSE oscillator is ready.
Bit 16 HSEON: External High Speed clock enable.
The software has to set the bit to start the XO 48 MHz or 50 MHz and clear the bit to stop it.
- – 0: HSE oscillator is OFF.
- – 1: HSE oscillator is ON.
Bit 15 FMRAT: FMRAT: MRSUBG timer bit interpolation clock.
- – 0: MRSUBG timer bit interpolation uses precise HSE clock
- – 1: MRSUBG timer bit interpolation uses HSI clock
Note: the clock tree must be on the HSE / HSIPLL clock tree when the radio is used
Bit 14 HSIPLLRDY: Internal High Speed clock PLL flag.
This bit is set by hardware to indicate that the RC64MPLL PLL is locked.
- – 0: RC64MPLL PLL is unlocked.
- – 1: RC64MPLL PLL is locked.
- Bit 13 HSIPLLON: Internal High Speed clock PLL enable.
The software has to set the bit to request a RC64MPLL lock on HSE and clear the bit to stop it.
– 0: RC64MPLL PLL is OFF.
– 1: RC64MPLL PLL is ON. - Bit 12 HSEPLLBUFON: External high speed clock buffer for PLL RF enable.
The software has to set the bit when the radio is used (to have the RF PLL working).
– 0: HSE pll RF buffer is OFF.
– 1: HSE pll RF buffer is ON.
Warning: this bit must be set when the radio is used. The only reason to clear this bit would be to reduce power consumption in case the radio is not used on this device. - Bit 11 Reserved, must be kept at reset value.
- Bit 10 HSIRDY: Internal High Speed clock flag.
This bit is set by hardware to indicate that internal 64 MHz RC is stable.
This bit is activated only if the RC is enabled by HSION (it is not activated if the RC is enabled by an IP request).
– 0: internal 64 MHz RC is not ready.
– 1: internal 64 MHz RC is ready. - Bits 9:7 LOCKDET_NSTOP: define a time window target for the counter of the lock detector block in charge to manage the HSIPLLRDY information (PLL indicated as locked if the analog lock signal stays high and stable during this time window).
The formula to define the time window target is the following:\[\text{time window target} = (\text{LOCKDET\_NSTOP} + 1) \times 64.\] - Bit 6(1) (2) LSEBYP: External Low Speed clock bypass.
This bit needs to be set when the slow clock is directly provided through SXTAL pin.
– 0: No LSE oscillator bypass.
– 1: LSE oscillator bypass is enabled.
Note: when this bit is set, ensure GPIOB_MODER[27:26] is not programmed as “11” and, if APC=1, PWR_PUCRB[13] and PWR_PDCRB[13] are not set. - Bit 5(1) LSERDY: External Low Speed clock flag.
This bit is set by hardware to indicate that the slow clock has started.
– 0: LSE oscillator is not ready.
– 1: LSE oscillator is ready.
Note: this status bit is true whatever the chosen configuration (external 32 kHz oscillator == LSEON or external clock provided on SXTAL = LSEBYP). - Bit 4(1) (2) LSEON: External Low Speed clock enable.
The software has to set the bit to start the XO 32 kHz and clear the bit to stop it.
– 0: LSE oscillator is OFF.
– 1: LSE oscillator is ON.
Bit 3(1) LSIRDY: Internal Low Speed clock flag.
This bit is set by hardware to indicate that internal low speed RC is stable.
- – 0: internal low speed RC is not ready.
- – 1: internal low speed RC is ready.
Bit 2(1) LSION: Internal low speed RC clock enable.
The software has to set the bit to start the internal slow clock RO and clear the bit to stop it.
- – 0: LSI RC is OFF.
- – 1: LSI RC is ON.
Bits 1:0 Reserved, must be kept at reset value.
- 1. This bit is reset on PORESETn only.
- 2. The LSEBYP and LSEON bits must not be used at the same time. If the user decides to dynamically change the slow clock source between external XO and clock injection on SXTALI, he has to ensure both LSEON and LSEBYP are low at a time to reset the LSERDY flag.
6.6.2 Clock configuration register (RCC_CFGR)
Note: The control bits linked to high speed clock source are reset on PADRESETn. The control bits linked to slow speed clock source are reset on PORESETn only (identified by the table footnote).
Address offset: 0x08
Reset value: 0x0000 0240
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CCOPRE[2:0] | MCOSEL[2:0] | LCOSEL[1:0] | SPI3I2SCLKSEL[1:0] | Res. | Res. | LCOEN | Res. | IOBOOSTEN | CLKSLOWSEL[1] | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CLKSLOWSEL[0] | Res. | LPUCLKSEL | SMPSDIV | Res. | CLKSYSDIV_STATUS[1:0] | CLKSYSDIV | Res. | HSESEL_STATUS | STOPHSI | HSESEL | Res. | ||||
| rw | rw | rw | r | r | r | rw | rw | rw | r | rw | rw | ||||
Bits 31:29 CCOPRE: Configurable Clock Output Prescaler.
- – 000: CCO clock is divided by 1
- – 001: CCO clock is divided by 2
- – 010: CCO clock is divided by 4
- – 011: CCO clock is divided by 8
- – 100: CCO clock is divided by 16
- – 101: CCO clock is divided by 32
- – others: reserved
Note: Glitches propagation possible if CCOPRE[2:0] value is modified while MCO output is enabled on the IO.
Bits 28:26 MCOSEL: Main Configurable Clock Output Selection.
- – 000: MCO output disabled. No clock on MCO pad.
- – 001: system clock
- – 010: reserved
- – 011: RC64MPLL block output clock (can be internal RC 64 MHz or PLL output).
- – 100: HSE (external 48 MHz or 50 MHz oscillator)
- – 101: CLK_ROOT_DIV divided by 512 clock
- – 110: SMPS clock
- – 111: ADC clock
Note: Glitches propagation possible if MCOSEL[2:0] value is modified while MCO output is enabled on the IO.
Bits 25:24(1) LCOSEL: Low speed Configurable Clock Output Selection.
- – 00: LCO output disabled. No clock on LCO pad.
- – 01: not used
- – 10: LSI (internal slow clock RC) clock
- – 11: LSE (external 32 kHz)
Note: Glitches propagation possible if LCOSEL[1:0] value is modified while LCO output is enabled on the IO.
- Bits 23:22 SPI3I2SCLKSEL: Selection of I2S clock for SPI3 IP.
– 00: CLK_ROOT/2 clock
– 01: CLK_ROOT_DIV clock (default)
– 1x: CLK_SYS
Note: the I2S clock frequency must be higher or equal to the system clock (configured through RCC_CFGR.CLKSYSDIV[2:0] bit field). - Bits 21:20 Reserved, must be kept at reset value.
- Bits 19(1) LCOEN: LCO enable on PA10 also in Deepstop.
– 0: LCO output on PA10 is disabled
– 1: LCO output on PA10 is enabled. - Bit 18 Reserved, must be kept at reset value.
- Bit 17 IOBOOSTEN: IO BOOSTER enable (see Section 6.5: IO booster for details).
– 0: IO BOOSTER block is disabled
– 1: IO BOOSTER block is enabled. - Bits 16:15(1) CLKSLOWSEL: low speed clock source selection.
– 00: not used
– 01: LSE (external oscillator). This source can be kept during Deepstop mode.
– 10: LSI (internal RC). This source can be kept during Deepstop mode.
– 11: CLK_ROOT_DIV divided by 512
Note: No glitch mechanism has been added so glitches may appear on slow clock when the user changes its source. - Bit 14 Reserved, must be kept at reset value.
- Bit 13 LPUCLKSEL: Selection of LPUART clock
– 0: CLK_ROOT_DIV clock (default)
– 1: LSE clock - Bit 12 SMPSDIV: SMPS clock prescaling factor (when KRMEN=0)
– 0: SMPS clock is 8 MHz
– 1: SMPS clock is 4 MHz
Note: updating this field can cause issues if SMPS is running, it is recommended to first set SMPS in bypass mode (PWR_CR5[9] SMPSBYP) before updating this value - Bit 11 Reserved, must be kept at reset value.
- Bits 10:8 CLKSYSDIV_STATUS: system clock frequency status
Set and cleared by hardware to indicate the actual system clock frequency. This register must be read to be sure that the new frequency, selected by CLKSYSDIV, has been applied.
– 000: CLK_SYS is CLK_ROOT
– 001: CLK_SYS is CLK_ROOT/2
– 010: CLK_SYS is CLK_ROOT/4 (HSESEL = 0) or CLK_ROOT/3 (HSESEL = 1)
– 011: CLK_SYS is CLK_ROOT/8 (HSESEL = 0) or CLK_ROOT/6 (HSESEL = 1)
– 100: CLK_SYS is CLK_ROOT/16 (HSESEL = 0) or CLK_ROOT/12 (HSESEL = 1)
– 101: CLK_SYS is CLK_ROOT/32 (HSESEL = 0) or CLK_ROOT/24 (HSESEL = 1)
– 110: CLK_SYS is CLK_ROOT/64 (HSESEL = 0) or CLK_ROOT/48 (HSESEL = 1)
– 111: not used.
The actual clock frequency switching can be delayed of up to 128 system clock cycles, depending on the RCC internal counter status at the moment the new CLKSYSDIV is applied
Bits 7:5 CLKSYSDIV: system clock frequency selection.
The division factor depends on RCC_CFGR.HSESEL
- – 000: CLK_SYS is CLK_ROOT
- – 001: CLK_SYS is CLK_ROOT/2
- – 010: CLK_SYS is CLK_ROOT/4 (HSESEL = 0) or CLK_ROOT/3 (HSESEL = 1)
- – 011: CLK_SYS is CLK_ROOT/8 (HSESEL = 0) or CLK_ROOT/6 (HSESEL = 1) *
- – 100: CLK_SYS is CLK_ROOT/16 (HSESEL = 0) or CLK_ROOT/12 (HSESEL = 1) *
- – 101: CLK_SYS is CLK_ROOT/32 (HSESEL = 0) or CLK_ROOT/24 (HSESEL = 1) *
- – 110: CLK_SYS is CLK_ROOT/64 (HSESEL = 0) or CLK_ROOT/48 (HSESEL = 1) *
- – 111: not used.
*: If RCC_APB2ENR.MRSUBGEN bit or RCC_APB2ENR.LPAWUREN bit are set, writing in CLKSYS DIV one of above values is replaced by 010b by hardware.
Warning:
- – if the software programs the CLSYSDIV= 000 while the RCC_CFGR.HSESEL=1, the system clock source is switched to PLL by hardware (and restart PLL analog block if RCC_CFGR.STOPHSI=1)
- – To switch CLKSYS DIV between 000 / 001 / 010 without risk when either the MR_SUBG or the LPAWUR is used, prefer the RCC_CSCMDR register to change the system frequency.
- – The bus frequency of the radio IPs (MRSUBG, LPAWUR) must always be equal or less than the CPU/system clock to have functional radio and system clock must be an integer multiple of 16 MHz, this means that CLKSYS DIV=001 is forbidden when HSESEL=1.
Bit 4 Reserved, must be kept at reset value.
Bit 3 HSESEL_STATUS: Clock source selection status.
- – 0: RC64MPLL clock source is selected (default).
- – 1: Direct HSE clock source is selected.
Bit 2 STOPHSI: RC64MPLL clock source stop request
- – 0: RC64MPLL is enabled (default)
- – 1: RC64MPLL disable requested.
Note: if the CLKSYS DIV (from RCC_CFGR or RCC_CSCMDR registers) is 000 the hardware automatically restart the RC64MPLL block and switch on the RC64MPLL clock source.
Bit 1 HSESEL: Clock source selection request.
- – 0: RC64MPLL clock source is requested (default).
In this case, the fast clock tree is sourced by the RC64MPLL block. The clock can be either the HSI or the PLL if the HSI PLL is locked - – 1: Direct HSE clock source is requested.
In this case, the RC64MPLL block is not used and the maximum available frequency for the system clock tree is 48 MHz or 50 MHz.
Bit 0 Reserved, must be kept at reset value.
- 1. This bit is reset on PORESETn only.
6.6.3 Clock source software calibration register (RCC_CSSWCR)
This register allows overloading the trimming values loaded automatically by hardware with other values.
Note: The control bits linked to high speed clock source are reset on PADRESETn. The control bits linked to high speed clock source are reset on PORESETn only (identified by the table footnote).
Address offset: 0x0C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | HSITRIMSW[5:0] | HSISWTRIMEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | |||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LSEDRV[1:0] | LSISWBW[3:0] | LSISWTRIMEN | ||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
Bits 31:30 Reserved, must be kept at reset value.
Bits 29:24 HSITRIMSW: High speed clock trimming set by software.
This value is taken into account instead of the trimming value loaded by HW at reset if HSISWTRIMEN bit is set.
Note: when selected/active, this value must be modified either in JTAG mode (with CPU halted) or with CPU/system running on HSE clock tree
Bit 23 HSISWTRIMEN: High speed clock software trimming enable.
- – 0: HW trimming value is used as trimming value on RC64MPLL block.
- – 1: trimming value written in RCC_CSSWCR.HSITRIMSW[3:0] bit field is used as trimming value on RC64MPLL block.
Note: this bit must be modified either in JTAG mode (with CPU halted) or with CPU/system running on HSE clock tree
Bits 22:7 Reserved, must be kept at reset value.
Bits 6:5(1) LSEDRV: external 32 kHz crystal GM.
- – 00: low drive capability
- – 01: medium low drive capability
- – 10: medium high drive capability
- – 11: high drive capability
Bits 4:1(1) LSISWBW: Low speed internal RC trimming value set by software.
This value is taken into account instead of the trimming value loaded by HW at reset if LSISWTRIMEN bit is set.
Bit 0(1) LSISWTRIMEN: Low speed internal RC software trimming enable.
- – 0: HW trimming value is used as trimming value on the LSI.
- – 1: trimming value written in RCC_CSSWCR.LSISWBW[3:0] bit field is used as trimming value on LSI.
1. This bit is reset on PORESETn only.
6.6.4 SMPS clock variable rate multiplier register (RCC_KRMR)
This register controls the enable and variable rate multiplier for SMPS clock.
This register is reset on PORESETn.
Address offset: 0x10
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | KRM[4:0] | KRMEN | ||||
| rw | rw | rw | rw | rw | rw | ||||||||||
Bits 31:16 Reserved, must be kept at reset value.
Bits 15:1 KRM[4:0]: SMPS clock dividing Ratio (CLK_SPMS_KRM frequency= CLK_ROOT frequency (depending on RCC_CFGR.HSESEL) divided by KRM when KRMEN=1)
- - 0x00 to 0x08: SMPS clock frequency equals CLK_ROOT/8 (8.00 MHz / 6.00 MHz)
- - 0x09: SMPS clock frequency equals CLK_ROOT/9 (7.11 MHz / 5.33 MHz)
- - 0x0A: SMPS clock frequency equals CLK_ROOT/10 (6.40 MHz / 4.80 MHz)
- - 0x0B: SMPS clock frequency equals CLK_ROOT/11 (5.82 MHz / 4.36 MHz)
- - 0x0C: SMPS clock frequency equals CLK_ROOT/12 (5.33 MHz / 4.00 MHz)
- - 0x0D: SMPS clock frequency equals CLK_ROOT/13 (4.92 MHz / 3.69 MHz)
- - 0x0E: SMPS clock frequency equals CLK_ROOT/14 (4.57 MHz / 3.43 MHz)
- - 0x0F: SMPS clock frequency equals CLK_ROOT/15 (4.27 MHz / 3.20 MHz)
- - 0x10: SMPS clock frequency equals CLK_ROOT/16 (4.00 MHz / 3.00 MHz)
- - 0x1x: Reserved
Note: SMPS clock frequency must be selected in a range [4-8] MHz (depending on RCC_KRMR.KRM and RCC_CFGR.HSESEL).
Bit 0 KRMEN: Variable rate multiplier
- – 0: KRM is disabled (SMPS clock frequency depends only on RCC_CFGR.SMPSDIV)
- – 1: KRM is enabled (SMPS clock frequency depends on source clock selection RCC_CFGR.HSESEL and KRM[4:0] dividing ratio)
Note: this bit must be 0 when SMPS is in precharge mode (PWR_CR5. SMPSFBYP=1)
Note: before setting this bit ensure that PWR_SR2.SMPSRDY=1
6.6.5 Clock interrupt enable register (RCC_CIER)
This register controls the enable on interrupt sources.
This register is reset on PADRESETn.
Address offset: 0x18
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | LCSCRS TIE | Res. | Res. | LCDRS TIE | LPURS TIE | WDGR STIE | RTCRS TIE | HSIPLL UNLOC KDETI E | HSIPLL RDYIE | HSERD YIE | HSIRD YIE | Res. | LSE RD YIE | LSIRD YIE. |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:14 Reserved, must be kept at reset value.
Bit 13 LCSCRS TIE: LCSC reset release interrupt enable.
- – 0: LCSC reset release interrupt is disabled.
- – 1: LCSC reset release interrupt is enabled.
Bits 12:11 Reserved, must be kept at reset value.
Bit 10 LCDRS TIE: LCD reset release interrupt enable.
- – 0: LCD reset release interrupt is disabled.
- – 1: LCD reset release interrupt is enabled.
Bit 9 LPURSTIE: LPUART reset release interrupt enable.
- – 0: LPUART reset release interrupt is disabled.
- – 1: LPUART reset release interrupt is enabled.
Bit 8 WDGRSTIE: Watchdog reset release interrupt enable.
- – 0: Watchdog reset release interrupt is disabled.
- – 1: Watchdog reset release interrupt is enabled.
Bit 7 RTCRSTIE: RTC reset release interrupt enable.
- – 0: RTC reset release interrupt is disabled.
- – 1: RTC reset release interrupt is enabled.
Bit 6 HSIPLLUNLOCKDETIE: HSI PLL unlock detection interrupt enable.
- – 0: HSI PLL unlocked detection interrupt is disabled.
- – 1: HSI PLL unlocked detection is enabled.
Bit 5 HSIPLLRDYIE: HSI PLL ready interrupt enable.
- – 0: HSI PLL locked interrupt is disabled.
- – 1: HSI PLL locked interrupt is enabled.
Bit 4 HSERDYIE: HSE ready interrupt enable.
- – 0: HSE ready interrupt is disabled.
- – 1: HSE ready interrupt is enabled.
Bit 3 HSIRDYIE: HSI ready interrupt enable.
- – 0: HSI ready interrupt is disabled.
- – 1: HSI ready interrupt is enabled.
Bit 2 Reserved, must be kept at reset value.
Bit 1 LSERDYIE: LSE ready interrupt enable.
- – 0: LSE ready interrupt is disabled.
- – 1: LSE ready interrupt is enabled.
Bit 0 LSIRDYIE: LSI ready interrupt enable.
- – 0: LSI ready interrupt is disabled.
- – 1: LSI ready interrupt is enabled.
6.6.6 Clock Interrupt flag register (RCC_CIFR)
This register provides the status flag linked to clock source ready state or not. It is also used to clear the flags.
This register is reset on PADRESETn.
Address offset: 0x1C
Reset value: 0x0000 0008
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | LCSCR STF | Res. | Res. | LCDRS TF | LPURS TF | WDGR STF | RTCRS TF | HSIPLL UNLOC KDETF | HSIPLL RDYF | HSERD YF | HSIRD YF | Res. | LSERD YF | LSIRD YF. |
| rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 |
Bits 31:14 Reserved, must be kept at reset value.
Bit 13 LCSCRSTF: LCSC reset release flag.
- – 0: no LCSC reset release event occurred.
- – 1: LCSC reset release event occurred.
Cleared by writing 1 in this bit.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LCSC reset by writing in the RCC_APB0RSTR.LCSCRST, the reset release is effective only 2 slow clock periods after the APB writing. This interrupt allows informing the software when the reset release is really done.
Bits 12:11 Reserved, must be kept at reset value.
Bit 10 LCDRSTF: LCD reset release flag.
- – 0: no LCD reset release event occurred.
- – 1: LCD reset release event occurred.
Cleared by writing 1 in this bit.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LCD reset by writing in the RCC_APB0RSTR.LCDCRST, the reset release is effective only 2 slow clock periods after the APB writing. This interrupt allows informing the software when the reset release is really done.
Bit 9 LPURSTF: LPUART reset release flag.
- – 0: no LPUART reset release event occurred.
- – 1: LPUART reset release event occurred.
Cleared by writing 1 in this bit.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LPUART reset by writing in the RCC_APB0RSTR.LPUARTRST, the reset release is effective only 2 slow clock periods or 2 CLK_ROOT_DIV clock periods after the APB writing, depending on how it's configured LPUCLKSEL bit in Clock configuration register (RCC_CFGR) on page 121. This interrupt allows informing the software when the reset release is really done.
- Bit 8 WDGRSTF: Watchdog reset release flag.
– 0: no Watchdog reset release event occurred.
– 1: Watchdog reset release event occurred.
Cleared by writing 1 in this bit.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the Watchdog reset by writing in the RCC_APB0RSTR.WDGRST, the reset release is effective only 2 slow clock periods after the APB writing. This interrupt allows informing the software when the reset release is really done. - Bit 7 RTCRSTF: RTC reset release flag.
– 0: no RTC reset release event occurred.
– 1: RTC reset release event occurred.
Cleared by writing 1 in this bit.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the RTC reset by writing in the RCC_APB0RSTR.RTCRST, the reset release is effective only 2 slow clock periods after the APB writing. This interrupt allows informing the software when the reset release is really done. - Bit 6 HSIPLLUNLOCKDET: HSI PLL unlock detection flag.
– 0: no HSI PLL unlock event occurred.
– 1: HSI PLL unlock event occurred.
Cleared by writing 1 in this bit. - Bit 5 HSIPLLRDYF: HSI PLL ready flag.
– 0: no HSI PLL locked event occurred.
– 1: HSI PLL locked event occurred.
Cleared by writing 1 in this bit. - Bit 4 HSERDYF: HSE ready flag.
– 0: no HSE ready event occurred.
– 1: HSE ready event occurred.
Cleared by writing 1 in this bit. - Bit 3 HSIRDYF: HSI ready flag.
– 0: no HSI ready event occurred.
– 1: HSI ready event occurred.
Cleared by writing 1 in this bit. - Bit 2 Reserved, must be kept at reset value.
- Bit 1 LSERDYF: LSE ready flag.
– 0: no LSE ready event occurred.
– 1: LSE ready event occurred.
Cleared by writing 1 in this bit. - Bit 0 LSIRDYF: LSI ready flag.
– 0: no LSI ready event occurred.
– 1: LSI ready event occurred.
Cleared by writing 1 in this bit.
6.6.7 Clock switch command register (RCC_CSCMDR)
This register allows safe CPU/system clock frequency switching while the MR_SUBG or the LPAWUR is active.
Requesting a frequency clock switch holds the AHB/APB transfers between the MR_SUBG or the LPAWUR and the rest of the system to execute safely the clock switching and release AHB / APB transfers as soon as the new frequency is in place.
A dedicated line of interrupt (instead of the RCC line) is used on the NVIC for the EOFSEQ_IRQ information (see Table 7: Interrupt vectors).
Note: Anyway, the user must keep the CPU/system frequency at minimum 16 MHz clock when the radio is used.
This register is reset on PADRESETn.
Address offset: 0x20
Reset value: 0x0000 0080
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | EOFSEQ_IRQ | EOFSEQ_IE | STATUS[1:0] | CLKSYSDIV_REQ[2:0] | REQUEST | |||
| rc_w1 | rw | r | r | rw | rw | rw | rw | ||||||||
Bits 31:8 Reserved, must be kept at reset value.
Bit 7 EOFSEQ_IRQ: End of sequence flag.
- – 0: No end of sequence event occurred.
- – 1: End of sequence event occurred.
- Cleared by writing 1 in this bit.
Bit 6 EOFSEQ_IE: End of sequence interrupt enable.
- – 0: End of sequence interrupt is disabled.
- – 1: End of sequence interrupt is enabled.
Bits 5:4 STATUS: Status of the switching sequence.
- – 00: IDLE = no switch sequence requested / on-going.
- – 01: ONGOING = a system clock frequency switch is on-going
- – 10: DONE = a system clock frequency switch is done.
- – 11: reserved.
This bit field is cleared when EOFSEQ_IRQ bit is cleared.
Bits 3:1 CLKSYSDIV_REQ: System clock requested/targeted frequency.
Same format and same notes/warnings as SYSCLKDIV[2:0] bit field described in Clock configuration register (RCC_CFGR).
Bit 0 REQUEST: Request to switch the system clock frequency.
Write 1 in this bit to request a system clock frequency switch (using CLKSYS DIV_REQ[2:0] information).
This bit is cleared by hardware when the clock frequency switch is done.
Note: writing 0 in this bit aborts the frequency switch sequence if it is not yet finished. This action must not be used in the normal life of the application except if the end of sequence does not occurs after a long time (to unblock the situation) but this is not supposed to occur.
6.6.8 AHB0 macrocell reset register (RCC_AHBRSTR)
This register allows individual software reset of each IP located in the AHB0 mapping.
This register is reset on PADRESETn.
Address offset: 0x30
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESRST | Res. | RNGRST | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | CRCRST | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPIOB RST | GPIOA RST | Res. | DMARST |
| rw | rw | rw | rw |
Bits 31:21 Reserved, must be kept at reset value.
Bit 20 AESRST: AES reset.
- – 0: AES IP is not under reset.
- – 1: AES IP is under reset.
Bit 19 Reserved, must be kept at reset value.
Bit 18 RNGRST: RNG reset.
- – 0: RNG IP is not under reset.
- – 1: RNG IP is under reset.
Bit 17:16 Reserved, must be kept at reset value.
Bits 15:13 Reserved, must be kept at reset value.
Bit 12 CRCRST: CRC reset.
- – 0: CRC IP is not under reset.
- – 1: CRC IP is under reset.
Bits 11:4 Reserved, must be kept at reset value.
Bit 3 GPIOB RST: IO controller for port B reset.
- – 0: GPIOB IP is not under reset.
- – 1: GPIOB IP is under reset.
Bit 2 GPIOA RST: IO controller for port A reset.
- – 0: GPIOA IP is not under reset.
- – 1: GPIOA IP is under reset.
Bit 1 Reserved, must be kept at reset value.
Bit 0 DMARST: DMA and DMAMUX reset.
- – 0: DMA and DMAMUX IPs are not under reset.
- – 1: DMA and DMAMUX IPs are under reset.
6.6.9 APB0 macrocell reset register (RCC_APB0RSTR)
This register allows individual software reset of each IP located in the APB0 mapping.
This register is reset on PADRESETn.
Note: Each bit is set and reset by the software.
Address offset: 0x34
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DBGMCU RST | WDGR ST | LCSCR ST | RTCRS T | DACRS T | COMP RST | LCDCR ST | SYSCF GRST | Res. | Res. | Res. | Res. | Res. | Res. | TIM16 RST | TIM2R ST |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bit 15 DBGMCURST: DBGMCU reset.
- – 0: DBGMCU IP is not under reset.
- – 1: DBGMCU IP is under reset.
Bit 14 WDGRST: Watchdog reset.
- – 0: Watchdog IP is not under reset.
- – 1: Watchdog IP is under reset.
Note: due to asynchronism slow clock/fast clock management, when the software requests to release the WDG reset by writing 0 in the RCC_APB0RSTR.WDGRST, the reset release is effective only 2 slow clock periods after the APB writing. An interrupt/status flag is available to inform the software when the reset release is really done (see RCC_CIFR/RCC_CIFR registers).
Bit 13 LCSCRST: LCSC reset.
- – 0: LCSC IP is not under reset.
- – 1: LCSC IP is under reset.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LCSC reset by writing in the RCC_APB0RSTR.LCSCRST, the reset release is effective only 2 slow clock periods after the APB writing. An interrupt/status flag is available to inform the software when the reset release is really done (see RCC_CIFR/RCC_CIFR registers).
Bit 12 RTCRST: RTC reset.
- – 0: RTC IP is not under reset.
- – 1: RTC IP is under reset.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the RTC reset by writing in the RCC_APB0RSTR.RTCRST, the reset release is effective only 2 slow clock periods after the APB writing. An interrupt/status flag is available to inform the software when the reset release is really done (see RCC_CIFR/RCC_CIFR registers).
Bit 11 DACRST: DAC controller reset.
- – 0: DAC controller IP is not under reset.
- – 1: DAC controller IP is under reset.
- Bit 10 COMPRST: Comparator controller reset.
- – 0: Comp controller IP is not under reset.
- – 1: Comp controller IP is under reset.
- Bit 9 LCDCRST: LCD controller reset.
- – 0: LCD controller IP is not under reset.
- – 1: LCD controller IP is under reset.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LCD reset by writing in the RCC_APB0RSTR.LCDCRST, the reset release is effective only 2 slow clock periods after the APB writing. An interrupt/status flag is available to inform the software when the reset release is really done (see RCC_CIFR/RCC_CIFR registers).
- Bit 8 SYSCFGRST: system controller reset.
- – 0: system controller IP is not under reset.
- – 1: system controller IP is under reset.
- Bits 7:2 Reserved, must be kept at reset value.
- Bit 1 TIM16RST: TIM16 reset.
- – 0: TIM16 IP is not under reset.
- – 1: TIM16 IP is under reset.
- Bit 0 TIM2RST: TIM2 reset.
- – 0: TIM2 IP is not under reset.
- – 1: TIM2 IP is under reset.
6.6.10 APB1 macrocell reset register (RCC_APB1RSTR)
This register allows individual software reset of each IP located in the APB1 mapping.
This register is reset on PADRESETn.
Address offset: 0x38
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2RST | Res. | I2C1RST | Res. | Res. | Res. | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | SPI3RST | Res. | Res. | Res. | USARTRST | Res. | LPUARTRST | Res. | Res. | Res. | ADCRST | Res. | Res. | Res. | SPI1RST |
| rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bit 23 I2C2RST: I2C2 reset.
- – 0: I2C2 IP is not under reset.
- – 1: I2C2 IP is under reset.
Bit 22 Reserved, must be kept at reset value.
Bit 21 I2C1RST: I2C1 reset.
- – 0: I2C1 IP is not under reset.
- – 1: I2C1 IP is under reset.
Bits 20:15 Reserved, must be kept at reset value.
Bit 14 SPI3RST: SPI3 reset.
- – 0: SPI3 IP is not under reset.
- – 1: SPI3 IP is under reset.
Bits 13:11 Reserved, must be kept at reset value.
Bit 10 USARTRST: USART reset.
- – 0: USART IP is not under reset.
- – 1: USART IP is under reset.
Bit 9 Reserved, must be kept at reset value.
Bit 8 LPUARTRST: LPUART reset.
- – 0: LPUART IP is not under reset.
- – 1: LPUART IP is under reset.
Note: due to asynchronism slow clock/fast clock management, when the software request to release the LPUART reset by writing in the RCC_APB1RSTR.LPUARTRST, the reset release is effective only 2 slow clock periods after the APB writing. An interrupt/status flag is available to inform the software when the reset release is really done (see RCC_CIFR/RCC_CIFR registers).
Bits 7:5 Reserved, must be kept at reset value.
Bit 4 ADCRST: ADC reset.
- – 0: ADC IP is not under reset.
- – 1: ADC IP is under reset.
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 SPI1RST: SPI1 reset.
- – 0: SPI1 IP is not under reset.
- – 1: SPI1 IP is under reset.
6.6.11 APB2 macrocell reset register (RCC_APB2RSTR)
This register allows individual software reset of each IP located in the APB2 mapping (radio).
This register is reset on PADRESETn.
Address offset: 0x40
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LPAWU RRST | Res. | Res. | MRSU BGRST |
| rw | rw |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 LPAWURRST: LPAWUR reset.
- – 0: LPAWUR is not under reset.
- – 1: LPAWUR is under reset.
Bits 2:1 Reserved, must be kept at reset value.
Bit 0 MRSUBGRST: MR_SUBG (SubG radio) reset.
- – 0: MR_SUBG IP is not under reset.
- – 1: MR_SUBG IP is under reset.
6.6.12 AHB0 macrocell clock enable register (RCC_AHBENR)
This register allows individual software gating of the clock of each IP located in the AHB0 mapping.
Note: Each IP clock gating is controlled by only 1 bit which gates both AHB clock and kernel clock when the IP uses one.
This register is reset on PADRESETn.
Address offset: 0x50
Reset value: 0x0000 000C
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESEN | Res. | RNGEN | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | CRCEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPIOBEN | GPIOAEN | Res. | DMAEN |
| rw | rw | rw | rw |
Bits 31:21 Reserved, must be kept at reset value.
Bit 20 AESEN: AES clock enable.
- – 0: AES IP is clock gated.
- – 1: AES IP is clocked.
Bits 19 Reserved, must be kept at reset value.
Bit 18 RNGEN: RNG clock enable.
- – 0: RNG IP is clock gated.
- – 1: RNG IP is clocked.
Bit 17:13 Reserved, must be kept at reset value.
Bit 12 CRCEN: CRC enable.
- – 0: CRC IP is clock gated.
- – 1: CRC IP is clocked.
Bits 11:4 Reserved, must be kept at reset value.
Bit 3 GPIOBEN: IO controller for port B enable.
- – 0: GPIOB IP is clock gated.
- – 1: GPIOB IP is clocked (default).
Bit 2 GPIOAEN: IO controller for port A enable.
- – 0: GPIOA IP is clock gated.
- – 1: GPIOA IP is clocked (default).
Bit 1 Reserved, must be kept at reset value.
Bit 0 DMAEN: DMA and DMAMUX enable.
- – 0: DMA and DMAMUX IPs are clock gated.
- – 1: DMA and DMAMUX IPs are clocked.
6.6.13 APB0 macrocell clock enable register (RCC_APB0ENR)
This register allows individual software gating of the clock of each IP located in the APB0 mapping.
Note: Each IP clock gating is controlled by only 1 bit which gates both APB clock and kernel clock when the IP uses one.
This register is reset on PADRESETn (except one bit identified with a table footnote).
Address offset: 0x54
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DBGMCUEN | WDGEN | LCSCEN | RTCEN | DACEN | COMPEN | LCDCEN | SYSCFGEN | Res. | Res. | Res. | Res. | Res. | Res. | TIM16EN | TIM2EN |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bit 15 DBGMCUEN: DBGMCU enable.
- – 0: DBGMCU IP is clock gated.
- – 1: DBGMCU IP is clocked.
Bit 14 WDGEN: Watchdog enable.
- – 0: Watchdog IP is clock gated.
- – 1: Watchdog IP is clocked.
WARNING: the software has to wait 2 slow clock cycles before to use the IWDOG IP after setting this bit due to a double resynchronization on slow clock.
Bit 13 LCSCEN: LCSC enable.
- – 0: LCSC IP is clock gated.
- – 1: LCSC IP is clocked.
WARNING: the software has to wait 2 slow clock cycles before to use the LCSC IP after setting this bit due to a double resynchronization on slow clock.
Bit 12(1) RTCEN: RTC enable.
- – 0: RTC IP is clock gated.
- – 1: RTC IP is clocked.
WARNING: the software has to wait 2 slow clock cycles before to use the RTC IP after setting this bit due to a double resynchronization on slow clock.
Bit 11 DACEN: DAC controller enable.
- – 0: DAC controller is clock gated.
- – 1: DAC controller is clocked.
Bit 10 COMPEN: Comparator controller enable.
- – 0: COMP controller is clock gated.
- – 1: COMP controller is clocked.
Bit 8 SYSCFGEN: system controller enable.
- – 0: system controller IP is clock gated.
- – 1: system controller IP is clocked.
Bits 7:2 Reserved, must be kept at reset value.
Bit 1 TIM16EN: TIM16 enable.
– 0: TIM16 IP is clock gated.
– 1: TIM16 IP is clocked.
Bit 0 TIM2EN: TIM2 enable.
– 0: TIM2 IP is clock gated.
– 1: TIM2 IP is clocked.
- 1. This bit is reset on PORESETn only.
6.6.14 APB1 macrocell clock enable register (RCC_APB1ENR)
This register allows individual software gating of the clock of each IP located in the APB1 mapping.
Note: Each IP clock gating is controlled by only 1 bit which gates both APB clock and kernel clock when the IP uses one.
This register is reset on PADRESETn.
Address offset: 0x58
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2EN | Res. | I2C1EN | Res. | Res. | Res. | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | SPI3EN | Res. | Res. | Res. | USARTEN | Res. | LPUARTEN | Res. | Res. | ADCANAEN | ADCDIGEN | Res. | Res. | Res. | SPI1EN |
| rw | rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bit 23 I2C2EN: I2C2 enable.
- – 0: I2C21 IP is clock gated.
- – 1: I2C2 IP is clocked.
Bit 22 Reserved, must be kept at reset value.
Bit 21 I2C1EN: I2C1 enable.
- – 0: I2C1 IP is clock gated.
- – 1: I2C1 IP is clocked.
Bits 20:15 Reserved, must be kept at reset value.
Bit 14 SPI3EN: SPI3 enable.
- – 0: SPI3 IP is clock gated.
- – 1: SPI3 IP is clocked.
Bits 13:11 Reserved, must be kept at reset value.
Bit 10 USARTEN: USART enable.
- – 0: USART IP is clock gated.
- – 1: USART IP is clocked.
Bit 9 Reserved, must be kept at reset value.
Bit 8 LPUARTEN LPUART enable.
- – 0: LPUART IP is clock gated.
- – 1: LPUART IP is clocked.
WARNING: the software has to wait 2 slow clock cycles before to use the LPUART IP after setting this bit due to a double resynchronization on slow clock.
Bits 7:6 Reserved, must be kept at reset value.
Bit 5 ADCANAEN ADC clock enable for the analog part of the ADC block.
- – 0: ADC analog IP is clock gated.
- – 1: ADC analog IP is clocked.
Bit 4 ADCDIGEN ADC clock enable for digital part of the ADC block.
- – 0: ADC digital IP is clock gated.
- – 1: ADC digital IP is clocked.
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 SPI1EN: SPI1 enable.
- – 0: SPI1 IP is clock gated.
- – 1: SPI1 IP is clocked.
6.6.15 APB2 macrocell clock enable register (RCC_APB2ENR)
This register allows software gating of the clock of each IP located in the APB2 mapping (radio).
Note: Gating the MR_SUBG or LPAWUR clocks mean that both their fast and slow clocks are gated (so including their WAKEUP block clocks). Gating the MR_SUBG clock means that the fast and slow clocks are gated (so including its WAKEUP block clock).
This register is reset on PADRESETn.
Address offset: 0x60
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LPAWU REN | Res. | Res. | MRSU BGEN |
| rw | rw |
Bits 31:4 Reserved, must be kept at reset value.
Bit 3 LPAWUREN: LPAWUR enable.
- – 0: LPAWUR is clock gated.
- – 1: LPAWUR is clocked.
Bits 2:1 Reserved, must be kept at reset value.
Bit 0 MRSUBGEN: MR_SUBG enable.
- – 0: MR_SUBG IP is clock gated.
- – 1: MR_SUBG IP is clocked.
6.6.16 V33 reset status register (RCC_CSR)
This register provides the reset reason flags. It is set automatically by hardware on any new reset event and must be cleared by software.
The Figure 12: Reset generation provides a summary of active flags versus reset reason.
This register is reset on PORESETn.
Address offset: 0x94
Reset value: 0x0C00 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | LOCKUPRSTF | WDGRSTF | SFTRSTF | PORRSTF | PADRSTF | Res. | Res. | RMVF | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| r | r | r | r | r | rc_w1 | ||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 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 LOCKUPRSTF: CPU lockup reset flag.
Set by the hardware when a CPU lockup reset occurs.
Reset by writing 1 in RMVF bit. - Bit 29 WDGRSTF: Watchdog reset flag.
Set by the hardware when a Watchdog reset occurs.
Reset by writing 1 in RMVF bit. - Bit 28 SFTRSTF: Software reset flag.
Set by the hardware when a CPU system reset occurs.
Reset by writing 1 in RMVF bit. - Bit 27 PORRSTF: Power-On reset flag.
Set by the hardware when a PORESETN or a BOR reset occurs.
Reset by writing 1 in RMVF bit. - Bit 26 PADRSTF: NRSTn pad reset flag.
Set by the hardware when a reset from external NRSTn pad occurs but also after any reset.
This means the source of the reset is the NRSTn pad only if all flags are low except this one.
Reset by writing 1 in RMVF bit. - Bits 25:24 Reserved, must be kept at reset value.
- Bit 23 RMVF: Remove Flag reset.
Writing 1 in this bit clears all the reset flags of this register.
This bit is auto-cleared by the hardware. - Bits 22:0 Reserved, must be kept at reset value.
6.6.17 RF software high-speed external register (RCC_RFSWHSECR)
This register is reset on PADRESETn.
Address offset: 0x98
Reset value: 0x0000 803F
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | AMPLTHRESH | ||
| rw | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ISTARTUP | SWXOTUNE[5:0] | SWXOTUNEEN | GMC[6:0] | ||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||||
Bits 31:19 Reserved, must be kept at reset value.
Bits 18:16 AMPLTHRESH: RF-HSE Amplitude Control threshold.
Set by software
Bits 15:14 ISTARTUP: RF-HSE Startup current
Set by software
Bits 13:8 SWXOTUNE: RF HSE capacitor bank tuning value set by software.
This value is taken into account instead of the trimming value loaded by HW at reset if SWXOTUNEEN bit is set.
Bit 7 SWXOTUNEEN: RF HSE software capacitor bank tuning enable.
– 0: trimming value readable in RCC_RFHSECR.XOTUNE[5:0] bit field is used as trimming value on HSE.
– 1: trimming value written in RCC_RFSWHSECR.SWXOTUNE[5:0] bit field is used as trimming value on HSE.
Bits 6:5 GMC[6:5]: High speed external XO current control reference
- 00: 10 µA
- 01: 20 µA
- 1x: 40 µA
Note: this value is set only by software.
Bits 4:0 GMC[4:0]: High speed external XO current control multiplying factor
\(I_{coreHSE} = GMC[4:0] * GMC[6:5]\)
Example: GMC[6:0]=0x1111001 -> \(I_{coreHSE}=25*40\mu A\)
Note: this value is set only by software.
6.6.18 RF high speed external register (RCC_RFHSECR)
This register is reset on PADRESETn.
Address offset: 0x9C
Reset value: 0x0000 0000 when the STM32WL30xx/31xx/33xx device flash is empty, else depends on trimmed values flashed in the sample.
Note: The XOTUNE value depends on the choice of the external XO component. For this reason, the RCC_RFSWHSECR.SWXOTUNE bit field is the one to program and select before to start the XO.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AMPLR EADY. | XOTUNE[5:0] | |||||
| r | r | r | r | r | r | r | |||||||||
Bits 31:7 Reserved, must be kept at reset value.
Bit 6 AMPLREADY: RF-HSE Amplitude Control Ready output
Bits 5:0 XOTUNE: RF-HSE capacitor bank tuning.
This value is loaded by HW at reset as soon as the flash controller achieves the reading of the information in flash memory.

6.6.19 AHB sleep mode enable register (RCC_AHBSMENR)
This register is reset on PADRESETn.
Address offset: 0xA0
Reset value: 0x0014 160F
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESSMEN | Res. | RNGSMEN | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | CRCSMEN | Res. | SRAM1SMEN | SRAM0SMEN | Res. | Res. | Res. | Res. | Res. | GPIOSMEN | GPIOASMEN | FLASHSMEN | DMASMEN |
| rw | rw | rw | rw | rw | rw | rw |
Bits 31:21 Reserved, must be kept at reset value.
Bit 20 AESSMEN: AES clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: AES clock disabled in Sleep mode
- - 1: AES clock enabled in Sleep mode (if enabled in AESEN)
Bits 20:19 Reserved, must be kept at reset value.
Bit 18 RNGSMEN: RNG bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: RNG bus clock disabled in Sleep mode
- - 1: RNG bus clock enabled in Sleep mode (if enabled in RNGEN)
Bits 17:13 Reserved, must be kept at reset value.
Bit 12 CRCSMEN: CRC clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: CRC clock disabled in Sleep mode
- - 1: CRC clock enabled in Sleep mode (if enabled in CRCEN)
Bit 11 Reserved, must be kept at reset value.
Bit 10 SRAM1SMEN: SRAM1 clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: SRAM1 clock disabled in Sleep mode
- - 1: SRAM1 clock enabled in Sleep mode
Bit 9 SRAM0SMEN: SRAM0 clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: SRAM0 clock disabled in Sleep mode
- - 1: SRAM0 clock enabled in Sleep mode
Bits 8:4 Reserved, must be kept at reset value.
Bit 3 GPIOASMEN: GPIOB clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: GPIOB clock disabled in Sleep mode
- - 1: GPIOB clock enabled in Sleep mode (if enabled by GPIOBEN)
Bit 2 GPIOASMEN: GPIOA clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: GPIOA clock disabled in Sleep mode
- - 1: GPIOA clock enabled in Sleep mode (if enabled by GPIOAEN)
Bit 1 FLASHSMEN: Flash clocks enable during flash Sleep mode and CPU WFI bit
This bit is set and reset by software.
- - 0: flash clocks are disabled in flash Sleep mode and CPU WFI mode
- - 1: flash clocks are enabled in Sleep mode
Note: Flash Sleep mode is enabled through flash controller register
CONFIG.SLEEP_SM (see Configuration register (CONFIG))
Bits 0 DMASMEN: DMA clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: DMA clock disabled in Sleep mode
- - 1: DMA clock enabled in Sleep mode (if enabled in DMAEN)
6.6.20 APB0 sleep mode enable register (RCC_APB0SMENR)
This register is reset on PADRESETn.
Address offset: 0xA4
Reset value: 0x0000 FF03
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DBGMCUSMEN | WDGSMEN | LCSCSMEN | RTCSMEN | DACSMEN | COMP SMEN | LCDCSMEN | SYSCFGSMEN | Res. | Res. | Res. | Res. | Res. | Res. | TIM16SMEN | TIM2SMEN |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:16 Reserved, must be kept at reset value.
Bit 15 DBGMCUSMEN: DBGMCU clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: DBGMCU clock disabled in Sleep mode
- - 1: DBGMCU clock enabled in Sleep mode (if enabled in DBGMCUEN)
Bit 14 WDGSMEN: WDG bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: WDG bus clock disabled in Sleep mode
- - 1: WDG bus clock enabled in Sleep mode (if enabled in WDGGEN)
Bit 13 LCSCSMEN: LCSC bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: LCSC bus clock disabled in Sleep mode
- - 1: LCSC bus clock enabled in Sleep mode (if enabled in LCSCEN)
Bit 12 RTCSMEN: RTC bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: RTC bus clock disabled in Sleep mode
- - 1: RTC bus clock enabled in Sleep mode (if enabled in RTCEN)
Bit 11 DACSMEN: DAC clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: DAC clock disabled in Sleep mode
- - 1: DAC clock enabled in Sleep mode (if enabled in DACEN)
Bit 10 COMP SMEN: COMP clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: COMP clock disabled in Sleep mode
- - 1: COMP clock enabled in Sleep mode (if enabled in COMPEN)
Bit 9 LCDCSMEN: LCDC bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: LCDC bus clock disabled in Sleep mode
- - 1: LCDC bus clock enabled in Sleep mode (if enabled in LCDCEN)
Bit 8 SYSCFGSMEN: SYSCFG bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: SYSCFG bus clock disabled in Sleep mode
- - 1: SYSCFG bus clock enabled in Sleep mode (if enabled in SYSCFGEN)
Bits 7:2 Reserved, must be kept at reset value.
Bit 1 TIM16SMEN: TIM16 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: TIM16 bus clock disabled in Sleep mode
- - 1: TIM16 bus clock enabled in Sleep mode (if enabled in TIM16EN)
Bit 0 TIM2SMEN: TIM2 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: TIM2 bus clock disabled in Sleep mode
- - 1: TIM2 bus clock enabled in Sleep mode (if enabled in TIM2EN)
6.6.21 APB1 sleep mode enable register (RCC_APB1SMENR)
This register is reset on PADRESETn.
Address offset: 0xA8
Reset value: 0x00A0 4511
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2SMEN | Res. | I2C1SMEN | Res. | Res. | Res. | Res. | Res. |
| rw | rw | ||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | SPI3SMEN | Res. | Res. | Res. | USARTSMEN | Res. | LPUARTSMEN | Res. | Res. | Res. | ADCDIGSMEN | Res. | Res. | Res. | SPI1SMEN |
| rw | rw | rw | rw | rw |
Bits 31:24 Reserved, must be kept at reset value.
Bit 23 I2C2SMEN: I2C2 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- 0: I2C2 bus clock disabled in Sleep mode
- 1: I2C2 bus clock enabled in Sleep mode (if enabled in I2C2EN)
Bit 22 Reserved, must be kept at reset value.
Bit 21 I2C1SMEN: I2C1 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- 0: I2C1 bus clock disabled in Sleep mode
- 1: I2C1 bus clock enabled in Sleep mode (if enabled in I2C1EN)
Bits 20:15 Reserved, must be kept at reset value.
Bit 14 SPI3SMEN: SPI3 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- 0: SPI3 bus clock disabled in Sleep mode
- 1: SPI3 bus clock enabled in Sleep mode (if enabled in SPI3EN)
Bits 13:11 Reserved, must be kept at reset value.
Bit 10 USARTSMEN: USART bus clock enable during Sleep mode bit
This bit is set and reset by software.
- 0: USART bus clock disabled in Sleep mode
- 1: USART bus clock enabled in Sleep mode (if enabled in USARTEN)
Bit 9 Reserved, must be kept at reset value.
Bit 8 LPUARTSMEN: LPUART bus clock enable during Sleep mode bit
This bit is set and reset by software.
- 0: LPUART bus clock disabled in Sleep mode
- 1: LPUART bus clock enabled in Sleep mode (if enabled in LPUARTEN)
Bits 7:6 Reserved, must be kept at reset value.
Bit 5 Reserved, must be kept at reset value.
Bit 4 ADCDIGSMEN: ADCDIG bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: ADCDIG bus clock disabled in Sleep mode
- - 1: ADCDIG bus clock enabled in Sleep mode (if enabled by ADCDIGEN)
Bits 3:1 Reserved, must be kept at reset value.
Bit 0 SPI1SMEN: SPI1 bus clock enable during Sleep mode bit
This bit is set and reset by software.
- - 0: SPI1 bus clock disabled in Sleep mode
- - 1: SPI1 bus clock enabled in Sleep mode (if enabled in SPI1EN)
6.7 RCC register map
Refer to Table 2.2.2: Memory map and register boundary addresses for the RCC base address location in the STM32WL30xx/31xx/33xx.
Table 17 highlights the registers in the VDD12o power domain, marked with footnote 1, and the registers in the VDDIO (V33) power domain, marked with footnote 2. This implies that those registers are not reset on Deepstop exit.
Table 17. RCC register map and reset values
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x00 | RCC_CR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | HSERDY | HSEON | FMRAT | HSIPLLRDY | HSIPLLON | HSEPLLBUFON | Res. | HSIRDY | LOCKDET_NSTOP | Res. | LSEBYP | LSERDY | LSEON | LSIRDY | LSION | Res. | Res. | |||
| Reset value | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x04 | Reserved | ||||||||||||||||||||||||||||||||||
| 0x08 | RCC_CFGR(1) | CCOPRE | MCOSEL | LCOSEL | SPI3I2SCLKSEL | Res. | Res. | LCOEN | Res. | IOBOOSTEN | CLKSLOWSEL | Res. | LPUCLKSEL | SMPSDIV | Res. | CLKSYSDIV_STATUS | Res. | CLKSYSDIV | Res. | HSESEL_STATUS | STOPHSI | HSESEL | Res. | ||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | ||||||||||
| 0x0C | RCC_CSSWC(1) | Res. | Res. | HSITRIMSW[5:0] | HSISWTRIMEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LSEDRV | LSISWBW[3:0] | Res. | LSISWTRIMEN | |||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||
| 0x10 | RCC_KRMR(1) | 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. | KRM[4:0] | KRMEN | ||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x14 | Reserved | ||||||||||||||||||||||||||||||||||
| 0x18 | RCC_CIER(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LCSCRSTIE | Res. | Res. | LCDRSTIE | LPURSTIE | WDGRSTIE | RTCRSTIE | HSIPLLUNLOCKDETIE | HSIPLLRDYIE | HSERDYIE | HSIRDYIE | Res. | LSERDYIE | Res. | LSIRDYIE | ||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x1C | RCC_CIFR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LCDRSTF | LPURSTF | WDGRSTF | RTCRSTF | HSIPLLUNLOCKDETF | HSIPLLRDYF | HSERDYF | HSIRDYF | Res. | LSERDYF | LSIRDYF |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | |||||||||||||||||||||||
| 0x20 | RCC_CSCMDR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | EOFSEQ_IRQ | EOFSEQ_IE | STATUS[1:0] | CLKSYSDIV_REQ[2:0] | REQUEST | |||
| Reset value | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x24 - 0x2C | Reserved | ||||||||||||||||||||||||||||||||
| 0x30 | RCC_AHBRSTR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESRST | Res. | RNGRST | Res. | Res. | Res. | Res. | Res. | CRCRST | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPIOBRST | GPIOARST | Res. | DMARST |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
| 0x34 | RCC_APB0RSTR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBGMCURS | WDGRST | LCSCRST | RTCRST | DACRST | COMPRST | LCDCRST | SYSCFGRST | Res. | Res. | Res. | Res. | Res. | Res. | TIM16RST | TIM2RST |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||
| 0x38 | RCC_APB1RSTR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2RST | Res. | I2C1RST | Res. | Res. | Res. | Res. | Res. | Res. | SPI3RST | Res. | Res. | Res. | USARTRST | Res. | LPUARTRST(1) | Res. | Res. | Res. | ADCRST | Res. | Res. | Res. | SPI1RST |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||
| 0x3C | Reserved | ||||||||||||||||||||||||||||||||
| 0x40 | RCC_APB2RSTR(1) | 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. | LPAWURRST | Res. | Res. | MRSUBGRST |
| Reset value | 0 | 0 | |||||||||||||||||||||||||||||||
| 0x44 - 0x4C | Reserved | ||||||||||||||||||||||||||||||||
| 0x50 | RCC_AHBENR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESEN | Res. | RNGEN | Res. | Res. | Res. | Res. | Res. | CRCEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GPIOBEN | GPIOAEN | Res. | DMAEN |
| Reset value | 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||||||||||||||||
Table 17. RCC register map and reset values (continued)
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x54 | RCC_APB0ENR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBGMCUEN | WDGEN | LCSCEN | RTCEN | DACEN | COMPEN | LCDCEN | SYSCFGEN | Res. | Res. | Res. | Res. | Res. | Res. | TIM16EN | TIM2EN |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||
| 0x58 | RCC_APB1ENR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2EN | Res. | I2C1EN | Res. | Res. | Res. | Res. | Res. | Res. | SPI3EN | Res. | Res. | Res. | USARTEN | Res. | LPUARTEN(1) | Res. | Res. | ADCANAEN | ADCDIGEN | Res. | Res. | Res. | SPI1EN |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x5C | Reserved | ||||||||||||||||||||||||||||||||
| 0x60 | RCC_APB2ENR(1) | 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. | LPAWUREN | Res. | Res. | MRSUBGEN |
| Reset value | 0 | 0 | |||||||||||||||||||||||||||||||
| 0x64 - 0x90 | Reserved | ||||||||||||||||||||||||||||||||
| 0x94 | RCC_CSR(2) | Res. | LOCKUPRSTF | WDGRSTF | SFTRSTF | PORRSTF | PADRSTF | Res. | Res. | RMVF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| Reset value | 0 | 0 | 0 | 1 | 1 | 0 | |||||||||||||||||||||||||||
| 0x98 | RCC_RFSWHSECR(1) | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | RMVF | Res. | Res. | Res. | AMPTHRESH | ISTARTUP | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GMC | |||||||||
| Reset value | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||||||||
| 0x9C | RCC_RFHSECR | 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. | AMPLREADY. | XOTUNE(1) | |||||
| Reset value | - | - | |||||||||||||||||||||||||||||||
| 0xA0 | RCC_AHBSMENR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AESSMEN | Res. | RNGSMEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CRCSMEN | Res. | SRAM1SMEN | SRAM0SMEN | Res. | Res. | Res. | Res. | Res. | GPIOBSMEN | GPIOASMEN | FLASHSMEN | DMASMEN |
| Reset value | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||||||||||||
| 0xA4 | RCC_APB0SMENR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | DBGMCUSMEN | WDGSMEN | SCSMIEN | RTCSMEN | DACSMEN | COMPSMEN | LCDCSMEN | SYSCFGSMEN | Res. | Res. | Res. | Res. | Res. | Res. | TIM16SMEN | TIM2SMEN |
| Reset value | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||||||||||||
Table 17. RCC register map and reset values (continued)
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0xA8 | RCC_APB1SMENR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | I2C2SMEN | Res. | I2C1SMEN | Res. | Res. | Res. | Res. | Res. | Res. | SPI3SMEN | Res. | Res. | Res. | USARTSMEN | Res. | LPUARTSMEN | Res. | Res. | Res. | ADCDIGSMEN | Res. | Res. | Res. | SPI1SMEN |
| Reset value | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
- 1. VDD12o power domain.
- 2. VDDIO power domain.

6.8 Programmer's model
6.8.1 Switch the system on the PLL64M clock tree
To switch the system from the HSI clock source to the PLL clock source, the user has to:
- 1. Enable the HSE (48 MHz or 50 MHz external crystal)
- 2. Wait for the HSE ready flag information (through interrupt or by polling)
- 3. Request to enable the PLL
- 4. Wait for the PLL ready flag information (through interrupt or by polling). From this point, the clock source for the whole fast clock tree is the accurate PLL source.
Note: A status flag and an associated interrupt are available to inform the software in case of HSIPLL64M unlock event. See RCC_CIER and RCC_CIFR registers.
6.8.2 Use the direct HSE instead of the RC64MPLL block
If the application does not target to use the maximum system clock frequency, the system can be configured to use directly the 48 MHz or 50 MHz provided by the external XO (HSE).
This configuration choice is supposed to be static and to be used when maximum frequency is never used.
In this case, the software has to:
- 1. Ensure the RCC_CR.CLKSYSDIV bit field is programmed with a value greater than 000
- 2. Enable the external XO (by setting the RCC_CR.HSEON if not yet done)
- 3. Wait for the HSE ready flag information (through interrupt or by polling)
- 4. Set the RCC_CFGR.HSESEL bit to switch the fast clock tree on HSE path. If both clocks (HSI and HSE) are present, the switch should take around 4 clock cycles.
- 5. To safe power, the software can stop the RC64MPLL analog block by setting the RCC_CFGR.STOPHSI bit.
Note: A hardware mechanism is in place to restart the RC64MPLL and switch back the clock tree on it if the HSERDY is low or if the CLKSYSDIV bit field has been programmed to 000.
The HSE configuration is not lost on a Deepstop sequence. So at wakeup, the system restarts the HSE (thanks to HEON bit) and clock tree switches back on HSE as soon as the HSERDY flag is set. In the meantime, the clock tree run on RC64MPLL block. If the STOPHSI was high before the Deepstop, the RC64MPLL analog is switched off as soon as the clock tree is back on HSE path.
- – The HSE configuration is not lost on a Deepstop sequence. So at wakeup, the system restarts the HSE (thanks to HEON bit). So at wakeup: the clock tree runs on RC64MPLL block (HSI or PLL)
- – the clock is automatically switched from HSI to HSE
6.8.3 Changing the system clock frequency while the MR_SUBGHz is enabled
As long as the MR_SUBG is enabled (by setting the RCC_APB2ENR.MRBLEEN), the application software has no guarantee the radio is running or about to start a sequence that makes the MR_SUBG IP does AHB access to the RAM. Changing the system clock and by
this action changing the ratio between MR_SUBG clock domain and system clock domain could create crash if not managed carefully.
For this reason, a hardware mechanism has been put in place and must be used to change the system frequency when MR_SUBG is ON.
The sequence to execute to change the system clock is the following:
- 1. Ensure the targeted frequency is a integr multiple of 16 MHz greater than or equal to the MR_SUBG frequency (visible in RCC_APB2ENR.CLKbledIV)
- 2. Program the wanted frequency in the RCC_CSCMDR.CLKSYDIV bit field and set the RCC_CSCMDR.REQUEST bit.
- 3. Wait for the RCC_CSCMDR.EOFSEQ_IRQ flag information (through interrupt or by polling)
- 4. When the flag (and the interrupt if enabled) is set, the system is running on the new frequency.
- 5. The RCC_CFGR.CLKSYSDIV[1:0] bit field has been updated by hardware to the new frequency value.
Note: If the software requested a frequency below 16 MHz, the actual final frequency is 16 MHz (associated value is readable in the RCC_CFGR.CLKSYSDIV[1:0]).