6. Power control (PWR)

6.1 Introduction

The power control section (PWR) provides an overview of the supply architecture for the different power domains and of the supply configuration controller.

It also describes the features of the power supply supervisors and explains how the \( V_{\text{CORE}} \) supply domain is configured depending on the operating modes, the selected performance (clock frequency) and the voltage scaling.

6.2 PWR main features

6.3 PWR block diagram

Figure 18. Power control block diagram

Figure 18. Power control block diagram. This block diagram illustrates the internal architecture of the Power (PWR) control system. On the left, external pins are shown: PDR_ON, VDDMMC, VDD, VBAT, VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VDDLDO, VCAP, VDDA, VSSA, VREF+, VREF-, VDD50USB, VDD33USB, VSS, and PVD_IN. These pins connect to internal functional blocks: POR/PDR, Backup domain (containing VBAT charging), System supply (containing Switched mode power supply (SMPS) and LDO voltage regulator), Analog domain, and USB regulator. A central 'Power management' block is connected to these supply blocks and to 'Voltage scaling', 'TEMP thresholds', 'VBAT thresholds', and 'PVD and AVD' blocks. The 'Power management' block interfaces with the '32-bit AHB bus' via a 'Register interface'. It also connects to the 'RCC' (Reset and Clock Control) block, which outputs signals like pwr_por_rst, pwr_bor_rst, pwr_cd_wkup, pwr_srd_wkup, rcc_pwd_cd_req, and rcc_pwd_srd_req. Additionally, it connects to the 'EXTI' (External Interrupt) block, which outputs exti_cd_wkup and exti_srd_wkup signals. The diagram is labeled MSv48168V3 in the bottom right corner.
Figure 18. Power control block diagram. This block diagram illustrates the internal architecture of the Power (PWR) control system. On the left, external pins are shown: PDR_ON, VDDMMC, VDD, VBAT, VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VDDLDO, VCAP, VDDA, VSSA, VREF+, VREF-, VDD50USB, VDD33USB, VSS, and PVD_IN. These pins connect to internal functional blocks: POR/PDR, Backup domain (containing VBAT charging), System supply (containing Switched mode power supply (SMPS) and LDO voltage regulator), Analog domain, and USB regulator. A central 'Power management' block is connected to these supply blocks and to 'Voltage scaling', 'TEMP thresholds', 'VBAT thresholds', and 'PVD and AVD' blocks. The 'Power management' block interfaces with the '32-bit AHB bus' via a 'Register interface'. It also connects to the 'RCC' (Reset and Clock Control) block, which outputs signals like pwr_por_rst, pwr_bor_rst, pwr_cd_wkup, pwr_srd_wkup, rcc_pwd_cd_req, and rcc_pwd_srd_req. Additionally, it connects to the 'EXTI' (External Interrupt) block, which outputs exti_cd_wkup and exti_srd_wkup signals. The diagram is labeled MSv48168V3 in the bottom right corner.

PWR pins and internal signals

Table 32 lists the PWR inputs and output signals connected to package pins or balls, while Table 33 shows the internal PWR signals.

Table 32. PWR input/output signals connected to package pins or balls

Pin nameSignal typeDescription
VDDSupply inputMain I/O and V DD domain supply input
VDDASupply inputExternal analog power supply for analog peripherals
VBATSupply input/outputBackup battery supply input or battery charging output
VDDMMCSupply inputExternal power supply for independent I/Os
VDDSMPSSupply inputSwitched mode power supply input
Table 32. PWR input/output signals connected to package pins or balls (continued)
Pin nameSignal typeDescription
VLXSMPSSupply outputSwitched mode power supply output
VFBSMPSSupply inputSwitched mode power supply feedback voltage sense
VSSSMPSSupply inputSwitched mode power supply ground
VDDLDOSupply inputVoltage regulator supply input
VCAPSupply input/outputDigital core domain supply, generated internally or externally provided
VREF+Supply input/outputReference voltage for ADCs and DACs
Generated internally or externally provided
VREF-Supply inputReference voltage for ADCs and DACs
VDD50USBSupply inputUSB regulator supply input
VDD33USBSupply input/outputUSB regulator supply output or external USB supply input
VSSSupply inputMain ground
PDR_ONDigital inputPower-down reset enable
PVD_INAnalog inputMonitoring of the voltage level applied to this pin
Table 33. PWR internal input/output signals
Signal nameSignal typeDescription
AHBDigital I/OAHB register interface
pwr_pvd_wkup
pwr_avd_wkup
Digital outputProgrammable voltage detector output
Analog voltage detector output
Combined as one signal provided to the EXTI
pwr_por_rstDigital outputPower-on reset
pwr_bor_rstDigital outputBrownout reset
exti_c_wkupDigital inputCPU wake-up request
exti_srd_wkupDigital inputSmartRun domain wake-up request
pwr_cd_wkupDigital outputCPU bus matrix and CPU peripherals clock wake-up request
pwr_srd_wkupDigital outputSmartRun domain bus matrix clock wake-up request
rcc_pwd_srd_reqDigital inputSmartRun domain low-power request generated by the RCC
rcc_pwd_cd_reqDigital inputCPU domain low-power request generated by the RCC

6.4 Power supplies

The device requires \( V_{DD} \) , \( V_{DDLDO} \) , \( V_{DDA} \) and \( V_{BAT} \) power supplies. Depending on the use case and when available from the package, \( V_{DDSMPS} \) , \( V_{DDMMC} \) , \( V_{DDUSB} \) , \( V_{REF+} \) and \( V_{CAP} \) independent power supplies can also be required.

The device provides regulated supplies for specific functions (SMPS step-down converter, LDO voltage regulator, USB regulator, voltage reference buffer):

This power supply is independent from all the other power supplies:

This power supply is independent from all the other power supplies.

Note: Depending on the operating power supply range, some peripherals may be used with limited features and performance. For more details, refer to section “General operating conditions” of the device datasheets.

Figure 19. Power supply overview

Power supply overview diagram showing various power domains: Core domain, VDD domain, Backup domain, and Analog domain, along with external power sources like SMPS and USB.

The diagram illustrates the power supply architecture for the microcontroller, showing the flow of power from external sources through various regulators and domains to the internal components.

Power supply overview diagram showing various power domains: Core domain, VDD domain, Backup domain, and Analog domain, along with external power sources like SMPS and USB.

MSV48169V4

By configuring the switched mode power supply (SMPS step-down converter) and the LDO voltage regulator, the supply configurations shown in Figure 20 and Figure 21 are supported for the \( V_{CORE} \) core domain and an external supply.

Note: The SMPS is not available on all packages.

Figure 20. System supply configurations for packages with SMPS

Figure 20: System supply configurations for packages with SMPS. The figure shows six sub-diagrams labeled 1 to 6, each illustrating a different power supply setup for a microcontroller. Each diagram shows the connections between VDD, SMPS, V reg (LDO), and VCORE. 1. LDO Supply: VDD connects to V reg (on) and SMPS (off). V reg (on) outputs VCORE. 2. Direct SMPS Supply: VDD connects to SMPS (on) and V reg (off). SMPS (on) outputs VCORE. 3. SMPS supplies LDO (No External supply): VDD connects to SMPS (on) and V reg (on). SMPS (on) outputs VCORE and also supplies V reg (on). 4. External SMPS supply, supplies LDO: VDDExtern connects to SMPS (on) and V reg (on). SMPS (on) outputs VCORE and also supplies V reg (on). 5. External SMPS Supply & Bypass: VDDExtern connects to SMPS (on) and Ext reg. SMPS (on) outputs VCORE and also supplies Ext reg. Ext reg outputs VCORE. 6. Bypass: External supply connects to VCORE and V reg (off).
Figure 20: System supply configurations for packages with SMPS. The figure shows six sub-diagrams labeled 1 to 6, each illustrating a different power supply setup for a microcontroller. Each diagram shows the connections between VDD, SMPS, V reg (LDO), and VCORE. 1. LDO Supply: VDD connects to V reg (on) and SMPS (off). V reg (on) outputs VCORE. 2. Direct SMPS Supply: VDD connects to SMPS (on) and V reg (off). SMPS (on) outputs VCORE. 3. SMPS supplies LDO (No External supply): VDD connects to SMPS (on) and V reg (on). SMPS (on) outputs VCORE and also supplies V reg (on). 4. External SMPS supply, supplies LDO: VDDExtern connects to SMPS (on) and V reg (on). SMPS (on) outputs VCORE and also supplies V reg (on). 5. External SMPS Supply & Bypass: VDDExtern connects to SMPS (on) and Ext reg. SMPS (on) outputs VCORE and also supplies Ext reg. Ext reg outputs VCORE. 6. Bypass: External supply connects to VCORE and V reg (off).

1. The numbers mentioned above correspond to steps described in Table 34: Supply configuration control .

Note: For cases 3 to 5, the SMPS output is set to 1.2 V during the startup phase and to 1.8 V or 2.5 V at code execution start (refer to PWR control register 3 (PWR_CR3) ). The different supply configurations are controlled through the LDOEN, SMPSEN, SMPSEXTHP, SMPSLEVEL and BYPASS bits in the PWR control register 3 (PWR_CR3) , according to Table 34 .

Figure 21. System supply configurations for packages without SMPS

Figure 21 shows two system supply configurations for packages without SMPS. Configuration 1, labeled '1. LDO Supply', shows VDD connected to VCAP and VDD. VCAP is connected to VSS and VCORE. VSS is connected to VDD. A 'V reg (on)' block is connected to VCAP, VSS, and VDD. Configuration 6, labeled '6. Bypass', shows an 'External supply' connected to VCAP and VDD. VCAP is connected to VSS and VCORE. VSS is connected to VDD. A 'V reg (off)' block is connected to VCAP, VSS, and VDD.
Figure 21 shows two system supply configurations for packages without SMPS. Configuration 1, labeled '1. LDO Supply', shows VDD connected to VCAP and VDD. VCAP is connected to VSS and VCORE. VSS is connected to VDD. A 'V reg (on)' block is connected to VCAP, VSS, and VDD. Configuration 6, labeled '6. Bypass', shows an 'External supply' connected to VCAP and VDD. VCAP is connected to VSS and VCORE. VSS is connected to VDD. A 'V reg (off)' block is connected to VCAP, VSS, and VDD.

1. The numbers mentioned above correspond to steps described in Table 34: Supply configuration control .

Table 34. Supply configuration control

IDSupply configurationSMPSLEVELSMPSEXTHPSMPSENLDOENBYPASSDescription
0Startup configuration000110
  • Configuration during power-up phase (not a user config)
  • V CORE power domains supplied from the LDO (VOS3, 1 V)
  • SMPS enabled at 1.2 V
1LDO supplyxx010
  • V CORE power domains are supplied from the LDO according to VOS.
  • LDO power mode (Main, LP, Off) follows system low-power modes.
  • SMPS disabled
2Direct SMPS step-down converter supplyx0100
  • V CORE power domains are supplied from the SMPS according to VOS.
  • LDO bypassed
  • SMPS step-down converter power mode (MR, LP, Off) follows system low-power modes.

Table 34. Supply configuration control (continued)

IDSupply configurationSMPSLEVELSMPSXTHPSMPSNLDOENBYPASSDescription
3SMPS step-down converter supplies LDO01 or 100110
  • – V CORE power domains are supplied from the LDO according to VOS.
  • – LDO power mode (Main, LP, Off) follows system low-power modes.
  • – SMPS step-down converter is enabled according to SMPSLEVEL and supplies the LDO.
  • – SMPS power mode (MR, LP or Off) follows the system low-power mode.
4SMPS step-down converter supplies external and LDO01 or 101110
  • – V CORE power domains are supplied from voltage regulator according to VOS
  • – LDO power mode (Main, LP, Off) follows system low-power modes.
  • – SMPS step-down converter is enabled according to SMPSLEVEL. It is used to supply external circuits and may supply the LDO.
  • – SMPS step-down converter is forced ON in MR mode
5SMPS step-down converter supplies external and LDO Bypass01 or 101101
  • – V CORE supplied from external source
  • – SMPS step-down converter is enabled according to SMPSLEVEL. It is used to supply external circuits and may supply the external source for V CORE .
  • – SMPS step-down converter is forced ON in MR mode
6SMPS step-down converter disabled and LDO Bypassxx001
  • – V CORE supplied from external source
  • – SMPS step-down converter is disabled and LDO bypassed, voltage monitoring is still active
NAIllegalxxx000If an illegal combination is written, the default configuration is kept (startup configuration, writing ignored) and a power-on reset (POR) is required before writing a new combination.
xxxx11
xx0101
00x110
xx1100
001101

6.4.1 System supply startup

The system startup sequence from power-on in different supply configurations is the following (see Figure 22 for LDO supply and Figure 25 for direct SMPS supply):

  1. 1. When the system is powered on, the POR monitors the \( V_{DD} \) supply. Once \( V_{DD} \) is above the POR threshold level, the SMPS step-down converter and the LDO voltage regulator are enabled in the default supply configuration:
  2. 2. The system is kept in reset mode as long as \( V_{CORE} \) is not correct.
  3. 3. Once \( V_{CORE} \) is correct, the system is taken out of reset and the HSI oscillator is enabled.
  4. 4. Once the oscillator is stable, the system is initialized: flash memory and option bytes are loaded and the CPU starts in limited run mode (Run*).
  5. 5. The software must then initialize the system including supply configuration programming in PWR control register 3 (PWR_CR3) . Once the supply configuration has been configured, the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) must be checked to guarantee valid voltage levels:
    1. a) As long as ACTVOSRDY indicates that voltage levels are invalid, the system is in Run* mode: write accesses to the RAMs are not permitted and VOS must not be changed.
    2. b) Once ACTVOSRDY indicates that voltage levels are valid, the system is in normal Run mode. Write accesses to RAMs are allowed and VOS can be changed.

Startup with \( V_{CORE} \) supplied from the LDO voltage regulator

When \( V_{CORE} \) is supplied from the voltage regulator (LDO), the \( V_{CORE} \) voltage settles directly at VOS3 level. However the SMPS \( V_{FBSMPS} \) output voltage is set at 1.2 V. The ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) indicates that the voltage levels are invalid.

The software must program the supply configuration in PWR control register 3 (PWR_CR3) . In addition, the \( V_{FBSMPS} \) voltage level must reach the programmed SMPSLEVEL so that ACTVOSRDY indicates a valid voltage level (see Figure 22 ).

Figure 22. Device startup with V CORE supplied from LDO voltage regulator Timing diagram showing device startup with VCORE supplied from LDO voltage regulator. The diagram tracks voltage levels (VDD, VFBSMPS, VDDLDO, VCORE), logic signals (rst_por, ACTVOSRDY, VOSRDY, BYPASS, LDOEN, SMPSEN), and the system clock (ck_sys) across different operating modes and supply configurations.
Operating modePower downResetWait oscillatorHW system InitRun *Wait ACTVOS RDYRun
Supply configurationDefault configurationSMPS supplies LDO

Timeline markers: (1), (2), (3), (4), (5a) (1) , (5b) (2)

MSV48171V1

Timing diagram showing device startup with VCORE supplied from LDO voltage regulator. The diagram tracks voltage levels (VDD, VFBSMPS, VDDLDO, VCORE), logic signals (rst_por, ACTVOSRDY, VOSRDY, BYPASS, LDOEN, SMPSEN), and the system clock (ck_sys) across different operating modes and supply configurations.
  1. 1. In Run* mode, write operations to RAM are not allowed.
  2. 2. Write operations to RAM are allowed and VOS can be changed only when ACTVOSRDY is valid.

When exiting from Standby mode, the supply configuration is known by the system since the content of the PWR control register 3 (PWR_CR3) is retained. However the software must still wait for the ACTVOSRDY bit to be set in PWR control status register 1 (PWR_CSR1) to indicate V CORE voltage levels are valid, before performing write accesses to RAM or changing VOS.

Startup with V CORE supplied directly from the SMPS step-down converter

When V CORE is supplied directly from the SMPS step-down converter, the V CORE voltage first settles at the SMPS V FBSMPS default level (1.2 V). Due to a too high supply compared to the VOS3 level, the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) indicates an invalid voltage levels. V CORE settles at 1.0 V (VOS3 level) and ACTVODSRDY indicates a valid voltage levels only when the supply configuration has been programmed in PWR control register 3 (PWR_CR3) (see Figure 5).

Figure 23. Device startup with\( V_{CORE} \) supplied from SMPS Timing diagram showing device startup with V_CORE supplied from SMPS. The diagram illustrates the sequence of events from power down to run mode, including voltage levels for VDD, VDDSMPS, VFB SMPS, VDD LDO, and V_CORE, as well as status signals like rst_por, ACTVOSRDY, and VOSRDY. It also shows the operating mode transitions and supply configuration changes.

The timing diagram illustrates the device startup sequence when \( V_{CORE} \) is supplied from an SMPS. The diagram is divided into several horizontal tracks representing different signals and system states over time, marked by vertical dashed lines (1) through (5b).

Timing diagram showing device startup with V_CORE supplied from SMPS. The diagram illustrates the sequence of events from power down to run mode, including voltage levels for VDD, VDDSMPS, VFB SMPS, VDD LDO, and V_CORE, as well as status signals like rst_por, ACTVOSRDY, and VOSRDY. It also shows the operating mode transitions and supply configuration changes.

1. In Run* mode, write operations to RAM are not allowed.

2. Write operations to RAM are allowed and VOS can be changed only when ACTVOSRDY is valid.

Startup with \( V_{CORE} \) provided from an external supply (Bypass)

Once \( V_{DD} \) is above the POR threshold level, the voltage regulator is enabled and sets the output level provided to the core domain to 1.0 V.

For this reason, the external supply provided to the core domain needs to be available before the internal voltage converter starts, to insure the voltage converter output stays switched off.

At code execution start, the voltage converter is switched off.

When the LDO is disabled, the external \( V_{CORE} \) voltage can be adjusted according to the user application needs (refer to section General operating conditions of the datasheet for details on \( V_{CORE} \) level versus the maximum operating frequency).

Figure 24. Device startup with V CORE supplied in Bypass mode from external regulator

Timing diagram showing device startup sequence. It includes signals for VDD, pwr_por_rst, V_CORE supplied externally, Operating mode, ck_sys, Supply configuration, BYPASS, LDOEN, and SDEN. The diagram shows the transition from Power down to Run mode, with a POR threshold and Min V12 at startup 1.1V indicated. The supply configuration changes from Default configuration to BYPASS mode during the Run* phase.

The timing diagram illustrates the startup sequence of the device. The signals shown are:

Timing diagram showing device startup sequence. It includes signals for VDD, pwr_por_rst, V_CORE supplied externally, Operating mode, ck_sys, Supply configuration, BYPASS, LDOEN, and SDEN. The diagram shows the transition from Power down to Run mode, with a POR threshold and Min V12 at startup 1.1V indicated. The supply configuration changes from Default configuration to BYPASS mode during the Run* phase.

MSV63817V2

How to exit from Run* mode

As the Run* mode does not allow accessing RAM, PWR configuration must be done in the startup file. Below an example of code for SMPS supply that can be adapted for any other mode:

;///////////////////////////
;;
;; Exit Run* mode to Direct SMPS mode
;;

    THUMB
    PUBWEAK ExitRun0ModeToDirectSMPSMode
    SECTION .text:CODE:NOROOT:REORDER(1)
ExitRun0ModeToDirectSMPSMode
    MOV     R1, #0x4804
    MOVT    R1, #0x5802
    LDR     R0, [R1, #+8]
    BIC     R0, R0, #0x2
    STR     R0, [R1, #+8]
wait_actvosrdy:
    
    LDR      R2, [R1, #+0]
    LSLS     R0, R2, #+18
    BPL.N    wait_actvosrdy
    BX       LR

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Default interrupt handlers.
    ;;
    THUMB
    PUBWEAK Reset_Handler
    SECTION .text:CODE:NOROOT:REORDER(2)
Reset_Handler
    LDR      R0, =ExitRun0ModeToDirectSMPSMode
    BLX      R0
    LDR      R0, =SystemInit
    BLX      R0
    LDR      R0, =__iar_program_start
    BX       R0

6.4.2 Core domain

The \( V_{CORE} \) core domain supply can be provided by the SMPS step-down converter, by the LDO voltage regulator or by an external supply (through the VCAP pads). \( V_{CORE} \) supplies all the digital circuitries except for the Backup domain and the Standby circuitry. The \( V_{CORE} \) domain is split into two sections:

When a power-on reset occurs, the voltage regulator is enabled and supplies \( V_{CORE} \) . The SMPS is also enabled to deliver 1.2 V. This allows the system to start up in any supply configurations (see Figure 20 ).

After a power-on reset, the software must configure the used supply configuration in the PWR control register 3 (PWR_CR3) before changing VOS in the PWR SmartRun domain control register (PWR_SRDCR) or the RCC ck_sys frequency. The different system supply configurations are controlled as shown in Table 34 .

Note: The SMPS is not available on all packages.

6.4.3 Voltage regulators

Embedded LDO voltage regulator

The embedded voltage regulator (LDO) requires external capacitors to be connected to VCAP pins.

The LDO voltage regulator provides three different operating modes: Main (MR), Low-power (LP) or Off. These modes are used depending on the system operating modes (Run, Stop and Standby). They are configured through the associated VOS and SVOS levels.

Embedded SMPS step-down converter

The switched mode power supply (SMPS) requires an external coil to be connected between the dedicated VLXSMPS pin and VSS via a capacitor.

The SMPS step-down converter can be used in internal supply mode or external supply mode. The internal supply mode is used to directly supply the \( V_{CORE} \) domain, while the external supply mode is used to generate an intermediate supply level ( \( V_{DD\_extern} \) at 1.8 or 2.5 V) that can supply the voltage regulator and optionally an external circuitry.

The SMPS works in three different power modes: Main (MR), Low-power (LP) or Off.

When the SMPS is used in internal supply mode, the converter operating modes depend on the system modes (Run, Stop, Standby) and are configured through the associated VOS and SVOS levels.

When the SMPS supplies an external circuitry by generating an intermediate voltage level, the converter is forced ON and operates in MR mode. The intermediate voltage level is selected through SMPSLEVEL bits in the PWR control register 3 (PWR_CR3) . \( V_{DD\_extern} \) is supplied at all times with full power whatever the system modes (Run, Stop, Standby).

Embedded voltage regulator operating modes

There are three different power modes:

The voltage regulator (LDO or SMPS) operates in MR mode and provides full power to the \( V_{CORE} \) domain (core, memories and digital peripherals). The regulator output voltage (LDO or SMPS) can be scaled by software to different voltage levels (VOS0, VOS1, VOS2, and VOS3) that are configured through the VOS bits in the PWR SmartRun domain control register (PWR_SRDCR) . The VOS voltage scaling allows optimizing the power consumption when the system is clocked below the maximum frequency. By default VOS3 is selected after system reset. VOSx bits can be changed on-the-fly to adapt to the required system performance (see Table 35: Operating mode summary ).

The voltage regulator (LDO or SMPS) supplies the \( V_{CORE} \) domain to retain the content of registers and internal memories. The regulator can be kept in MR mode to allow fast exit from Stop mode or can be set in LP mode to achieve a lower \( V_{CORE} \) supply level but an extended exit-from-Stop latency.

The regulator mode is selected through the SVOS and LPDS bits in the PWR control register 1 (PWR_CR1) . MR mode or LP mode are allowed if SVOS3 voltage scaling is selected, while only LP mode is possible for SVOS4 and SVOS5 scaling.

Stop mode power consumption can be further reduced using SVO4 (lower voltage level than VOS3) and even further with SVOS5.

The regulator (LDO or SMPS) is OFF and the \( V_{CORE} \) domains are powered down. The content of the registers and memories are lost except for the Standby circuitry and the Backup domain.

Note: For more details, refer to the Voltage regulator section of the product datasheets.

6.4.4 PWR external supply

When \( V_{CORE} \) is supplied from an external source (Bypass mode), different operating modes can be used depending on the system operating modes (Run, Autonomous, Stop or Standby):

The external source supplies full power to the \( V_{CORE} \) domain (core, memories and digital peripherals). The external source output voltage is scalable through different voltage levels ( \( V_{OS0} \) , \( V_{OS1} \) , \( V_{OS2} \) and \( V_{OS3} \) ). The externally applied voltage level must be reflected in the \( V_{OSx} \) bits in the PWR SmartRun domain control register (PWR_SRDCR) . The RAMs must only be accessed for write operations and the flash memory for read operations when the external applied voltage level matches \( V_{OS} \) settings.

The external source supplies \( V_{CORE} \) domain to retain the content of registers and internal memories. The regulator can select a lower \( V_{CORE} \) supply level to reduce the consumption in Stop mode.

The external source must be switched OFF and the \( V_{CORE} \) domains powered down. The content of registers and memories is lost except for the Standby circuitry and the Backup domain. The external source must be switched ON when exiting Standby mode.

Care must be taken that all the current operations and transfers are completed before entering Standby and switching OFF the external source.

6.4.5 Backup domain

To retain the content of the Backup domain (RTC, backup registers and backup RAM) when \( V_{DD} \) is turned off, \( V_{BAT} \) pin can be connected to an optional voltage that is supplied from a battery or from another source.

The switching to \( V_{BAT} \) is controlled by the power-down reset embedded in the reset block that monitors the \( V_{DD} \) supply.


Warning: During \( t_{RSTTEMPO} \) (temporization at \( V_{DD} \) startup) or after a PDR is detected, the power switch between \( V_{BAT} \) and \( V_{DD} \) remains connected to \( V_{BAT} \) .

During the startup phase, if \( V_{DD} \) is established in less than \( t_{RSTTEMPO} \) (see the datasheet for the value of \( t_{RSTTEMPO} \) ) and \( V_{DD} > V_{BAT} + 0.6 \) V, a current may be injected into \( V_{BAT} \) pin through an internal diode connected between \( V_{DD} \) and the power switch ( \( V_{BAT} \) ).

If the power supply/battery connected to the \( V_{BAT} \) pin cannot support this current injection, it is strongly recommended to connect an external low-drop diode between this power supply and the \( V_{BAT} \) pin.


When the \( V_{DD} \) supply is present, the Backup domain is supplied from \( V_{DD} \) . This allows saving \( V_{BAT} \) power supply battery life time.

If no external battery is used in the application, it is recommended to connect \( V_{BAT} \) externally to \( V_{DD} \) through a 100 nF external ceramic capacitor.

When the \( V_{DD} \) supply is present and higher than the PDR threshold, the Backup domain is supplied by \( V_{DD} \) and the following functions are available:

Note: Since the switch only sinks a limited amount of current, the use of PC13 to PC15 and PI8 GPIOs is restricted: only one I/O can be used as an output at a time, at a speed limited to 2 MHz with a maximum load of 30 pF. These I/Os must not be used as current sources (e.g. to drive an LED).

In \( V_{BAT} \) mode, when the \( V_{DD} \) supply is absent and a supply is present on \( V_{BAT} \) , the Backup domain is supplied by \( V_{BAT} \) and the following functions are available:

Accessing the Backup domain

After reset, the Backup domain (RTC registers and RTC backup registers) is protected against possible unwanted write accesses. To enable access to the Backup domain, set the DBP bit in the PWR control register 1 (PWR_CR1) .

For more detail on RTC and backup RAM access, refer to Section 8: Reset and clock control (RCC) .

Backup RAM

The Backup domain includes 4 Kbytes of backup RAM accessible in 32-, 16- or 8-bit data mode. The backup RAM is supplied from the backup regulator in the Backup domain. When the backup regulator is enabled through BREN bit in the PWR control register 2 (PWR_CR2) , the backup RAM content is retained even in Standby and/or \( V_{BAT} \) mode (it can be considered as an internal EEPROM if \( V_{BAT} \) is always present).

The backup regulator can be ON or OFF depending whether the application needs the backup RAM function in Standby or \( V_{BAT} \) modes.

The backup RAM is not mass erased by a tamper event, instead it is read protected to prevent confidential data, such as cryptographic private key, from being accessed. To re-

gain access to the backup RAM after a tamper event, the memory area needs to be first erased. The backup RAM can be erased in the two following ways:

Figure 25. Backup domain

Figure 25. Backup domain diagram showing the internal architecture of the backup domain. It includes a VBAT battery, a VDD supply, a VSW switch, a Voltage regulator, a VCORE domain, a Backup domain, a Backup RAM, an RTC, an LSE, and Backup IOs. The diagram shows the flow of power and signals between these components.

The diagram illustrates the internal architecture of the backup domain. On the left, external power sources V BAT (battery) and V DD are connected to a switch labeled V SW . Below this, V DDLDO and V CAP are connected to a 'Voltage regulator'. The 'Voltage regulator' output is connected to the 'VCORE domain' (a large grey box on the left) and also to the 'Backup domain' (a large grey box on the right). Inside the 'VCORE domain', there is a 'Backup interface' block. Inside the 'Backup domain', there is a 'Backup RAM', an 'RTC' (Real-Time Clock), and an 'LSE' (Low-Speed External) oscillator. A 'Backup regulator' is also shown within the 'Backup domain', connected to the 'Backup RAM' and 'Backup IOs'. The 'Backup interface' in the VCORE domain is connected to the 'Backup RAM' and 'RTC' in the Backup domain. The 'Backup IOs' are connected to the 'Backup RAM' and 'LSE'.

Figure 25. Backup domain diagram showing the internal architecture of the backup domain. It includes a VBAT battery, a VDD supply, a VSW switch, a Voltage regulator, a VCORE domain, a Backup domain, a Backup RAM, an RTC, an LSE, and Backup IOs. The diagram shows the flow of power and signals between these components.

6.4.6 V BAT battery charging

When V DD is present, the external battery connected to V BAT can be charged through an internal resistance.

V BAT charging can be performed either through a 5 kΩ resistor or through a 1.5 kΩ resistor, depending on the VBRS bit value in PWR control register 3 (PWR_CR3) .

The battery charging is enabled by setting the VBE bit in PWR control register 3 (PWR_CR3) . It is automatically disabled in V BAT mode.

6.4.7 Analog supply

Separate V DDA analog supply

The analog supply domain is powered by dedicated V DDA and V SSA pads that allow the supply to be filtered and shielded from noise on the PCB, thus improving ADC and DAC conversion accuracy:

Analog reference voltage \( V_{REF+}/V_{REF-} \)

To achieve better accuracy low-voltage signals, the ADC and DAC have a separate reference voltage, available on \( V_{REF+} \) pin. The user can connect a separate external reference voltage on \( V_{REF+} \) pin.

The \( V_{REF+} \) controls the highest voltage, represented by the full scale value, the lower voltage reference ( \( V_{REF-} \) ) being connected to \( V_{SSA} \) pin.

When enabled by ENVR bit in the VREFBUF control and status register (see Section 30: Voltage reference buffer (VREFBUF) ), \( V_{REF+} \) is provided from the internal voltage reference buffer. The internal voltage reference buffer can also deliver a reference voltage to external components through \( V_{REF+} \) pin.

When the internal voltage reference buffer is disabled by ENVR, \( V_{REF+} \) needs to be delivered by an independent external reference supply voltage or connected with \( V_{DDA} \) .

Note:
The \( V_{REF+} \) and \( V_{REF-} \) pins are not available on all packages (connected internally respectively to \( V_{DDA} \) and \( V_{SSA} \) ).
Do not enable the internal voltage reference buffer when an external power supply is applied to the \( V_{REF+} \) pin.

6.4.8 USB regulator

The USB transceiver is supplied from a dedicated \( V_{DD33USB} \) supply that can be provided either by the integrated USB regulator or by an external USB supply.

When enabled by USBREGEN bit in PWR control register 3 (PWR_CR3) , the \( V_{DD33USB} \) is provided from the USB regulator. Before using \( V_{DD33USB} \) , check that it is available by monitoring USB33RDY bit in PWR control register 3 (PWR_CR3) . The \( V_{DD33USB} \) supply level detector must be enabled through USB33DEN bit in PWR control register 3 (PWR_CR3) .

When the USB regulator is disabled through USBREGEN bit, \( V_{DD33USB} \) can be provided from an external supply. In this case \( V_{DD33USB} \) and \( V_{DD50USB} \) must be connected together.

For more information on the USB regulator (see Section 62: USB on-the-go high-speed (OTG_HS) ).

Figure 26. USB supply configurations

Figure 26 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator (ON) connected to VDD33USB and VDD50USB pins. The right diagram, labeled 'External USB supply', shows an external USB supply connected to VDD33USB and VDD50USB pins, with the USB regulator (Bypass) connected to VDD30 and VSS pins.

The diagram illustrates two power supply configurations for a USB transceiver. On the left, labeled 'USB regulator supply', an internal USB regulator (ON) is shown. It has input pins for \( V_{DD33USB} \) and \( V_{DD50USB} \) . A capacitor is connected between \( V_{DD50USB} \) and \( V_{SS} \) . The regulator output feeds into the system. On the right, labeled 'External USB supply', the internal USB regulator is in 'Bypass' mode. External supplies for \( V_{DD30} \) and \( V_{DD50USB} \) are connected. Specifically, \( V_{DD30} \) is tied to the \( V_{DD33USB} \) line, and \( V_{DD50USB} \) is also connected to that same line. A capacitor is connected between \( V_{DD50USB} \) and \( V_{SS} \) .

Figure 26 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator (ON) connected to VDD33USB and VDD50USB pins. The right diagram, labeled 'External USB supply', shows an external USB supply connected to VDD33USB and VDD50USB pins, with the USB regulator (Bypass) connected to VDD30 and VSS pins.

6.5 Power supply supervision

Power supply level monitoring is available on the following supplies:

6.5.1 Power-on reset (POR)/power-down reset (PDR)

The system has an integrated POR/PDR circuitry that ensures proper startup operation.

The system remains in Reset mode when \( V_{DD} \) is below a specified \( V_{POR} \) threshold, without the need for an external reset circuit. Once the \( V_{DD} \) supply level is above the \( V_{POR} \) threshold, the system is taken out of reset (see Figure 27 ). For more details concerning the power-on/power-down reset threshold, refer to the electrical characteristics section of the datasheets.

The POR/PDR can be enabled/disabled by the device PDR_ON input pin.

Figure 27. Power-on reset/power-down reset waveform

Figure 27: Power-on reset/power-down reset waveform. The graph shows the supply voltage VDD (Y-axis) versus time T (X-axis). The voltage rises linearly from 0V to a peak value and then falls linearly back to 0V. Two horizontal dashed lines represent the Power-On Reset (POR) threshold and the Power-Down Reset (PDR) threshold. The POR threshold is higher than the PDR threshold. The vertical distance between these two thresholds is labeled 'Hysteresis'. A horizontal arrow labeled 'Temporisation TRSTTEMPO' indicates the time interval between the moment the voltage crosses the POR threshold and the moment the reset signal pwr_por_rst goes low. The pwr_por_rst signal is shown as a step function that is high (active reset) until the voltage crosses the POR threshold, at which point it goes low (inactive reset). The signal remains low until the voltage falls below the PDR threshold, at which point it goes high again. The figure is labeled MSV40340V2 in the bottom right corner.
Figure 27: Power-on reset/power-down reset waveform. The graph shows the supply voltage VDD (Y-axis) versus time T (X-axis). The voltage rises linearly from 0V to a peak value and then falls linearly back to 0V. Two horizontal dashed lines represent the Power-On Reset (POR) threshold and the Power-Down Reset (PDR) threshold. The POR threshold is higher than the PDR threshold. The vertical distance between these two thresholds is labeled 'Hysteresis'. A horizontal arrow labeled 'Temporisation TRSTTEMPO' indicates the time interval between the moment the voltage crosses the POR threshold and the moment the reset signal pwr_por_rst goes low. The pwr_por_rst signal is shown as a step function that is high (active reset) until the voltage crosses the POR threshold, at which point it goes low (inactive reset). The signal remains low until the voltage falls below the PDR threshold, at which point it goes high again. The figure is labeled MSV40340V2 in the bottom right corner.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.2 Brownout reset (BOR)

During power-on, the brownout reset (BOR) keeps the system under reset until the \( V_{DD} \) supply voltage reaches the specified \( V_{BOR} \) threshold.

The \( V_{BOR} \) threshold is configured through system option bytes. By default, BOR is OFF. The following programmable \( V_{BOR} \) thresholds can be selected:

For more details on the brownout reset thresholds, refer to the section “Electrical characteristics” of the product datasheets.

A system reset is generated when the BOR is enabled and \( V_{DD} \) supply voltage drops below the selected \( V_{BOR} \) threshold.

BOR can be disabled by programming the system option bytes. To disable the BOR function, \( V_{DD} \) must have been higher than the POR threshold to start the system option byte programming sequence. The power-down is then monitored by the PDR (see Section 6.5.1 ).

Figure 28. BOR thresholds

Figure 28. BOR thresholds. A graph showing the relationship between supply voltage VDD and time T, and the resulting brownout reset signal pwr_bor_rst. The VDD curve rises to a peak and then falls. The BORrise threshold is the voltage level at which the reset is released during the rising phase. The BORfall threshold is the voltage level at which the reset is generated during the falling phase. The hysteresis is the voltage difference between BORrise and BORfall. The pwr_bor_rst signal is shown as a digital signal that is low (active) when VDD is below BORfall and high (inactive) when VDD is above BORrise.

The figure is a graph illustrating the Brownout Reset (BOR) thresholds. The vertical axis represents the supply voltage \( V_{DD} \) and the horizontal axis represents time \( T \) . The \( V_{DD} \) curve shows a power-on ramp, a steady-state plateau, and a power-down ramp. Two horizontal dashed lines represent the BOR thresholds: \( BOR_{rise} \) (higher threshold) and \( BOR_{fall} \) (lower threshold). The vertical distance between these two thresholds is labeled "Hysteresis". Below the graph, a digital signal labeled \( pwr\_bor\_rst \) is shown. This signal is initially high (inactive). When \( V_{DD} \) rises and crosses the \( BOR_{rise} \) threshold, the signal goes low (active). When \( V_{DD} \) falls and crosses the \( BOR_{fall} \) threshold, the signal goes high (inactive) again. The signal remains high as \( V_{DD} \) continues to fall. A small text "MSV40341V2" is visible in the bottom right corner of the graph area.

Figure 28. BOR thresholds. A graph showing the relationship between supply voltage VDD and time T, and the resulting brownout reset signal pwr_bor_rst. The VDD curve rises to a peak and then falls. The BORrise threshold is the voltage level at which the reset is released during the rising phase. The BORfall threshold is the voltage level at which the reset is generated during the falling phase. The hysteresis is the voltage difference between BORrise and BORfall. The pwr_bor_rst signal is shown as a digital signal that is low (active) when VDD is below BORfall and high (inactive) when VDD is above BORrise.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.3 Programmable voltage detector (PVD)

The PVD can be used to monitor the \( V_{DD} \) power supply by comparing it to a threshold selected by the PLS[2:0] bits in the PWR control register 1 (PWR_CR1) . The PVD can also be used to monitor a voltage level on the PVD_IN pin. In this case PVD_IN voltage is compared to the internal VREFINT level.

The PVD is enabled by setting the PVDE bit in PWR control register 1 (PWR_CR1) .

A PVDO flag is available in the PWR control status register 1 (PWR_CSR1) to indicate if \( V_{DD} \) or PVD_IN voltage is higher or lower than the PVD threshold. This event is internally connected to the EXTI and can generate an interrupt, provided it has been enabled through the EXTI registers. The rising/falling edge sensitivity of the EXTI line must be configured according to PVD output behavior, i.e. if the EXTI line is configured to rising edge sensitivity, the interrupt is generated when \( V_{DD} \) or PVD_IN voltage drops below the PVD threshold. As an example, the service routine could perform emergency shutdown.

Figure 29. PVD thresholds

Figure 29. PVD thresholds. A graph showing the relationship between VDD or PVD_IN voltage and time (T). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the PVDrise and PVDfall thresholds. The vertical distance between these lines is labeled 'Hysteresis'. Below the graph, two timing diagrams show the PVDO and PVDEN signals. PVDO is high when the voltage is above PVDrise and low when it is below PVDfall. PVDEN is high after 'SW enable' and low after 'PDR reset'.

The figure illustrates the PVD threshold behavior over time. The top graph plots \( V_{DD} \) or PVD_IN voltage against time (T). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the PVDrise and PVDfall thresholds. The vertical distance between these lines is labeled 'Hysteresis'. Below the graph, two timing diagrams show the PVDO and PVDEN signals. PVDO is high when the voltage is above PVDrise and low when it is below PVDfall. PVDEN is high after 'SW enable' and low after 'PDR reset'.

Figure 29. PVD thresholds. A graph showing the relationship between VDD or PVD_IN voltage and time (T). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the PVDrise and PVDfall thresholds. The vertical distance between these lines is labeled 'Hysteresis'. Below the graph, two timing diagrams show the PVDO and PVDEN signals. PVDO is high when the voltage is above PVDrise and low when it is below PVDfall. PVDEN is high after 'SW enable' and low after 'PDR reset'.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.4 Analog voltage detector (AVD)

The AVD can be used to monitor the \( V_{DDA} \) supply by comparing it to a threshold selected by the ALS[1:0] bits in the PWR control register 1 (PWR_CR1) .

The AVD is enabled by setting the AVDEN bit in PWR control register 1 (PWR_CR1) .

An AVDO flag is available in the PWR control status register 1 (PWR_CSR1) to indicate whether \( V_{DDA} \) is higher or lower than the AVD threshold. This event is internally connected to the EXTI and can generate an interrupt if enabled through the EXTI registers. The AVDO interrupt can be generated when \( V_{DDA} \) drops below the AVD threshold and/or when \( V_{DDA} \) rises above the AVD threshold depending on EXTI rising/falling edge configuration. As an example the service routine could indicate when the \( V_{DDA} \) supply drops below a minimum level.

Figure 30. AVD thresholds

Figure 30. AVD thresholds. A timing diagram showing the relationship between V_DDA supply voltage, AVDO output, and AVDEN control signal over time (T).

The figure is a timing diagram illustrating the operation of the Analog Voltage Detector (AVD). The top graph shows the \( V_{DDA} \) supply voltage (Y-axis) versus time (X-axis). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the AVD threshold levels: \( AVDrise \) (higher threshold) and \( AVDfall \) (lower threshold). The vertical distance between these two thresholds is labeled 'Hysteresis'. Below the graph, two digital signals are shown: AVDO and AVDEN. The AVDO signal is high when \( V_{DDA} \) is below the \( AVDfall \) threshold and low otherwise. The AVDEN signal is shown being set high by 'SW enable' and low by 'SW disable' at the start and end of the measurement period, respectively. The diagram is labeled MSV40343V1 in the bottom right corner.

Figure 30. AVD thresholds. A timing diagram showing the relationship between V_DDA supply voltage, AVDO output, and AVDEN control signal over time (T).

6.5.5 Battery voltage thresholds

In \( V_{BAT} \) mode, the battery voltage supply (RTC domain) can be monitored by comparing it with two threshold levels: \( V_{BAThigh} \) and \( V_{BATlow} \) . The \( V_{BAT} \) supply monitoring can be enabled/disabled via MONEN bit in PWR control register 2 (PWR_CR2) . When it is enabled, the battery voltage thresholds increase power consumption.

\( V_{BATH} \) and \( V_{BATL} \) can trigger an internal tamper event (see Section 51: Tamper and backup registers (TAMP) ).

Figure 31. \( V_{BAT} \) thresholds

Figure 31. VBAT thresholds. A graph showing VBAT voltage over time (T) with two threshold levels, VBATHigh and VBATlow. Below the graph, two digital signals, VBATH and VBATL, show their states relative to the thresholds.

The figure illustrates the relationship between battery voltage ( \( V_{BAT} \) ) and two monitoring thresholds ( \( V_{BATHigh} \) and \( V_{BATlow} \) ) over time ( \( T \) ). The top graph shows \( V_{BAT} \) rising from a low level, crossing \( V_{BATlow} \) and then \( V_{BATHigh} \) , reaching a peak, and then falling back down, crossing \( V_{BATHigh} \) and then \( V_{BATlow} \) . Vertical dashed lines mark these crossing points. Below the graph, two digital signals are shown: \( V_{BATH} \) (Battery Voltage High) and \( V_{BATL} \) (Battery Voltage Low). \( V_{BATH} \) is initially low and goes high when \( V_{BAT} \) crosses \( V_{BATHigh} \) on the rising edge, returning to low when \( V_{BAT} \) crosses \( V_{BATHigh} \) on the falling edge. \( V_{BATL} \) is initially high and goes low when \( V_{BAT} \) crosses \( V_{BATlow} \) on the rising edge, returning to high when \( V_{BAT} \) crosses \( V_{BATlow} \) on the falling edge. The diagram includes hysteresis, indicated by the gap between the rising and falling threshold levels for each signal. The identifier MSV40344V1 is present in the bottom right corner of the diagram area.

Figure 31. VBAT thresholds. A graph showing VBAT voltage over time (T) with two threshold levels, VBATHigh and VBATlow. Below the graph, two digital signals, VBATH and VBATL, show their states relative to the thresholds.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.6 Temperature thresholds

A dedicated temperature sensor cell is embedded in the power control. The junction temperature can be monitored by comparing it with two threshold levels, \( TEMP_{high} \) and \( TEMP_{low} \) . TEMPH and TEMPL flags in the PWR control register 2 (PWR_CR2) , indicate whether the device temperature is higher or lower than the threshold. The temperature monitoring can be enabled/disabled via MONEN bit in PWR control register 2 (PWR_CR2) . When enabled, the temperature thresholds increase power consumption. As an example the levels may be used to trigger a routine to perform temperature control tasks.

TEMPH and TEMPL wake-up interrupts are available on the RTC tamper signals (see Section 51: Tamper and backup registers (TAMP) ).

Figure 32. Temperature thresholds

Figure 32: Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature curve rises to a peak and then falls. Two horizontal dashed lines represent the threshold levels TEMP_high and TEMP_low. Below the graph, two digital signals, TEMPH and TEMPL, are shown. TEMPH is high when the temperature is above TEMP_high and low otherwise. TEMPL is low when the temperature is below TEMP_low and high otherwise. The graph includes a label MSv40345V1 in the bottom right corner.
Figure 32: Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature curve rises to a peak and then falls. Two horizontal dashed lines represent the threshold levels TEMP_high and TEMP_low. Below the graph, two digital signals, TEMPH and TEMPL, are shown. TEMPH is high when the temperature is above TEMP_high and low otherwise. TEMPL is low when the temperature is below TEMP_low and high otherwise. The graph includes a label MSv40345V1 in the bottom right corner.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.7 \( V_{CORE} \) maximum voltage level detector

\( V_{CORE} \) is protected against too high voltages in the direct SMPS step-down converter configuration. \( V_{CORE} \) overvoltage protection is enabled at startup by hardware once the SMPS step-down converter configuration has been programmed into PWR control register 3 (PWR_CR3) . The two following configurations exist:

configuration that matches the application supply connections. The system must be power cycled.

Figure 33. \( V_{CORE} \) overvoltage protection

Figure 33: V_CORE overvoltage protection diagram. The top graph shows V_CORE vs. Time (T). The voltage starts at 1.2 V, rises to an overvoltage level, and then drops to 1.0 V. A label 'Hardware forces SMPS voltage level to 1.0 V' points to the 1.0 V level. Below the graph, three timing diagrams show: PWR_CR3 (labeled 'wrongly programmed SMPS configuration'), Overvoltage enable, and ACTVOSRDY. The PWR_CR3 signal is high during the overvoltage event. The Overvoltage enable signal is low. The ACTVOSRDY signal is high.

The figure illustrates the \( V_{CORE} \) overvoltage protection mechanism. The top graph plots \( V_{CORE} \) against time (T). The voltage starts at 1.2 V, rises to an overvoltage level, and then drops to 1.0 V. A label 'Hardware forces SMPS voltage level to 1.0 V' points to the 1.0 V level. Below the graph, three timing diagrams show: PWR_CR3 (labeled 'wrongly programmed SMPS configuration'), Overvoltage enable, and ACTVOSRDY. The PWR_CR3 signal is high during the overvoltage event. The Overvoltage enable signal is low. The ACTVOSRDY signal is high.

MSV48183V1

Figure 33: V_CORE overvoltage protection diagram. The top graph shows V_CORE vs. Time (T). The voltage starts at 1.2 V, rises to an overvoltage level, and then drops to 1.0 V. A label 'Hardware forces SMPS voltage level to 1.0 V' points to the 1.0 V level. Below the graph, three timing diagrams show: PWR_CR3 (labeled 'wrongly programmed SMPS configuration'), Overvoltage enable, and ACTVOSRDY. The PWR_CR3 signal is high during the overvoltage event. The Overvoltage enable signal is low. The ACTVOSRDY signal is high.

6.6 Power management

The power management block controls the \( V_{CORE} \) supply in accordance with the system operation modes (see Section 6.6.1 ).

The \( V_{CORE} \) domain is split into the following power domains.

The CPU and SmartRun domains can operate in one of the following operating modes (see Table 35: Operating mode summary ):

The CPU domain is a power domain that is common to the CPU, DMAs and most of the AXI, AHB and APB peripherals.

The SRD domain includes one DMA, an AHB bus matrix and some APB peripherals. The SDR domain power modes can either follow CPU subsystem modes or remain in Run mode

regardless of CPU subsystem modes. This is done by setting the RUN_SRD bit in the PWR_CPUCR register.

The CPU and system SmartRun domains are supplied from a single regulator at a common V CORE level. The V CORE supply level follows the system operating mode (Run, Stop, Standby). The CPU domain can be set in a specific retention level, known as DStop2, whereby the logic is switched off and the register contents are retained. Selection between Dstop or DStop2 is made through the RETDS_CD bit of PWR CPU control register (PWR_CPUCR) .

The content of all memories is retained in DStop and DStop2. Further power saving can be made by selectively switching off individual memory blocks. This is done by means of bits xxxSO bits of PWR control register 1 (PWR_CR1) .

The following voltage scaling features allow controlling the power with respect to the required system performance (see Section 6.6.2: Voltage scaling ):

6.6.1 System operating modes

Several system operating modes are available to tune the system according to the performance required, means when the CPU does not need to execute code and is waiting for an external event. It is up to the user to select the operating mode that gives the best compromise between low-power consumption, short startup time and available wake-up sources.

The operating modes allow controlling the clock distribution to the different system blocks and powering them. The system operating mode is driven by the CPU subsystem and system SmartRun autonomous wake-up. The CPU subsystem can span different configurations depending on its peripheral allocation (see Section 8.5.11: Peripheral clock gating control ).

The operating modes described below are available for the different system blocks (see Table 35 ).

Description of the operating mode

System Run modes

Any Run mode voltage scaling can be selected (VOS0, VOS1, VOS2 or VOS3).

The system clock and the SmartRun domain bus matrix clock are running.

The domain bus matrix is clocked. The CPU subsystem operates in CRun or CSleep mode:

The CPU and CPU subsystem peripheral allocated via PERxEN bits in the RCC registers are clocked.

The CPU clock is stalled and the CPU subsystem allocated peripheral clock operates according to PERxLPEN bit setting in the RCC registers.

System Autonomous modes

Any Run mode voltage scaling can be selected (VOS0/1/2/3).

The system clock and the SmartRun domain bus matrix clocks are running.

The CPU and CPU subsystem peripheral clocks are stalled.

The domain bus matrix clock is stalled.

When the CPU subsystem is in CStop mode, the CPU domain is either in DStop or DStop2.

The CPU domain mode selection between DStop and DStop2 is configured via RETDS_CD bit in PWR CPU control register (PWR_CPUCR).

The CPU domain Autonomous modes are the following:

The CPU domain peripherals able to operate in Stop mode are still operational.

The CPU domain peripherals able to operate in Stop mode are no longer operational.

System Stop

Any Stop mode voltage scaling can be selected (SVOS3/4/5).

The system clock and the SmartRun domain bus matrix clock are stalled.

The CPU and CPU subsystem peripheral clocks are stalled.

The domain bus matrix clock is stalled.

When the CPU subsystem is in CStop mode, the CPU domain is either in DStop or DStop2.

The CPU domain mode selection between DStop and DStop2 is configured via RETDS_CD bit in PWR CPU control register (PWR_CPUCR).

The CPU domain peripherals able to operate in Stop mode are no longer operational. This means that no peripherals in CPU domain are operational.

System Standby

Both SRD and CPU domain supplies are powered down. All internal wake-up signals are inactive.

The Standby mode is selected through the PDDS_SRD bit in PWR CPU control register (PWR_CPUCR).

DStop vs DStop2 mode

DStop2 and DStop modes are very similar from user point of view. In DStop2 mode the asynchronous logic is switched off while RAM and register contents are maintained. This allows further leakage current consumption reduction compared to DStop mode. When exiting DStop2, the CPU domain resumes normal execution at the cost of a slightly higher startup time.

The main differences between DStop and DStop2 are given below:

The system state is retained in DStop and DStop2.

Table 35. Operating mode summary

SystemSRD domainCPU domainCPUEntrywake-upSystem oscillatorSystem clockDomain bus matrix clockPeripheral clockCPU clockVoltage regulatorDomain supplyVoltage scaling
RunSRDRunDRunCRun--ONONONONONONONVOS0/1/2/3
CSleepWFI or return from ISR or WFEAny interrupt or eventON/OFF (1)
AutonomousDStop (2)CStopSLEEPDEEP bit + WFI or return from ISR or WFEAny EXTI interrupt or eventONONONON/OFF (3)OFFONRET (9)SVOS3/4/5
DStop2 (4)ON/OFF (3)ON
Stop (5)SRDStopDStop (2)CStopSLEEPDEEP bit + WFI or return from ISR or WFE or wake-up source cleared (6)ON/OFF (7)OFFOFFOFF (8)OFFOFFRET (9)OFF
DStop2 (4)OFF (8)ON
Standby (10)PDDS_SRD bit + SLEEPDEEP bit + WFI or return from ISR or WFE or wake-up source cleared (6)WKUP pins rising or falling edge, RTC alarm (Alarm A or Alarm B), RTC wake-up event, RTC tamper events, RTC timestamp event, external reset in NRST pin, IWDG resetOFFOFFOFFOFFOFFOFFOFFOFF

1. The peripherals that have a PERxLPEN bit, operate accordingly.

2. The CPU subsystem is in CStop and RETDS_CD selects DStop.

3. SmartRun domain peripherals having a PERxAMEN bit, operate accordingly.

4. The CPU subsystem is in CStop and RETDS_CD selects DStop2.

5. The CPU domain needs to be in DStop or DStop2 mode, no wake-up signal is active in SmartRun domain and PDDS_SRD bit selects the Stop mode.

6. When the CPU is in CStop and SmartRun domain in Autonomous mode, the last EXTI wake-up source must be cleared to enter System Stop or Standby mode.

  1. 7. When the system oscillator HSI or CSI is used, the state is controlled by HSIKERON and CSIKERON, otherwise the system oscillator is OFF.
  2. 8. When the system is in Stop mode, all the peripheral bus interface clocks are OFF. But peripherals in the SmartRun domain having a kernel clock request can stay active by programming their PERxAMEN bit (RCC_SRDMEN).
  3. 9. Supply level is in retention: content is kept (memories, registers) but domain is not operational.
  4. 10. PDDS_SRD selects the Standby mode. The whole core domain is switched off.

6.6.2 Voltage scaling

The CPU and SmartRun domains are supplied from a single voltage regulator supporting voltage scaling with the following features:

For more details on voltage scaling values, refer to the product datasheets.

After reset, the system starts on the lowest Run mode voltage scaling (VOS3). The voltage scaling can then be changed on-the-fly by software by programming VOS bits in PWR SmartRun domain control register (PWR_SRDCR) according to the required system performance. When exiting from Stop mode or Standby mode, the Run mode voltage scaling is reset to the default VOS3 value.

Before entering Stop mode, the software can preselect the SVOS level in PWR control register 1 (PWR_CR1) . The Stop mode voltage scaling for SVOS4 and SVOS5 also sets the voltage regulator in Low-power (LP) mode to further reduce power consumption. When preselecting SVOS3, the use of the voltage regulator low-power mode (LP) can be selected by LPDS bit in PWR control register 1 (PWR_CR1) .

Figure 34.\( V_{CORE} \) voltage scaling versus system power modes Figure 34: V_CORE voltage scaling versus system power modes. The diagram shows the relationship between system power modes (Standby, Run, Stop, Autonomous) and the voltage scaling options for V_CORE. Standby mode includes POWER DOWN. Run mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3, with a reset signal. Stop mode includes MAIN or LP SVOS3, LP SVOS4, and LP SVOS5. Autonomous mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3. Arrows indicate transitions between modes and voltage levels: SW Run mode (green), Autonomous mode (yellow), Stop mode (blue), Standby mode (pink), and Wakeup (purple).

The diagram illustrates the voltage scaling options for \( V_{CORE} \) across different system power modes:

Legend:

MSV48172V2

Figure 34: V_CORE voltage scaling versus system power modes. The diagram shows the relationship between system power modes (Standby, Run, Stop, Autonomous) and the voltage scaling options for V_CORE. Standby mode includes POWER DOWN. Run mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3, with a reset signal. Stop mode includes MAIN or LP SVOS3, LP SVOS4, and LP SVOS5. Autonomous mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3. Arrows indicate transitions between modes and voltage levels: SW Run mode (green), Autonomous mode (yellow), Stop mode (blue), Standby mode (pink), and Wakeup (purple).

6.6.3 Power control modes

The power control block handles the \( V_{CORE} \) supply for system Run, Stop and Standby modes.

The system operating mode depends on the CPU subsystem modes (CRun, CSleep, CStop), on the domain modes (DRun, DStop, DStop2) and on the system SmartRun autonomous wake-up:

The CPU domain mode selection between DStop and DStop2 is configured via RETDS_CD bit in PWR CPU control register (PWR_CPUCR) . The system/SmartRun mode selection

between Stop and Standby is configured via PDDS_SRD bit in PWR CPU control register (PWR_CPUCR) .

The system enters Standby when PDDS_SRD bit allows it and stays otherwise in Stop mode (CPU domain in DStop or DStop2).

Table 36 describes all possible low-power mode states.

Table 36. PDDS_SRD and RETDS_CD low-power mode control

PWR_CPUCRCPU domain modeSmartRun domain mode
RETDS_CDPDDS_SRD
00DStopSDRun or SDStop
1DStop2
01StandbyStandby
1

Figure 35. Power-control modes detailed state diagram

State diagram showing power-control modes: Run, Autonomous, Standby, and Stop. It details transitions between these modes based on CPU sub-system modes, domain modes, and operating modes. Includes a legend for CPU sub-system modes, Domain modes, and Operating mode.

The diagram illustrates the power-control modes and their transitions:

Legend:

MSV48173V2

State diagram showing power-control modes: Run, Autonomous, Standby, and Stop. It details transitions between these modes based on CPU sub-system modes, domain modes, and operating modes. Includes a legend for CPU sub-system modes, Domain modes, and Operating mode.

After a system reset, the CPU is in CRun mode.

Power control state transitions are initiated by the following events:

Table 37 shows the flags indicating from which mode the domain/system exits. The CPU features a set of flags that can be read from PWR CPU control register (PWR_CPUCR) .

Table 37. Low-power exit mode flags

System modeCPU domain modeSBFSTOPFComment
RunDRun00-
AutonomousDStop or DStop200CPU domain and system contents retained
StopDStop or DStop201CPU domain and system contents retained, clock system reset.
StandbyOFF10CPU domain and system contents lost

6.6.4 Power management examples

Figure 36 shows \( V_{CORE} \) voltage scaling behavior in Run mode.

Figure 37 shows \( V_{CORE} \) voltage scaling behavior in Stop mode.

Figure 38 shows \( V_{CORE} \) voltage regulator and voltage scaling behavior in Standby mode.

Figure 39 shows \( V_{CORE} \) voltage scaling behavior in Run mode with CPU domain in DStop or DStop2 mode.

Example of \( V_{CORE} \) voltage scaling behavior in Run mode

Figure 36 illustrates the following system operation sequence example:

  1. 1. After reset, the system starts from HSI with VOS3.
  2. 2. The system performance is first increased to a medium-speed clock from the PLL with voltage scaling VOS2. To do this:
    1. a) Program the voltage scaling to VOS2.
    2. b) Once the \( V_{CORE} \) supply has reached the required level indicated by VOSRDY, increase the clock frequency by enabling the PLL.
    3. c) Once the PLL is locked, switch the system clock.
  3. 3. The system performance is then increased to high-speed clock from the PLL with voltage scaling VOS1. To do this:
    1. a) Program the voltage scaling to VOS1.

When the system performance (clock frequency) is changed, VOS must be set accordingly, otherwise the system might be unreliable.

Figure 36. Dynamic voltage scaling in Run mode

Timing diagram showing dynamic voltage scaling in Run mode. It includes waveforms for VOS 1, 2, 3; VOSRDY; PLLxON; ck_sys; ck_hclk_cd; and ck_hclk_srd. Below the waveforms is a table showing the status of register bits (RUN, Wait VOSRDY, Wait PLL) and the corresponding system state (RUN from HSI, Run from PLL).

The figure is a timing diagram illustrating dynamic voltage scaling in Run mode. It shows the relationship between voltage scaling levels (VOS 1, 2, 3), the VOSRDY signal, the PLLxON signal, and the system clock (ck_sys, ck_hclk_cd, ck_hclk_srd) during transitions between different performance levels.

The diagram is divided into several horizontal tracks:

Below the waveforms, a table shows the status of register bits at each step of the voltage scaling process:

Status of register bits at each stepRUNWait VOSRDYWait PLLRUNWait VOSRDYRUNWait VOSRDYWait PLLRUN
RUN from HSIRun from PLLRUN from HSIRun from PLL

The diagram shows the following sequence of events:

  1. The system starts in RUN mode with VOS 3 and ck_sys running from HSI.
  2. The voltage scaling is changed to VOS 2 . The system enters a Wait VOSRDY state.
  3. Once VOSRDY is high, the system enters a Wait PLL state as the PLL is enabled.
  4. Once the PLL is locked, the system enters RUN mode with VOS 1 and ck_sys running from the PLL.
  5. The voltage scaling is changed to VOS 2 . The system enters a Wait VOSRDY state.
  6. Once VOSRDY is high, the system enters RUN mode with VOS 2 and ck_sys running from the PLL.
  7. The voltage scaling is changed to VOS 3 . The system enters a Wait VOSRDY state.
  8. Once VOSRDY is high, the system enters a Wait PLL state as the PLL is disabled.
  9. Once the PLL is disabled, the system enters RUN mode with VOS 3 and ck_sys running from HSI.

MSv48174V1

Timing diagram showing dynamic voltage scaling in Run mode. It includes waveforms for VOS 1, 2, 3; VOSRDY; PLLxON; ck_sys; ck_hclk_cd; and ck_hclk_srd. Below the waveforms is a table showing the status of register bits (RUN, Wait VOSRDY, Wait PLL) and the corresponding system state (RUN from HSI, Run from PLL).

Example of \( V_{CORE} \) voltage scaling behavior in Stop mode

Figure 37 illustrates the following system operation sequence example:

  1. 1. The system is running from the PLL in high-performance mode (VOS1 voltage scaling).
  2. 2. The CPU subsystem deallocates all peripherals related to AHB1 and AHB2. As a consequence, the clocks hclk[2:1] and the related APB1 and APB2 peripherals clocks (pclck1 and pclck2) are stopped. The system still provides the high-performance system clock, hence the voltage scaling must stay at VOS1 level.
  3. 3. In a second step, the CPU subsystem enters CStop mode, the CPU domain enters DStop or DStop2 mode (Dstop or Dstop2 is selected by RETDS_CD bit in PWR CPU control register (PWR_CPUCR) ) and the system enters Stop mode. The system clock is stopped and the hardware lowers the voltage scaling to the software preselected SVOS4 level.
  4. 4. The CPU subsystem is then woken up. The system exits Stop mode, the CPU domain exits DStop or DStop2 mode and the CPU subsystem exits CStop mode. The hardware then sets the voltage scaling to VOS3 level and waits for the requested supply level to be reached before enabling the HSI clock. Once the HSI clock is stable, the system clock, the CPU domain clock and the CPU subsystem clock are enabled. Several system clock cycles are needed before the bus clocks are activated according to the xxxEN bits in the RCC.
  5. 5. The CPU subsystem allocates a peripheral in the APB1/APB2 domain. The related hclk and pclck peripheral clocks are enabled.
  6. 6. The system performance is then increased. To do this:
    1. a) The software first sets the voltage scaling to VOS1.
    2. b) Once the \( V_{CORE} \) supply has reached the required level indicated by VOSRDY, the clock frequency can be increased by enabling the PLL.
    3. c) Once the PLL is locked, the system clock can be switched.

Figure 37. Dynamic voltage scaling behavior with CPU domain and system in Stop mode

Timing diagram showing dynamic voltage scaling behavior with CPU domain and system in Stop mode. It includes signals for VOS 1, VOS 2, VCORE, (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, exti_c_wkup, pwr_srd_wkup, pwr_cd_wkup, PLLxON, and various clock signals (ck_sys, ck_fclk, ck_hclk1/2/3, ck_hclk4) across CPU and SmartRun domains. A state table at the bottom defines the system states: CPU Domain RUN, STOP, Wait VCORE, Wait HSI, CPU Domain RUN, Wait VOSRDY, and RUN.

The diagram illustrates the dynamic voltage scaling (DVS) behavior when the CPU domain and system enter Stop mode. The signals shown include voltage levels (VOS 1, VOS 2, VCORE, (S)VOS 3, SVOS 4), voltage status (VOSRDY), wake-up signals (exti_c_wkup, pwr_srd_wkup, pwr_cd_wkup), PLL status (PLLxON), and clock signals (ck_sys, ck_fclk, ck_hclk1/2/3, ck_hclk4) for the CPU and SmartRun domains. The bottom part of the diagram is a state transition table:

CPU Domain RUN
SmartRun RUN
STOPWait VCOREWait HSICPU Domain RUN
SmartRun RUN
Wait VOSRDYRUN
Run from PLLClock StoppedRUN from HSIRun from PLL

MSV48175V1

Timing diagram showing dynamic voltage scaling behavior with CPU domain and system in Stop mode. It includes signals for VOS 1, VOS 2, VCORE, (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, exti_c_wkup, pwr_srd_wkup, pwr_cd_wkup, PLLxON, and various clock signals (ck_sys, ck_fclk, ck_hclk1/2/3, ck_hclk4) across CPU and SmartRun domains. A state table at the bottom defines the system states: CPU Domain RUN, STOP, Wait VCORE, Wait HSI, CPU Domain RUN, Wait VOSRDY, and RUN.

Example of V CORE voltage regulator/voltage scaling behavior in Standby mode

Figure 38 illustrates the following system operation sequence example:

  1. 1. The system is running from the PLL in high-performance mode (VOS1 voltage scaling).
  2. 2. The CPU subsystem deallocates all peripherals related to AHB1 and AHB2. As a consequence the clocks hclk[2:1] and the related APB1 and APB2 peripherals clocks (pclk1 and pclk2) are stopped. The system performance is unchanged hence the voltage scaling does not change.
  3. 3. The CPU subsystem and the system enters Standby mode (selection through PDDS_SRD bit). The system clock is stopped and the voltage regulator is switched off.
  4. 4. The system is then woken up by a wake-up source. The system exits Standby mode. The hardware sets the voltage scaling to the default VOS3 level and waits for the requested supply level to be reached before enabling the default HSI oscillator. Once the HSI clock is stable, the system clock and the CPU subsystem clock are enabled. The software must then check the ACTVOSRDY is valid before changing the system performance.
  5. 5. The CPU subsystem allocates a peripheral in the APB1/APB2 domain. The related hclk and pclk peripheral clocks are enabled.
  6. 6. In a next step, increase the system performance. To do this:
    1. a) The software first increases the voltage scaling to VOS1 level.
    2. b) Before enabling the PLL, the software waits for the requested supply level to be reached by monitoring VOSRDY bit.
    3. c) Once the PLL is locked, the system clock can be switched.

Figure 38. Dynamic voltage scaling system Standby mode

Timing diagram showing dynamic voltage scaling system Standby mode. It includes signal waveforms for VOS 1, VOS 2, VCORE, (S)VOS 3, SVOS 4, Off, VOS, SVOS, VOSRDY, ACTVOSRDY, exti_c_wkup, pwr_cd_wkup, PLLxON, ck_sys, CPU domain clocks (ck_hclk3, ck_hclk1, ck_hclk2), SmartRun domain clock (ck_hclk4), and a status register table at the bottom.

The figure is a timing diagram illustrating the dynamic voltage scaling system in Standby mode. It shows the relationship between various voltage levels, clock signals, and system status over time.

Signal Waveforms:

Status of register bits at each step:

Status of register bits at each stepCPU Domain RUN
SmartRun RUN
STANDBYRESET
Wait VDD11
Wait HSIWait ACTVOS RDYRUNWait VOSRDYWait PLLCPU Domain RUN
SmartRun RUN
Run from PLLPower downRUN from HSIRun from PLL
Timing diagram showing dynamic voltage scaling system Standby mode. It includes signal waveforms for VOS 1, VOS 2, VCORE, (S)VOS 3, SVOS 4, Off, VOS, SVOS, VOSRDY, ACTVOSRDY, exti_c_wkup, pwr_cd_wkup, PLLxON, ck_sys, CPU domain clocks (ck_hclk3, ck_hclk1, ck_hclk2), SmartRun domain clock (ck_hclk4), and a status register table at the bottom.

MSV48176V1

Example of V CORE voltage scaling behavior in Run mode with CPU domain in DStop or DStop2 mode

Figure 39 illustrates the following system operation sequence example:

  1. 1. The system is running from the PLL with system in high-performance mode (VOS1 voltage scaling).
  2. 2. The CPU subsystem deallocates all peripherals related to AHB1 and AHB2. As a consequence the clocks hclk[2:1] and the related APB1 and APB2 peripherals clocks (pclck1 and pclck2) are stopped. The system performance is unchanged hence the voltage scaling does not change.
  3. 3. The CPU subsystem then enters CStop mode and the CPU domain enters DStop or DStop2 mode (selected by RETDS_CD bit in PWR CPU control register (PWR_CPUCR) ). The CPU AXI bus matrix clock is stopped. At the same time the system/SmartRun domain enters Stop mode. The system clock is stopped and the hardware lowers the voltage scaling to the software preselected SVOS4 level.
  4. 4. The system is then woken up by a SmartRun Autonomous mode wake-up event. The system exits Stop mode. The hardware sets the voltage scaling to the default VOS3 level and waits for the requested supply level to be reached before enabling the HSI clock. Once the HSI clock is stable, the system clock is enabled. The system is running in SmartRun Autonomous mode.
  5. 5. The SmartRun Autonomous mode wake-up source is then cleared, causing the system to enter Stop mode. The system clock is stopped and the voltage scaling is lowered to the software preselected SVOS4 level.
  6. 6. The CPU subsystem is then woken up. The system exits Stop mode, the CPU domain exits DStop/DStop2 mode and the CPU subsystem exits CStop mode. The hardware sets the voltage scaling to the default VOS3 level and waits for the requested supply level to be reached before enabling the default HSI oscillator. Once the HSI clock is stable, the system clock and the CPU subsystem clock are enabled.

Figure 39. Dynamic voltage scaling behavior with CPU domain in DStop or DStop2 mode and SmartRun domain in Autonomous mode

Timing diagram showing dynamic voltage scaling behavior. It includes signals for VOS 1-4, VOS, SVOS, VOSRDY, various wake-up signals, PLLxON, and clocks for CPU and SmartRun domains. A status table at the bottom details the register bit states for each step.

The figure is a timing diagram illustrating the dynamic voltage scaling (DVS) behavior. The signals shown are:

At the bottom, a table shows the status of register bits at each step of the sequence:

Status of register bits at each stepCPU Domain RUN
SmartRun RUN
CPU DSTOP(2)
SmrRun STOP
Wait VcoreWait HSICPU DSTOP(2)
SmrRun RUN
CPU DSTOP2
SmrRun STOP
Wait VcoreWait HSICPU Domain RUN
SmartRun RUN
RUN from PLLClock stoppedRUN from HSIClock stoppedRUN from HSI

MSV48177V1

Timing diagram showing dynamic voltage scaling behavior. It includes signals for VOS 1-4, VOS, SVOS, VOSRDY, various wake-up signals, PLLxON, and clocks for CPU and SmartRun domains. A status table at the bottom details the register bit states for each step.

6.7 Low-power modes

Several low-power modes are available to save power when the CPU does not need to execute code (when waiting for an external event). It is up to the user application to select the mode that gives the best compromise between low-power consumption, short startup time and available wake-up sources:

6.7.1 Slowing down system clocks

In Run mode the speed of the system clock ck_sys can be reduced. For more details refer to Section 8.5.6: System clock (sys_ck) .

6.7.2 Controlling peripheral clocks

In Run mode, the HCLKx and PCLKx for individual peripherals can be stopped by configuring at any time PERxEN bits in RCC_C1_xxxxENR or RCC_DnxxxxENR to reduce power consumption.

To reduce power consumption in CSleep mode, the individual peripheral clocks can be disabled by configuring PERxLPEN bits in RCC_C1_xxxxLPENR or RCC_DnxxxxLPENR . For the peripherals still receiving a clock in CSleep mode, their clock can be slowed down before entering CSleep mode and clock gating can be enabled ( RCC_CKGAENR register).

In Autonomous mode, the individual peripheral clocks can remain active by setting the corresponding PERxAMEN bit of RCC_SRDAMR register.

6.7.3 Entering low-power modes

The MCU enters one of the power mode listed in Section 6.7: Low-power modes when executing the WFI (wait for interrupt) or WFE (wait for event) instructions, or when the SLEEPONEXIT bit in the Cortex ® -M system control register is set on Return from ISR.

The system can enter Stop or Standby low-power mode when all EXTI wake-up sources are cleared (see Figure 35 ).

6.7.4 Exiting from low-power modes

The CPU subsystem exits CSleep mode through any interrupt or event depending on how the low-power mode was entered:

When SEVONPEND = 0 in the Cortex ® -M7 system control register, the interrupt must be enabled in the peripheral control register and in the NVIC.

When the MCU resumes from WFE, the peripheral interrupt pending bit and the NVIC peripheral IRQ channel pending bit (in the NVIC interrupt clear pending register) have to be cleared. Only NVIC interrupts with sufficient priority wake up and interrupt the MCU.

When SEVONPEND = 1 in the Cortex ® -M7 system control register, the interrupt must be enabled in the peripheral control register and optionally in the NVIC. When the MCU resumes from WFE, the peripheral interrupt pending bit and, when enabled, the NVIC peripheral IRQ channel pending bit (in the NVIC interrupt clear pending register) have to be cleared.

All NVIC interrupts wake up the MCU, even the disabled ones.

Only enabled NVIC interrupts with sufficient priority wake up and interrupt the MCU.

An EXTI line must be configured in event mode. When the CPU resumes from WFE, it is not necessary to clear the EXTI peripheral interrupt pending bit or the NVIC IRQ channel pending bit, as the pending bits corresponding to the event line are not set. It might be necessary to clear the interrupt flag in the peripheral.

The MCU exits the Autonomous mode (SRDRun, DStop/DStop2, CStop) or Stop mode (SRDStop, DStop/DStop2, CStop) by enabling an EXTI interrupt or event depending on how the low-power mode was entered (see above).

In Autonomous mode the system can wake up from Stop mode by enabling an EXTI wake-up, without waking up the CPU subsystem.

The MCU exits from Standby mode by enabling an external reset (NRST pin), an IWDG reset, a rising edge on one of the enabled WKUPx pins or a RTC event. Program execution restarts in the same way as after a system reset (such as boot pin sampling, option bytes loading or reset vector fetched).

6.7.5 System Run and CSleep modes

The system remains in Run mode with both the SRD and CPU domains are in Run mode (see Table 35: Operating mode summary ).

The CSleep mode applies only to the CPU subsystem. In this mode, the CPU clock is stopped and the CPU subsystem peripheral clocks operate according to the configuration defined in PERxLPEN bits of RCC_xxxxLPENR registers.

Entering CSleep mode

The CSleep mode is entered according to Section 6.7.3: Entering low-power modes when the SLEEPDEEP bit in the Cortex ® -M System Control register is cleared.

Refer to Table 38 for details on how to enter CSleep mode.

Exiting from CSleep mode

The CSleep mode is exited according to Section 6.7.4: Exiting from low-power modes .

Refer to Table 38 for more details on how to exit from CSleep mode.

Table 38. CSleep mode

CSleep modeDescription
Mode entryWFI (Wait for Interrupt) or WFE (Wait for Event) while:
  • – SLEEPDEEP = 0 (Refer to the Cortex ® -M System Control register.)
  • – CPU NVIC interrupts and events cleared.
On return from ISR while:
  • – SLEEPDEEP = 0 and
  • – SLEEPONEXIT = 1 (refer to the Cortex ® -M System Control register.)
  • – CPU NVIC interrupts and events cleared.
Mode exitIf WFI or return from ISR was used for entry:If WFE was used for entry and SEVONPEND = 0:If WFE was used for entry and SEVONPEND = 1:
wake-up latencyNone

6.7.6 System Autonomous mode

In Autonomous mode the SRD domain remains in Run mode while the CPU domain is in DStop or DStop2.

The whole CPU domain is in low-power mode and all the clocks of this domain are stopped. The CPU subsystem included in the CPU domain is in the same mode.

The CPU clock is stopped as well as the peripheral clocks of the CPU domain.

Only the SmartRun domain peripherals associated to a PERxAMEN bit operate according to this bit configuration and can request a kernel clock, if relevant.

The flash memory can be in low-power mode when it is enabled through the FLPS bit of the PWR_CR1 register. This allows a trade-off between CPU domain DStop/DStop2 restart time and low-power consumption.

Entering Autonomous mode

The Autonomous mode is entered according to Section 6.7.3: Entering low-power modes , when the SLEEPDEEP bit in the Cortex®-M System Control register is set.

The CPU domain enters DStop or DStop2 depending on the configuration of RETDS_CD bit of PWR_CPUCR register.

Before entering DStop2 mode, it is mandatory to configure the flash memory in low-power mode by setting the FLPS bit of PWR_CR1.

Before entering DStop2, all the peripherals belonging to the CPU domain and having a kernel clock must be either disabled by clearing the enable bit in the peripheral itself, or reset by setting the corresponding bit in the associated AHB peripheral reset register (RCC_AHBxRSTR) or APB peripheral reset register (RCC_APBxRSTR).


Warning: The user must ensure that no allocated peripheral in the CPU domain has an active kernel clock, or are still clocked by LSI LSE, HSI or CSI. The flash memory must be configured in low-power mode (FLPS bit set in PWR_CR1 register) before entering DStop2.


Refer to Table 39 for details on how to enter Autonomous mode.

Exiting Autonomous mode

The Autonomous mode is exited according to Section 6.7.4: Exiting from low-power modes .

Refer to Table 39 for more details on how to exit from Autonomous mode.

Table 39. Autonomous mode

Autonomous modeDescription
Mode entry

WFI (Wait for Interrupt) or WFE (Wait for Event) while:

  • – SLEEPDEEP = 1 (Refer to the Cortex®-M System Control register.)
  • – CPU NVIC interrupts and events cleared.
  • – All CPU EXTI wake-up sources are cleared.

On return from ISR while:

  • – SLEEPDEEP = 1 and
  • – SLEEPONEXIT = 1 (Refer to the Cortex®-M System Control register.)
  • – CPU NVIC interrupts and events cleared.
  • – All CPU EXTI wake-up sources are cleared.
  • – The RETDS_CD bit selects DStop or DStop2
  • – No CPU domain peripherals with kernel clocks or cadenced by LSI, LSE, HSI or CSI

Table 39. Autonomous mode

Autonomous modeDescription
Mode exit

If WFI or return from ISR was used for entry:

  • – EXTI Interrupt enabled in NVIC: Refer to Table 125: NVIC , for peripheral which are not stopped.

If WFE was used for entry and SEVONPEND = 0:

If WFE was used for entry and SEVONPEND = 1:

Wake-up latencyEXTI and RCC wake-up synchronization (see Section 8.4.7: Power-on and wake-up sequences )

I/O states in Autonomous mode

The I/O pin configuration remains unchanged in Autonomous mode.

6.7.7 Stop mode

In system Stop mode, the SRD domain is in Stop mode with the CPU domain in DStop or DStop2. The system clock including a PLL and the SmartRun domain bus matrix clocks are stopped.

The HSI or CSI can remain enabled in system Stop mode (HSIKERON and CSIKERON set in RCC_CR register). After exiting Stop mode, the clock is quickly available as kernel clock for peripherals. Other system oscillator sources are stopped and require a starting time after exiting Stop mode.

In system Stop mode, the following features can be selected to remain active by programming individual control bits:

This is configured via the LSEON bit in the RCC Backup Domain Control Register (RCC_BDCR).

In this case the PERxAMEN bit of these peripherals must be set to request the kernel clock (in the RCC_SRDAMR register)

This is configured via the HSIKERON and CSIKERON bits in the RCC Clock Control and Status Register (RCC_CSR).

The selected SVOS4 and SVOS5 levels add an additional startup delay when exiting from system Stop mode (see Table 40 ). An extra latency is added upon entering and exiting DStop2 mode as well.

Table 40. Stop mode operation

SVOSLPDSStop mode voltage regulator operationWake-up latency
SVOS30MainNo additional wake-up time
1LPVoltage regulator wake-up time from Low-power mode
SVOS4 or SVOS5xLPVoltage regulator wake-up time from Low-power mode + voltage level wake-up time for SVOS4 or SVOS5 level to VOS3 level

The flash memory can be in Stop mode when it is enabled through the FLPS bit of the PWR_CR1 register. This allows a trade-off between CPU domain DStop/DStop2 restart time and low-power consumption.

RAM memory shut-off

In DStop or DStop2 mode, the content of the memory blocks is maintained. Further power optimization can be obtained by switching off some memory blocks. This optimization implies loss of the memory content. The user can select which memory is discarded during Stop mode by means of xxSO bits in PWR control register 1 (PWR_CR1) as indicated in Table 42 .

Table 41. Memory shut-off block selection

Selection bitShut-off block during Stop mode (DStop or DStop2)
AXIRAM1SOAXI SRAM1 shut-off control
AXIRAM2SOAXI SRAM2 shut-off control
Table 41. Memory shut-off block selection
Selection bitShut-off block during Stop mode (DStop or DStop2)
AXIRAM3SOAXI SRAM3 shut-off control
AHBRAM1SOAHB SRAM1 shut-off control
AHBRAM2SOAHB SRAM2 shut-off control
ITCMSOITCM and ETM memories shut-off control
GFXSOGFXMMU and JPEG memory shut-off control
HSITFSOHigh-speed interface USB and FDCAN memories shut-off control
SRDRAMSOSmartRun AHB SRAM shut-off control

Entering Stop mode

The Stop mode is entered according to Section 6.7.3: Entering low-power modes .

Refer to Table 42 for details on how to enter Stop mode.

If the flash memory programming is ongoing, the Stop mode entry is delayed until the memory access is finished.

If an access to a bus matrix is ongoing, the Stop mode entry is delayed until the bus matrix access is finished.


Warning: The user must ensure that no peripherals allocated in the CPU domain have an active kernel clock or are still clocked by LSI, LSE, HSI or CSI.
The flash memory must be configured in low-power mode (FLPS bit set in PWR_CR1 register) before entering DStop2.


Exiting from Stop mode

The Stop mode is exited according to Section 6.7.4: Exiting from low-power modes .

Refer to Table 42 for more details on how to exit from Stop mode.

When exiting Stop mode, the system clock, the SmartRun domain bus matrix clocks and voltage scaling are reset.

STOPF status flag in PWR CPU control register (PWR_CPUCR) indicates that the system has exited Stop mode (see Table 37 ).

Table 42. Stop mode
Stop modeDescription
Mode entryWhen the CPU is in CStop mode and there is no active EXTI wake-up source and RUN_SRD = 0 (in PWR_CPUCR register)
Mode exitOn a EXTI wake-up
Wake-up latencySystem oscillator startup (when disabled)
+ EXTI and RCC wake-up synchronization
+ Voltage scaling refer to Table 40 (see Section 6.6.2: Voltage scaling )
+ Exiting DStop2

I/O states in Stop mode

The I/O pin configuration remains unchanged in Stop mode.

6.7.8 Standby mode

The Standby mode allows achieving the lowest power consumption. Like Stop mode, it is based on CPU subsystem CStop mode. However the V CORE supply regulator is powered off.

The system SmartRun domain enters Standby mode only when the CPU domain is in DStop or DStop2, no EXTI is pending and PDDS_SRD bit selects Standby. When the system/SmartRun domain enters Standby mode, the voltage regulator is disabled. The complete V CORE domain is consequently powered off. The PLLs, HSI oscillator, CSI oscillator, HSI48 and HSE oscillator are also switched off. The content of SRAM and registers is lost except for Backup domain registers (RTC registers, RTC backup register and backup RAM), and Standby circuitry (see Section 6.4.5: Backup domain ).

In system Standby mode, the following features can be selected by programming individual control bits:

Entering Standby mode

The Standby mode is entered according to Section 6.7.3: Entering low-power modes , when the PDDS_SRD bit requests Standby (in PWR CPU control register (PWR_CPUCR) ).

Refer to Table 44 for more details on how to enter Standby mode.

Exiting from Standby mode

The Standby mode is exited according to Section 6.7.4: Exiting from low-power modes .

Refer to Table 44 for more details on how to exit from Standby mode.

The system exits from Standby mode when an external reset (NRST pin), an IWDG reset, a WKUP pin event, a RTC alarm, a tamper event, or a timestamp event is detected. All registers are reset after waking up from Standby except for power control and status registers (PWR control register 2 (PWR_CR2), PWR control register 3 (PWR_CR3)), SBF bit in PWR CPU control register (PWR_CPUCR), PWR wake-up flag register (PWR_WKUPFR), and PWR wake-up enable and polarity register (PWR_WKUPEPR).

After waking up from Standby mode, the program execution restarts in the same way as after a system reset (boot option sampling, boot vector reset fetched). The SBF status flag in PWR CPU control register (PWR_CPUCR) indicates from which mode the system has exited (see Table 43 ).

Table 43. Standby and Stop flags

SBFSTOPFDescription
01System has been in or exits from Stop.
10System exits from Standby.

Table 44. Standby mode

Standby modeDescription
Mode entry
  • – The CPU subsystem is in CStop mode and there is no active EXTI wake-up source and RUN_SRD = 0.
  • – PDDS_SRD bit selects Standby.
  • – All WKUPFx bits in power control/status register (PWR_WKUPFR) are cleared.
Mode exitWKUP pins rising or falling edge, RTC alarm (Alarm A and Alarm B), RTC wake-up, tamper event, timestamp event, external reset in NRST pin, IWDG reset
Wake-up latencySystem reset phase (see Section 8.4.2: System reset )

I/O states in Standby mode

In Standby mode, all I/O pins are high impedance without pull, except for:

The WKUP pin pull configuration can be defined through WKUPPUPDx[1:0] bits in PWR wake-up enable and polarity register (PWR_WKUPEPR) .

6.7.9 Monitoring low-power modes

The devices feature state monitoring pins that monitor the CPU and Domain state transitions to low-power mode (refer to Table 45 for the list of pins and their description). The GPIO pin corresponding to each monitoring signal has to be programmed in alternate function mode.

This feature is not available in Standby mode since these I/O pins are switched to high impedance.

Table 45. Overview of low-power mode monitoring pins

Power state monitoring pinsDescriptionPin assignment
CSLEEPCPU clock OFFPC3
CSTOPCPU domain in low-power modePC2
NDSTOP2CPU domain Retention mode selectionPA5

The state of the monitoring pins reflect the mode of the CPUs and domains. Refer to Table 46 for a description of the GPIO state depending on the CPU and domain state.

Table 46. GPIO state according to CPU and domain state

CSLEEPCSTOPNDSTOP2CPU domain power stateSRD domain power stateCPU state
001DRUNSRDRUNCRun
101DRUNSRDRUNCSleep
111DStopSRDRUN or SRDStopCStop
110DStop2SRDRUN or SRDStopCStop

6.8 PWR registers

The PWR registers can be accessed in word, half-word and byte format, unless otherwise specified.

6.8.1 PWR control register 1 (PWR_CR1)

Address offset: 0x000

Reset value: 0xF000 C000

31302928272625242322212019181716
Res.Res.Res.Res.SRDRAMSOHSITFSOGFXSOITCMSOAHBRAM2SOAHBRAM1SOAXIRAM3SOAXIRAM2SOAXIRAM1SOALS[1:0]AVDEN
r/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w

1514131211109876543210
SVOS[1:0]AVD_READYBOOSTERes.Res.FLPSDBPPLS[2:0]PVDERes.Res.LPDS
r/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w

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

Bit 27 SRDRAMSO : SmartRun domain AHB memory shut-off in DStop/DStop2 low-power mode

0: SmartRun domain AHB memory content is kept in DStop or DStop2 mode

1: SmartRun domain AHB memory content is lost in DStop or DStop2 mode

Bit 26 HSITFSO : high-speed interfaces USB and FDCAN memory shut-off in DStop/DStop2 mode

0: USB and FDCAN memories content is kept in DStop or DStop2 mode

1: USB and FDCAN memories content is lost in DStop or DStop2 mode

Bit 25 GFXSO : GFXMMU and JPEG memory shut-off in DStop/DStop2 mode

0: GFXMMU and JPEG memory content is kept in DStop or DStop2 mode

1: GFXMMU and JPEG memory content is lost in DStop or DStop2 mode

Bit 24 ITCMSO : instruction TCM and ETM memory shut-off in DStop/DStop2 mode

0: ITCM and ETM memories content is kept in DStop or DStop2 mode

1: ITCM and ETM memories content is lost in DStop or DStop2 mode

Bit 23 AHBRAM2SO : AHB SRAM2 shut-off in DStop/DStop2 mode

0: AHB SRAM2 content is kept in DStop or DStop2 mode

1: AHB SRAM2 content is lost in DStop or DStop2 mode

Bit 22 AHBRAM1SO : AHB SRAM1 shut-off in DStop/DStop2 mode

0: AHB SRAM1 content is kept in DStop or DStop2 mode

1: AHB SRAM1 content is lost in DStop or DStop2 mode

Bit 21 AXIRAM3SO : AXI SRAM3 shut-off in DStop/DStop2 mode

0: AXI SRAM3 content is kept in DStop or DStop2 mode

1: AXI SRAM3 content is lost in DStop or DStop2 mode

Bit 20 AXIRAM2SO : AXI SRAM2 shut-off in DStop/DStop2 mode

0: AXI SRAM2 content is kept in DStop or DStop2 mode

1: AXI SRAM2 content is lost in DStop or DStop2 mode

Bit 19 AXIRAM1SO : AXI SRAM1 shut-off in DStop/DStop2 mode

0: AXI SRAM1 content is kept in DStop or DStop2 mode

1: AXI SRAM1 content is lost in DStop or DStop2 mode

Bits 18:17 ALS[1:0] : analog voltage detector level selection

These bits select the voltage threshold detected by the AVD.

00: 1.7 V

01: 2.1 V

10: 2.5 V

11: 2.8 V

Bit 16 AVDEN : peripheral voltage monitor on \( V_{DDA} \) enable

0: peripheral voltage monitor on \( V_{DDA} \) disabled

1: peripheral voltage monitor on \( V_{DDA} \) enabled

Bits 15:14 SVOS[1:0] : system stop mode voltage scaling selection

These bits control the \( V_{CORE} \) voltage level in system Stop mode, to obtain the best trade-off between power consumption and performance.

00: reserved

01: SVOS5 scale 5

10: SVOS4 scale 4

11: SVOS3 scale 3 (default)

Bit 13 AVD_READY : analog voltage ready

This bit is only used when the analog switch boost needs to be enabled (see BOOSTE bit).

It must be set by software when the expected \( V_{DDA} \) analog supply level is available.

The correct analog supply level is indicated by the AVDO bit (PWR_CSR1 register) after setting the AVDEN bit and selecting the supply level to be monitored (ALS bits).

0: peripheral analog voltage \( V_{DDA} \) not ready (default)

1: peripheral analog voltage \( V_{DDA} \) ready

Bit 12 BOOSTE : analog switch VBoost control

This bit enables the booster to guarantee the analog switch AC performance when the \( V_{DD} \) supply voltage is below 2.7 V (reduction of the total harmonic distortion to have the same switch performance over the full supply voltage range)

The \( V_{DD} \) supply voltage can be monitored through the PVD and the PLS bits.

0: booster disabled (default)

1: booster enabled if analog voltage ready (AVD_READY = 1)

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

Bit 9 FLPS : Flash memory low-power mode in DStop or DStop2 mode

When it is set, the flash memory enters Low-power mode when the CPU domain is in DStop/DStop2 mode.

The power consumption is improved with a slightly longer wake-up time.

It is mandatory to set FLPS before entering DStop2 mode.

0: Flash memory remains in normal mode when the CPU domain enters DStop (quick restart time).

1: Flash memory enters Low-power mode when the CPU domain enters DStop/DStop2 (low-power consumption).

Bit 8 DBP : disable Backup domain write protection

In reset state, the RCC_BDCR register, the RTC registers (including the backup registers), BREN and MOEN bits in PWR_CR2 register, are protected against parasitic write access. This bit must be set to enable write access to these registers.

0: access to RTC, RTC backup registers and backup SRAM disabled

1: access to RTC, RTC backup registers and backup SRAM enabled

Bits 7:5 PLS[2:0] : programmable voltage detector level selection

These bits select the voltage threshold detected by the PVD.

000: 1.95 V

001: 2.1 V

010: 2.25 V

011: 2.4 V

100: 2.55 V

101: 2.7 V

110: 2.85 V

111: PVD_IN pin

Note: Refer to Section “Electrical characteristics” of the product datasheet for more details.

Bit 4 PVDE : programmable voltage detector enable

0: programmable voltage detector disabled

1: programmable voltage detector enabled

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

Bit 0 LPDS : low-power DeepSleep with SVOS3 (SVOS4 and SVOS5 always use low-power, regardless of the setting of this bit)

0: LDO voltage regulator or SMPS step-down converter in Main mode (MR) when SVOS3 selects Stop

1: LDO voltage regulator or SMPS step-down converter in Low-power mode (LPR) when SVOS3 selects Stop

6.8.2 PWR control status register 1 (PWR_CSR1)

Address offset: 0x004

Reset value: 0x0000 4000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MMC/DOAVDO
rr
1514131211109876543210
ACTVOS[1:0]ACTVOSRDYRes.Res.Res.Res.Res.Res.Res.Res.PVDORes.Res.Res.Res.
rrrr

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

Bit 17 MMCVDO : voltage detector output on \( V_{DDMMC} \)

This bit is set and cleared by hardware.

0: \( V_{DDMMC} \) is below 1.2 V.

1: \( V_{DDMMC} \) is above or equal to 1.2 V.

Bit 16 AVDO : analog voltage detector output on \( V_{DDA} \)

This bit is set and cleared by hardware. It is valid only if AVD on \( V_{DDA} \) is enabled by the AVDEN bit.

0: \( V_{DDA} \) is equal or higher than the AVD threshold selected with the ALS[2:0] bits.

1: \( V_{DDA} \) is lower than the AVD threshold selected with the ALS[2:0] bits.

Note: Since the AVD is disabled in Standby mode, this bit is equal to 0 after Standby or reset until the AVDEN bit is set.

Bits 15:14 ACTVOS[1:0] : VOS currently applied for \( V_{CORE} \) voltage scaling selection.

These bits reflect the last VOS value applied to the voltage regulator.

Bit 13 ACTVOSRDY : Voltage levels ready bit for currently used VOS

This bit is set to 1 by hardware when the voltage regulator and the SMPS step-down converter are both disabled and Bypass mode is selected in PWR control register 3 (PWR_CR3).

0: voltage level invalid, above or below current VOS selected level

1: voltage level valid, at current VOS selected level

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

Bit 4 PVDO : programmable voltage detect output

This bit is set and cleared by hardware. It is valid only if the PVD has been enabled by the PVDE bit.

0: \( V_{DD} \) is equal or higher than the PVD threshold selected through the PLS[2:0] bits.

1: \( V_{DD} \) is lower than the PVD threshold selected through the PLS[2:0] bits.

Note: since the PVD is disabled in Standby mode, this bit is equal to 0 after Standby or reset until the PVDE bit is set.

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

6.8.3 PWR control register 2 (PWR_CR2)

Address offset: 0x008

Reset value: 0x0000 0000

This register is not reset by wake-up from Standby mode, RESET signal and \( V_{DD} \) POR. It is only reset by \( V_{SW} \) POR and VSWRST reset.

This register must not be accessed when VSWRST bit in RCC_BDCR register resets the \( V_{SW} \) domain.

After reset, PWR_CR2 register is write-protected. Prior to modifying its content, the DBP bit in PWR_CR1 register must be set to disable the write protection.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.TEMPHTEMPLRes.Res.Res.Res.Res.BRRDY
rrr
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MONENRes.Res.Res.BREN
rwrw

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

Bit 23 TEMPH : temperature level monitoring versus high threshold

0: temperature below high threshold level

1: temperature equal or above high threshold level

Bit 22 TEMPL : temperature level monitoring versus low threshold

0: temperature above low threshold level

1: temperature equal or below low threshold level

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

Bit 16 BRRDY : backup regulator ready

This bit is set by hardware to indicate that the backup regulator is ready.

0: backup regulator not ready

1: backup regulator ready

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

Bit 4 MONEN : \( V_{BAT} \) and temperature monitoring enable

This feature is available only when the backup regulator is enabled ( \( BREN = 1 \) ).

0: \( V_{BAT} \) and temperature monitoring disabled

1: \( V_{BAT} \) and temperature monitoring enabled

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

Bit 0 BREN : backup regulator enable

When this bit set, the backup regulator (used to maintain the backup RAM content in Standby and \( V_{BAT} \) modes) is enabled.

If \( BREN \) is cleared, the backup regulator is switched off. The backup RAM can still be used in Run and Stop modes. However its content is lost in Standby and \( V_{BAT} \) modes.

If \( BREN \) is set, the application must wait till the backup regulator ready flag ( \( BRRDY \) ) is set to indicate that the data written into the SRAM is maintained in Standby and \( V_{BAT} \) modes.

0: backup regulator disabled

1: backup regulator enabled

6.8.4 PWR control register 3 (PWR_CR3)

Address offset: 0x00C

Reset value: 0x0000 0006

Reset by POR only, not reset by wake-up from Standby mode and RESET pad.

The lower byte of this register is written once after POR and must be written before changing VOS level or ck_sys clock frequency. No limitation applies to the upper bytes.

Programming data corresponding to an invalid combination of SMPSLEVEL, SMPSEXTHP, SMPSEN, LDOEN and BYPASS bits (see Table 34 ) are ignored: data are not written, the written-once mechanism locks the register and any further write access is ignored. The default supply configuration is kept and the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) goes on indicating invalid voltage levels. The system must be power cycled before writing a new value.

Illegal combinations of SMPSLEVEL, SMPSEXTHP, SMPSEN, LDOEN and BYPASS are described in Table 34 .

The SMPS step-down converter is not available on all packages. In this case, the SMPS step-down converter is disabled.

31302928272625242322212019181716
Res.Res.Res.Res.Res.USB33RDYUSBREGENUSB33DENRes.Res.Res.Res.Res.Res.Res.SMPSEXTRDY
rrwrwr
1514131211109876543210
Res.Res.Res.Res.Res.Res.VBRsVBERes.Res.SMPSLEVEL[1:0]SMPSEXTHPSMPSENLDOENBYPASS
rwrwrwrwrwrwrwrw

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

Bit 26 USB33RDY : USB supply ready

0: USB33 supply not ready

1: USB33 supply ready

Bit 25 USBREGEN : USB regulator enable

0: USB regulator disabled

1: USB regulator enabled

Bit 24 USB33DEN : \( V_{DD33USB} \) voltage level detector enable

0: \( V_{DD33USB} \) voltage level detector disabled

1: \( V_{DD33USB} \) voltage level detector enabled

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

Bit 16 SMPSEXTRDY : SMPS step-down converter external supply ready

This bit is set by hardware to indicate that the external supply from the SMPS step-down converter is ready.

0: external supply not ready

1: external supply ready

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

Bit 9 VBRS : \( V_{BAT} \) charging resistor selection

0: charge \( V_{BAT} \) through a 5 k \( \Omega \) resistor

1: charge \( V_{BAT} \) through a 1.5 k \( \Omega \) resistor

Bit 8 VBE : \( V_{BAT} \) charging enable

0: \( V_{BAT} \) battery charging disabled

1: \( V_{BAT} \) battery charging enabled

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

Bits 5:4 SMPSLEVEL[1:0] : SMPS step-down converter voltage output level selection

This bitfield is used when both the LDO and SMPS step-down converter are enabled with SMPSEN and LDOEN enabled or when SMPSEXTHP is enabled. In this case SMPSLEVEL must be written with a value different than 00 at system startup.

00: reset value

01: 1.8 V

10: 2.5 V

11: 2.5 V

Note: This bitfield is written once after POR and must be written before changing VOS level or ck_sys clock frequency.

Bit 3 SMPSEXTHP : SMPS step-down converter external power delivery selection

0: SMPS normal operating mode, no power delivery to external circuits

1: SMPS external operating mode, power delivery to external circuits

Note: This bit is written once after POR and must be written before changing VOS level or ck_sys clock frequency.

Bit 2 SMPSEN : SMPS step-down converter enable

0: SMPS disabled

1: SMPS enabled (default)

Note: This bit is written once after POR and must be written before changing VOS level or ck_sys clock frequency.

Bit 1 LDOEN : low drop-out regulator enable

0: low drop-out regulator disabled

1: low drop-out regulator enabled (default)

Note: This bit is written once after POR and must be written before changing VOS level or ck_sys clock frequency.

Bit 0 BYPASS : power management unit bypass

0: power management unit normal operation

1: power management unit bypassed, voltage monitoring still active

Note: This bit is written once after POR and must be written before changing VOS level or ck_sys clock frequency.

6.8.5 PWR CPU control register (PWR_CPUCR)

This register allows controlling CPU domain power.

Address offset: 0x010

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.RUN_SRDRes.CSSFRes.Res.SBFSTOPFRes.Res.PDDS_SRDRes.RETDS_CD
rwrwrrrwrw

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

Bit 11 RUN_SRD : prevent the SmartRun Domain (SRD) to enter Stop mode

0: SmartRun domain follows CPU subsystem modes.

1: SmartRun domain remains in Run mode regardless of CPU subsystem modes.

Bit 10 Reserved, must be kept at reset value.

Bit 9 CSSF : clear Standby and Stop flags (always read as 0)

This bit is cleared to 0 by hardware.

0: no effect

1: STOPF and SBF flags cleared

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

Bit 6 SBF : system Standby flag

This bit is set by hardware and cleared only by a POR or by setting the CSSF bit.

0: system has not been in Standby mode.

1: system has been in Standby mode.

Bit 5 STOPF : STOP flag

This bit is set by hardware and cleared only by any reset or by setting the CSSF bit.

0: system has not been in Stop mode.

1: system has been in Stop mode.

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

Bit 2 PDDS_SRD : system SmartRun domain power down DeepSleep

This bit allows defining the DeepSleep mode for system SmartRun domain.

0: Keeps Stop mode when CPU domain enters DeepSleep.

1: Allows Standby mode when CPU domain enters DeepSleep.

Bit 1 Reserved, must be kept at reset value.

Bit 0 RETDS_CD : CPU domain power down DeepSleep selection.

This bit defines the DeepSleep mode for CPU domain.

0: Go to DStop mode when CPU domain enters DeepSleep.

1: Go to DStop2 mode (Retention mode) when CPU domain enters DeepSleep.

6.8.6 PWR SmartRun domain control register (PWR_SRDCR)

This register allows controlling SmartRun domain power.

Address offset: 0x018

Reset value: 0x0000 2000

Following reset, VOSRDY is read 1 by software.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
VOS[1:0]VOSRDYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrwr

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

Bits 15:14 VOS[1:0] : voltage scaling selection according to performance

These bits control the V CORE voltage level and allow to obtain the best trade-off between power consumption and performance:

00: scale 3 (default)
01: scale 2
10: scale 1
11: scale 0

Note: VOS[1:0] can be changed only when ACTVOSRDY is valid (PWR_CSR1 register)

Bit 13 VOSRDY : VOS ready bit for V CORE voltage scaling output selection

This bit is set to 1 by hardware when Bypass mode is selected in PWR_CR3 register.

0: not ready, voltage level below VOS selected level
1: ready, voltage level at or above VOS selected level

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

6.8.7 PWR wake-up clear register (PWR_WKUPCR)

Address offset: 0x020

Reset value: 0x0000 0000

Reset only by system reset, not reset by wake-up from Standby mode.

Five wait states are required when writing this register. The AHB write access completes after the WKUPFx has been cleared.

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.WKUPC6WKUPC5WKUPC4WKUPC3WKUPC2WKUPC1
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

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

Bits 5:0 WKUPCn : clear wake-up pin flag for WKUPn (n = 6 to 1)

These bits are always read as 0.

0: no effect

1: writing 1 clears the WKUPFn wake-up pin flag (bit is cleared to 0 by hardware).

6.8.8 PWR wake-up flag register (PWR_WKUPFR)

Address offset: 0x024

Reset value: 0x0000 0000

Reset only by system reset, not reset by wake-up from Standby mode.

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.WKUPF6WKUPF5WKUPF4WKUPF3WKUPF2WKUPF1
rrrrrr

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

Bits 5:0 WKUPFn : wake-up pin WKUPn flag (n = 6 to 0)

This bit is set by hardware and cleared only by a RESET pin or by setting the WKUPCn bit in PWR_WKUPCR register.

0: no wake-up event occurred

1: a wake-up event received from WKUPn pin

6.8.9 PWR wake-up enable and polarity register (PWR_WKUPEPR)

Address offset: 0x028

Reset value: 0x0000 0000

Reset only by system reset, not reset by wake-up from Standby mode.

31302928272625242322212019181716
Res.Res.Res.Res.WKUPPUD6[1:0]WKUPPUD5[1:0]WKUPPUD4[1:0]WKUPPUD3[1:0]WKUPPUD2[1:0]WKUPPUD1[1:0]
rwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
Res.Res.WKUPP6WKUPP5WKUPP4WKUPP3WKUPP2WKUPP1Res.Res.
rwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 27:16 WKUPPUD(truncate(n/2)-7)[1:0] : wake-up pin pull configuration for WKUP(truncate(n/2)-7)

These bits define the I/O pad pull configuration used when WKUPEN(truncate(n/2)-7) = 1. The associated GPIO port pull configuration must be set to the same value or to 00.

The wake-up pin pull configuration is kept in Standby mode.

00: no pull-up

01: pull-up

10: pull-down

11: reserved

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

Bits 13:8 WKUPPn-7 : wake-up pin polarity bit for WKUPn-7

These bits define the polarity used for event detection on WKUPn-7 external wake-up pin.

0: detection on high level (rising edge)

1: detection on low level (falling edge)

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

Bits 5:0 WKUPENn+1 : enable wake-up pin WKUPn+1

These bits are set and cleared by software.

0: An event on WKUPn+1 pin does not wake-up the system from Standby mode.

1: A rising or falling edge on WKUPn+1 pin wakes up the system from Standby mode.

Note: An additional wake-up event is detected if WKUPn+1 pin is enabled (by setting the WKUPENn+1 bit) when WKUPn+1 pin level is already high when WKUPPn+1 selects rising edge, or low when WKUPPn+1 selects falling edge.

6.8.10 PWR register map

Table 47. Power control register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x000PWR_CR1Res.Res.Res.Res.SRDRAMSOHSITFSOGFXSOITCMSOAHBRAM2SOAHBRAM1SOAXIRAM3SOAXIRAM2SOAXIRAM1SOALS[1:0]AVDENSVOS[1:0]AVD_READYBOOSTERes.Res.FLPSDBPPLS[2:0]PVDERes.Res.Res.Res.LPDS
Reset value00000000000011000000000000
0x004PWR_CSR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.MMCVDAVDOACTVOS[1:0]ACTVOSRDYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000010
0x008PWR_CR2Res.Res.Res.Res.Res.Res.Res.Res.TEMPHTEMPLRes.Res.Res.Res.Res.BRRDYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000
0x00CPWR_CR3Res.Res.Res.Res.Res.USB33RDYUSBREGENUSB33DENRes.Res.Res.Res.Res.Res.Res.SMPSEXTRDYRes.Res.Res.Res.Res.Res.VBRVBERes.Res.Res.Res.Res.Res.Res.Res.
Reset value000000
0x010PWR_CPUCRRes.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.Res.
Reset value0000
0x014ReservedReserved
Reset value
0x018PWR_SRDCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VOS[1:0]VOSRDYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value010
0x020PWR_WKUPCRRes.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.Res.
Reset value
0x024PWR_WKUPFRRes.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.Res.
Reset value
0x028PWR_WKUPEPRRes.Res.Res.Res.WKUPPUPD6[1:0]WKUPPUPD5[1:0]WKUPPUPD4[1:0]WKUPPUPD3[1:0]WKUPPUPD2[1:0]WKUPPUPD1[1:0]Res.Res.Res.Res.Res.Res.Res.Res.WKUPP6WKUPP5WKUPP4WKUPP3WKUPP2WKUPP1Res.Res.WKUPEN6WKUPEN5WKUPEN4WKUPEN3WKUPEN2WKUPEN1
Reset value0000000000000000000000000000
Refer to Section 2.3 on page 131 for the register boundary addresses.