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 17. Power control block diagram

Power control block diagram showing internal components like Register interface, POR/PDR, Backup domain, System supply (SMPS and LDO), Analog domain, and USB regulator, connected to external pins and blocks like RCC, EXT1, and Power management.

The diagram illustrates the internal architecture of the Power control (PWR) block. On the left, external pins are listed: PDR_ON, VDD, VBAT, VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VDDLDO, VCAP, VDDA, VSSA, VREF+, VREF-, VDD50USB, VDD33USB, and VSS. These pins connect to internal functional blocks:

On the right, the block connects to external systems:The diagram is labeled with MSv63813V3 in the bottom right corner.

Power control block diagram showing internal components like Register interface, POR/PDR, Backup domain, System supply (SMPS and LDO), Analog domain, and USB regulator, connected to external pins and blocks like RCC, EXT1, and Power management.

6.3.1 PWR pins and internal signals

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

Table 28. 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
VREF+,VREF-Supply input/outputExternal reference voltage for ADCs and DAC
VBATSupply input/outputBackup battery supply input
VDDSMPSSupply inputStep-down converter supply input
VLXSMPSSupply outputStep-down converter supply output
VFBSMPSSupply inputStep-down converter feedback voltage sense
VSSSMPSSupply inputStep-down converter ground
VDDLDO (1)Supply inputVoltage regulator supply input
VCAPSupply Input/OutputsDigital core domain supply
VDD50USBSupply inputUSB regulator supply input
VDD33USBSupply Input/OutputsUSB regulator supply output or external USB supply input
VSSSupply inputMain ground
AHBInput/outputAHB register interface
PDR_ONInputPower Down Reset enable
  1. 1. When LDO is available but VDDLDO pin is not present on the package, VDDLDO is internally connected to VDD.

Table 29. PWR internal input/output signals

Signal nameSignal typeDescription
AHBInput/outputAHB register interface
pwr_pvd_wkupOutputProgrammable voltage detector output
pwr_avd_wkupOutputAnalog voltage detector output
pwr_por_rstOutputPower-on reset
pwr_bor_rstOutputBrownout reset
exti_c_wkupInputCPU wakeup request
exti_d3_wkupInputD3 domain wakeup request
pwr_d1_wkupOutputD1 domain bus matrix clock wakeup request

Table 29. PWR internal input/output signals (continued)

Signal nameSignal typeDescription
pwr_d2_wkupOutputD2 domain bus matrix clock wakeup request
pwr_d3_wkupOutputD3 domain bus matrix clock wakeup request

6.4 Power supplies

The device requires \( V_{DD} \) and \( V_{DDSMPS} \) power supplies as well as independent supplies for \( V_{DDLDO} \) , \( V_{DDA} \) , \( V_{DDUSB} \) , and \( V_{CAP} \) . It also provides regulated supplies for specific functions (step-down converter, voltage regulator, USB regulator).

This power supply must be connected to \( V_{DD} \) when no battery is used.

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 might be used with limited features and performance. For more details, refer to section “General operating conditions” of the device datasheets.

Figure 18. Power supply overview

Power supply overview diagram showing various voltage regulators and power domains: Core domain (V_CORE), D3 domain, D2 domain, D1 domain, VDD domain, Backup domain, and Analog domain. It includes components like Step Down Converter, LDO voltage regulator, USB regulator, and Backup regulator, along with their respective power pins and internal logic blocks.

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

MSv63814V5

Power supply overview diagram showing various voltage regulators and power domains: Core domain (V_CORE), D3 domain, D2 domain, D1 domain, VDD domain, Backup domain, and Analog domain. It includes components like Step Down Converter, LDO voltage regulator, USB regulator, and Backup regulator, along with their respective power pins and internal logic blocks.

By configuring the SMPS step-down converter and LDO voltage regulator, the supply configurations shown in Figure 19 are supported for the V CORE core domain and an external supply.

Note: The SMPS step-down converter is not available on all packages, and the Bypass mode is available only when the SMPS is available.

Figure 19. System supply configurations

Six circuit diagrams showing different system supply configurations for V_CORE. Each diagram shows the connection between V_DD, SMPS, V reg (LDO), and V_CORE. Configurations include: 1. LDO supply (SMPS off, V reg on); 2. Direct SMPS supply (SMPS on, V reg off); 3. SMPS supplies LDO (no external supply) (SMPS on, V reg on); 4. External SMPS supply, supplies LDO (SMPS on, V reg on); 5. External SMPS supply and bypass (SMPS on, V reg off); 6. Bypass (SMPS off, V reg off).

The figure displays six system supply configurations for the V CORE domain, arranged in a 3x2 grid. Each configuration shows the internal components: SMPS (Step-Down Converter), V reg (Voltage Regulator/LDO), and their connections to V DD , V CORE , and V SS .

Six circuit diagrams showing different system supply configurations for V_CORE. Each diagram shows the connection between V_DD, SMPS, V reg (LDO), and V_CORE. Configurations include: 1. LDO supply (SMPS off, V reg on); 2. Direct SMPS supply (SMPS on, V reg off); 3. SMPS supplies LDO (no external supply) (SMPS on, V reg on); 4. External SMPS supply, supplies LDO (SMPS on, V reg on); 5. External SMPS supply and bypass (SMPS on, V reg off); 6. Bypass (SMPS off, V reg off).

MSV48170V1

The different supply configurations are controlled through the LDOEN, SDEN, SDEXTHP, SDLEVEL and BYPASS bits in PWR control register 3 (PWR_CR3) register according to Table 30 .

Table 30. Supply configuration control

IDSupply configurationSDLEVELSDEXTHPSDENLDOENBYPASSDescription
0Default configuration000110
  • \( V_{CORE} \) power domains are supplied from the LDO according to VOS.
  • – SMPS step-down converter enabled at 1.36 V, may be used to supply the LDO.
1LDO supplyxx010
  • \( V_{CORE} \) power domains are supplied from the LDO according to VOS.
  • – LDO power mode (Main, LP, Off) will follow system low-power modes.
  • – SMPS step-down converter disabled.
2Direct SMPS step-down converter supplyx0100
  • \( V_{CORE} \) power domains are supplied from SMPS step-down converter according to VOS.
  • – LDO bypassed.
  • – SMPS step-down converter power mode (MR, LP, Off) will follow system low-power modes.
3SMPS step-down converter supplies LDO,01 or 100110
  • \( V_{CORE} \) power domains are supplied from the LDO according to VOS
  • – LDO power mode (Main, LP, Off) will follow system low-power modes.
  • – SMPS step-down converter enabled according to SDLEVEL, and supplies the LDO.
  • – SMPS step-down converter power mode (MR, LP, Off) will follow system low-power modes.
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) will follow system low-power modes.
  • – SMPS step-down converter enabled according to SDLEVEL used to supply external circuits and may supply the LDO.
  • – SMPS step-down converter 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 enabled according to SDLEVEL used to supply external circuits and may supply the external source for \( V_{CORE} \) .
  • – SMPS step-down converter forced ON in MR mode.

Table 30. Supply configuration control (continued)

IDSupply configurationSDLEVELSDEXTHPSDENLDOENBYPASSDescription
6SMPS step-down converter disabled and LDO Bypassxx001– V CORE supplied from external source
– SMPS step-down converter disabled and LDO bypassed, voltage monitoring still active.
NAIllegalxx000– Illegal combination, the default configuration is kept. (write data will be ignored).
xxx11
x0101
00x110
x1100
001101

6.4.1 System supply startup

The system startup sequence from power-on in different supply configurations is the following (see Figure 20 and Figure 21 for LDO supply and Direct SMPS supply, respectively):

  1. 1. When the system is powered on, the POR monitors V DD supply. Once V DD is above the POR threshold level, the SMPS step-down converter and voltage regulator are enabled in the default supply configuration:
    • – The SMPS step-down converter output level is set at 1.36 V.
    • – The voltage regulator output level is set at 1.0 V in accordance with the VOS3 level configured in PWR D3 domain control register (PWR_D3CR) .
  2. 2. The system is kept in reset mode as long as V CORE is not stable.
  3. 3. Once V CORE is stable, 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 operations to RAM are not allowed, 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.

V CORE supplied from the voltage regulator (LDO)

When V CORE is supplied from the voltage regulator (LDO), the V CORE voltage settles directly at VOS3 level. However the SMPS step-down converter V FB SMPS output voltage is set at 1.36 V. ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) indicates that the voltage levels are invalid.

The software has to program the supply configuration in PWR control register 3 (PWR_CR3) . In addition, the V FB SMPS voltage level must reach the programmed SMPS step-down converter voltage output level (SDLEVEL) so that ACTVOSRDY indicates valid voltage levels (see Figure 20 ).

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 wait until ACTVOSRDY is set and ACTVOS reflects the awaited value 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 level.

Figure 20. Device startup with V CORE supplied from voltage regulator

Timing diagram showing device startup with V_CORE supplied from voltage regulator. The diagram plots several signals over time, divided into phases (1) through (5b).

The timing diagram illustrates the sequence of events during device startup when V CORE is supplied from the LDO. The signals shown are:

Phases are marked at the bottom: (1) Power down, (2) Reset, (3) Wait Oscillator, (4) HW system Init, (5a) Run*, (5b) Run. The transition from (5a) to (5b) occurs when ACTVOSRDY becomes valid.

Timing diagram showing device startup with V_CORE supplied from voltage regulator. The diagram plots several signals over time, divided into phases (1) through (5b).
  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.

V CORE directly supplied from the SMPS step-down converter

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

Figure 21. Device startup with V CORE supplied directly from SMPS step-down converter

Timing diagram showing device startup with V_CORE supplied directly from SMPS step-down converter. The diagram plots several signals over time, divided into phases (1) through (5b).

The timing diagram illustrates the startup sequence of the device when V CORE is directly supplied from the SMPS step-down converter. The signals shown are:

Phases: (1) Power down, (2) Reset, (3) Wait Oscillator, (4) HW system Init, (5a) Run (1) , (5b) Run.

MSv63816V1

Timing diagram showing device startup with V_CORE supplied directly from SMPS step-down converter. The diagram plots several signals over time, divided into phases (1) through (5b).

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.

When exiting from Standby mode, the supply configuration is known by the system since the content of 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.

\( V_{CORE} \) supplied in Bypass mode (LDO and SMPS OFF)

The devices that feature the SMPS can also be used in Bypass mode.

When \( V_{CORE} \) is supplied in Bypass mode (LDO and SMPS OFF), the externally supplied \( V_{CORE} \) voltage must first settle at a default level higher than 1.1 V. Due to the LDO default state after power-up (enabled by default), the external \( V_{CORE} \) voltage must remain higher than 1.1 V until the LDO is disabled by software.

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 22. Device startup with \( V_{CORE} \) supplied in Bypass mode from external regulator

Timing diagram showing device startup with V_CORE supplied in Bypass mode from an external regulator. The diagram plots V_DD, pwr_por_rst, V_CORE supplied externally, Operating mode, ck_sys, Supply configuration, BYPASS, LDOEN, and SDEN over time. V_DD rises to a POR threshold. pwr_por_rst goes low when V_DD reaches the threshold. V_CORE supplied externally rises to a minimum of 1.1V. Operating mode transitions from Power down to Reset, then Wait Oscillator, then HW system Init, then Run*, and finally Run. ck_sys is a square wave starting in HW system Init. Supply configuration is Default configuration until Run*, then BYPASS mode. BYPASS, LDOEN, and SDEN are high in Default configuration and low in BYPASS mode.

The timing diagram illustrates the sequence of events during device startup when \( V_{CORE} \) is supplied in bypass mode from an external regulator. The vertical axis represents various signals and states, while the horizontal axis represents time, divided into distinct phases by vertical dashed lines.

MSv63817V2

Timing diagram showing device startup with V_CORE supplied in Bypass mode from an external regulator. The diagram plots V_DD, pwr_por_rst, V_CORE supplied externally, Operating mode, ck_sys, Supply configuration, BYPASS, LDOEN, and SDEN over time. V_DD rises to a POR threshold. pwr_por_rst goes low when V_DD reaches the threshold. V_CORE supplied externally rises to a minimum of 1.1V. Operating mode transitions from Power down to Reset, then Wait Oscillator, then HW system Init, then Run*, and finally Run. ck_sys is a square wave starting in HW system Init. Supply configuration is Default configuration until Run*, then BYPASS mode. BYPASS, LDOEN, and SDEN are high in Default configuration and low in BYPASS mode.

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, LDO voltage regulator or by an external supply ( \( V_{CAP} \) ). \( V_{CORE} \) supplies all the digital circuitries

except for the backup domain and the Standby circuitry. The \( V_{CORE} \) domain is split into 3 sections:

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

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

Note: The SMPS step-down converter and the LDO are not available on all packages.

LDO voltage regulator

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

The voltage regulator provides three different operating modes: Main (MR), Low-power (LP) or Off. These modes will be used depending on the system operating modes (Run, Stop and Standby).

The LDO regulator is in Main mode and provides full power to the \( V_{CORE} \) domain (core, memories and digital peripherals). The regulator output voltage can be scaled by software to different voltage levels (VOS0, VOS1, VOS2, and VOS3) that are configured through VOS bits in PWR D3 domain control register (PWR_D3CR) . 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. VOS can be changed on-the-fly to adapt to the required system performance.

The voltage regulator supplies the \( V_{CORE} \) domain to retain the content of registers and internal memories.

The regulator can be kept in Main mode to allow fast exit from Stop mode, or can be set in LP mode to obtain a lower \( V_{CORE} \) supply level and extend the exit-from-Stop latency. The regulator mode is selected through the SVOS and LPDS bits in PWR control register 1 (PWR_CR1) . Main mode and LP mode are allowed if SVOS3 voltage scaling is selected, while only LP mode is possible for SVOS4 and SVOS5 scaling. Due to a lower voltage level for SVOS4 and SVOS5 scaling, the Stop mode consumption can be further reduced.

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

Note: The LDO is not available on all packages.

For more details, refer to the voltage regulator section in the datasheets.

SMPS step-down converter regulator

The SMPS step-down converter requires an external coil to be connected between the dedicated VLXSMPS pin and, via a capacitor, to VSS.

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) which can supply the voltage regulator and optionally an external circuitry.

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

When the SMPS step-down converter 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 step-down converter 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 SDLEVEL bits in PWR control register 3 (PWR_CR3) . \( V_{DD\_extern} \) is supplied at all times with full power whatever the system modes (Run, Stop, Standby).

Note: The SMPS step-down converter and the LDO are not available on all packages. When the LDO is not available, the SMPS supplies the voltage regulator and optionally an external circuitry.

6.4.3 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_{OS} \) bits of \( PWR\_D3CR \) register. The RAMs must only be accessed for write 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.

6.4.4 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 which is supplied from a battery or from an 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\text{ V} \) , a current may be injected into \( V_{BAT} \) 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} \) , and add a 100 nF external ceramic capacitor between \( V_{BAT} \) and \( V_{SS} \) .

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 and PC15 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-bit, 16-bit 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 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.

After a tamper event, the backup RAM can no more be used until an erase is explicitly requested: reading the backup RAM returns 0x0, and any write different from 0 is not effective. The backup RAM can be erased:

Figure 23. Backup domain

Figure 23. Backup domain diagram showing the internal architecture of the backup domain. It includes a switch (Vsw) between VBAT and VDD, a voltage regulator connected to VDD, VCAP, and VDDLO, a backup domain containing a backup regulator, backup RAM, RTC, and LSE, and a backup interface connecting the core domain to the backup domain. The diagram is labeled MSV40338V2.

The diagram illustrates the internal architecture of the backup domain. On the left, the V CORE domain contains a Backup interface . On the right, the Backup domain contains a Backup RAM , RTC , and LSE . A Voltage regulator is connected to V DD , V CAP , and V DDLO . A switch ( V sw ) connects V BAT and V DD . A Backup regulator is connected to the Backup RAM . Backup IOs are also shown. The diagram is labeled MSV40338V2.

Figure 23. Backup domain diagram showing the internal architecture of the backup domain. It includes a switch (Vsw) between VBAT and VDD, a voltage regulator connected to VDD, VCAP, and VDDLO, a backup domain containing a backup regulator, backup RAM, RTC, and LSE, and a backup interface connecting the core domain to the backup domain. The diagram is labeled MSV40338V2.

6.4.5 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 \( \Omega \) resistor or through a 1.5 k \( \Omega \) 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.6 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 also have a separate reference voltage, available on V REF+ pin. The user can connect a separate external reference voltage on V REF+ .

The V REF+ controls the highest voltage, represented by the full scale value, the lower voltage reference ( V REF- ) being connected to V SSA .

When enabled by ENVR bit in the VREFBUF control and status register (see Section 32: 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 VREF+/VREF- pins.

When the internal voltage reference buffer is disabled by ENVR, V REF+ is delivered by an independent external reference supply voltage.

Note: V REF+ and V REF- pins are not available on all packages (in this case they are connected internally respectively to VDDA and VSSA). Do not enable the internal voltage reference buffer when an external power supply is applied to the V REF+ pin.

6.4.7 USB regulator

The USB transceivers are 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, which is powered through the V DD50USB pin generally connected to the USB VBUS line. 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_CR3 register.

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. The V DD33USB supply level detector must be enabled through USB33DEN bit in PWR_CR3 register before using the USB transceivers.

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

Figure 24. USB supply configurations

Figure 24 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator block labeled '(ON)' connected to VDD33USB, VDD50USB, and Vss pins. The VDD50USB pin is connected to VDD50. The right diagram, labeled 'External USB supply', shows a USB regulator block labeled '(Bypass)' connected to VDD33USB, VDD50USB, and Vss pins. The VDD33USB and VDD50USB pins are connected together and to VDD30. The Vss pin is connected to Vss.

The diagram illustrates two power supply configurations for a USB transceiver. In the left configuration, labeled 'USB regulator supply', the transceiver's V DD33USB , V DD50USB , and V SS pins are connected to a 'USB regulator (ON)' block. The V DD50USB pin is connected to an external V DD50 supply. In the right configuration, labeled 'External USB supply', the transceiver's V DD33USB and V DD50USB pins are connected together and to an external V DD30 supply. The V SS pin is connected to V SS . The 'USB regulator (Bypass)' block is shown in this configuration, indicating it is disabled.

Figure 24 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator block labeled '(ON)' connected to VDD33USB, VDD50USB, and Vss pins. The VDD50USB pin is connected to VDD50. The right diagram, labeled 'External USB supply', shows a USB regulator block labeled '(Bypass)' connected to VDD33USB, VDD50USB, and Vss pins. The VDD33USB and VDD50USB pins are connected together and to VDD30. The Vss pin is connected to Vss.

MSV40339V1

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 25 ). For more details concerning the power-on/power-down reset threshold, refer to the electrical characteristics section of the datasheets.

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

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

Figure 25: 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 a low level to a peak and then falls linearly. Two horizontal dashed lines represent the Power-On Reset (POR) threshold and the Power-Down Reset (PDR) threshold, with a hysteresis gap between them. The rising edge of VDD crosses the POR threshold, and the falling edge crosses the PDR threshold. Below the graph, a signal labeled 'pwr_por_rst' is shown. This signal is initially high (active low reset) and transitions to low (inactive) at the time the rising VDD crosses the POR threshold. It remains low until the falling VDD crosses the PDR threshold, at which point it transitions back to high. A horizontal arrow labeled 'Temporisation T_RSTTEMPO' indicates the time interval between the POR threshold crossing and the reset signal going low.
Figure 25: 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 a low level to a peak and then falls linearly. Two horizontal dashed lines represent the Power-On Reset (POR) threshold and the Power-Down Reset (PDR) threshold, with a hysteresis gap between them. The rising edge of VDD crosses the POR threshold, and the falling edge crosses the PDR threshold. Below the graph, a signal labeled 'pwr_por_rst' is shown. This signal is initially high (active low reset) and transitions to low (inactive) at the time the rising VDD crosses the POR threshold. It remains low until the falling VDD crosses the PDR threshold, at which point it transitions back to high. A horizontal arrow labeled 'Temporisation T_RSTTEMPO' indicates the time interval between the POR threshold crossing and the reset signal going low.
  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 brown-out 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 \( V_{BOR0} \) to start the system option byte programming sequence. The power-down is then monitored by the PDR (see Section 6.5.1 ).

Figure 26. BOR thresholds

Figure 26. BOR thresholds. A graph showing VDD supply voltage (Y-axis) versus Temperature (T) (X-axis). The graph illustrates the BOR threshold levels (BORrise and BORfall) and the hysteresis between them. The BORrise level is the voltage at which the system starts to reset as VDD drops. The BORfall level is the voltage at which the system stops resetting as VDD rises. The hysteresis is the voltage difference between BORrise and BORfall. The pwr_bor_rst signal is shown as a horizontal line that goes low when VDD drops below BORrise and goes high when VDD rises above BORfall.

The figure is a graph showing the relationship between supply voltage \( V_{DD} \) (Y-axis) and Temperature \( T \) (X-axis). The graph illustrates the BOR threshold levels and hysteresis. The \( V_{DD} \) voltage is shown as a trapezoidal shape, starting at a low value, rising to a high value, and then falling back to a low value. The BORrise threshold is indicated by a horizontal dashed line at the rising edge of the \( V_{DD} \) curve. The BORfall threshold is indicated by a horizontal dashed line at the falling edge of the \( V_{DD} \) curve. The hysteresis is the vertical distance between the BORrise and BORfall thresholds. Below the graph, the pwr_bor_rst signal is shown as a horizontal line that goes low when \( V_{DD} \) drops below BORrise and goes high when \( V_{DD} \) rises above BORfall. The text MSv40341V2 is visible in the bottom right corner of the graph area.

Figure 26. BOR thresholds. A graph showing VDD supply voltage (Y-axis) versus Temperature (T) (X-axis). The graph illustrates the BOR threshold levels (BORrise and BORfall) and the hysteresis between them. The BORrise level is the voltage at which the system starts to reset as VDD drops. The BORfall level is the voltage at which the system stops resetting as VDD rises. The hysteresis is the voltage difference between BORrise and BORfall. The pwr_bor_rst signal is shown as a horizontal line that goes low when VDD drops below BORrise and goes high when VDD rises above BORfall.
  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 \( V_{REFINT} \) 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, assuming it has been enabled through the EXTI registers. The PVDO output interrupt can be generated when \( V_{DD} \) or PVD_IN voltage drops below the PVD threshold and/or when \( V_{DD} \) or PVD_IN voltage rises above the PVD threshold depending on EXTI rising/falling edge configuration. As an example the service routine could perform emergency shutdown tasks.

Figure 27. PVD thresholds

Figure 27. PVD thresholds. A graph showing the relationship between VDD or PVD_IN voltage and time (T). The graph illustrates the PVD rise threshold (PVDrise) and the PVD fall threshold (PVDfall) with a hysteresis band between them. Below the graph, two timing diagrams show the PVDO output and the PVDEN enable signal. The PVDO signal is high when the voltage is above the PVDrise threshold and low when it is below the PVDfall threshold. The PVDEN signal is shown as a pulse that enables the PVD function. The diagram is labeled MSv40342V2.

The figure illustrates the PVD thresholds and timing. The top graph shows the voltage ( \( V_{DD} \) or PVD_IN) over time (T). The voltage rises and falls, crossing two threshold levels: PVDrise (higher) and PVDfall (lower). The hysteresis is the voltage difference between these two thresholds. Below the graph, the PVDO output signal is shown. It is high when the voltage is above the PVDrise threshold and low when it is below the PVDfall threshold. The PVDEN signal is shown as a pulse that enables the PVD function. The diagram is labeled MSv40342V2.

Figure 27. PVD thresholds. A graph showing the relationship between VDD or PVD_IN voltage and time (T). The graph illustrates the PVD rise threshold (PVDrise) and the PVD fall threshold (PVDfall) with a hysteresis band between them. Below the graph, two timing diagrams show the PVDO output and the PVDEN enable signal. The PVDO signal is high when the voltage is above the PVDrise threshold and low when it is below the PVDfall threshold. The PVDEN signal is shown as a pulse that enables the PVD function. The diagram is labeled MSv40342V2.

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 28. AVD thresholds

Figure 28. AVD thresholds. A graph showing V_DDA vs Time (T). The V_DDA signal rises to a peak and then falls. Two horizontal dashed lines represent the AVDrise and AVDfall thresholds. The vertical distance between these lines is labeled 'hysteresis'. Below the graph, two digital signals are shown: AVDO and AVDEN. AVDO is high when V_DDA is between the thresholds and low otherwise. AVDEN is high when the system is enabled ('SW enable') and low when disabled ('SW disable').

The figure illustrates the operation of the Analog Voltage Detector (AVD). The top graph plots the supply voltage \( V_{DDA} \) against time (T). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the AVDrise (rising threshold) and AVDfall (falling threshold) levels. The vertical gap between these thresholds is labeled 'hysteresis'. Below the graph, two digital signals are shown: AVDO (Analog Voltage Detector Output) and AVDEN (Analog Voltage Detector Enable). AVDO is high when \( V_{DDA} \) is between the thresholds and low otherwise. AVDEN is high when the system is enabled ('SW enable') and low when disabled ('SW disable').

Figure 28. AVD thresholds. A graph showing V_DDA vs Time (T). The V_DDA signal rises to a peak and then falls. Two horizontal dashed lines represent the AVDrise and AVDfall thresholds. The vertical distance between these lines is labeled 'hysteresis'. Below the graph, two digital signals are shown: AVDO and AVDEN. AVDO is high when V_DDA is between the thresholds and low otherwise. AVDEN is high when the system is enabled ('SW enable') and low when disabled ('SW disable').
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.5 Battery voltage thresholds

The battery voltage supply monitors the backup domain \( V_{SW} \) level. \( V_{SW} \) is monitored by comparing it with two threshold levels: \( V_{BATHigh} \) and \( V_{BATLow} \) . \( VBATH \) and \( VBATL \) flags in the PWR control register 2 (PWR_CR2) , indicate if \( V_{SW} \) is higher or lower than the threshold.

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. As an example the \( V_{SW} \) levels monitoring could be used to trigger a tamper event for an over or under voltage of the RTC power supply domain (available in \( VBAT \) mode).

\( VBATH \) and \( VBATL \) are connected to RTC tamper signals (see Section 51: Real-time clock (RTC) ).

Note: Battery voltage monitoring is only available when the backup regulator is enabled ( \( BREN \) bit set in PWR control register 2 (PWR_CR2) ).

When the device does not operate in \( VBAT \) mode, the battery voltage monitoring checks \( V_{DD} \) level. When \( V_{DD} \) is available, \( V_{SW} \) is connected to \( V_{DD} \) through the internal power switch (see Section 6.4.4: Backup domain ).

Figure 29. \( VBAT \) thresholds

Figure 29. 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, are shown. VBATH is high when VBAT > VBATHigh and low otherwise. VBATL is low when VBAT < VBATLow and high otherwise. The graph shows a trapezoidal voltage waveform. The top flat part is labeled VBAT. The rising edge crosses VBATHigh and VBATLow. The falling edge crosses VBATLow and VBATHigh. Vertical dashed lines connect the crossings to the digital signals below. MSv40344V1 is in the bottom right corner.

The figure illustrates the battery voltage ( \( V_{BAT} \) ) monitoring process over time ( \( T \) ). The top graph shows \( V_{BAT} \) as a trapezoidal waveform. Two horizontal dashed lines represent the threshold levels \( V_{BATHigh} \) and \( V_{BATLow} \) . Below the graph, two digital signals are shown: \( VBATH \) and \( VBATL \) . \( VBATH \) is high when \( V_{BAT} > V_{BATHigh} \) and low otherwise. \( VBATL \) is low when \( V_{BAT} < V_{BATLow} \) and high otherwise. Vertical dashed lines indicate the transitions of these signals corresponding to the crossings of the voltage thresholds. The identifier MSv40344V1 is located in the bottom right corner of the diagram area.

Figure 29. 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, are shown. VBATH is high when VBAT > VBATHigh and low otherwise. VBATL is low when VBAT < VBATLow and high otherwise. The graph shows a trapezoidal voltage waveform. The top flat part is labeled VBAT. The rising edge crosses VBATHigh and VBATLow. The falling edge crosses VBATLow and VBATHigh. Vertical dashed lines connect the crossings to the digital signals below. MSv40344V1 is in the bottom right corner.
  1. 1. For thresholds and hysteresis values, refer to the datasheets.

6.5.6 Temperature thresholds

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 could be used to trigger a routine to perform temperature control tasks.

The temperature thresholds are available only when the backup regulator is enabled ( \( BREN \) bit set in the PWR_CR2 register).

\( TEMPH \) and \( TEMPL \) wakeup interrupts are available on the RTC tamper signals (see Section 51: Real-time clock (RTC) ).

Figure 30. Temperature thresholds

Figure 30. Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature 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 are shown: TEMP_H and TEMP_L. TEMP_H is high when the temperature is above TEMP_high and low otherwise. TEMP_L is low when the temperature is below TEMP_low and high otherwise. The graph shows hysteresis between the rising and falling temperature curves.

MSv40345V1

Figure 30. Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature 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 are shown: TEMP_H and TEMP_L. TEMP_H is high when the temperature is above TEMP_high and low otherwise. TEMP_L is low when the temperature is below TEMP_low and high otherwise. The graph shows hysteresis between the rising and falling temperature curves.

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 supply 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) :

Figure 31. \( V_{CORE} \) overvoltage protection Figure 31: V_CORE overvoltage protection diagram. The top graph shows V_CORE rising to 1.36 V (Overvoltage), then dropping to 1.0 V. A label 'Hardware forces SD 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 SD configuration'), Overvoltage enable, and ACTVOSRDY. The MSV63818V1 code is in the bottom right.

The figure illustrates the \( V_{CORE} \) overvoltage protection mechanism. The top graph plots \( V_{CORE} \) against time (T). The voltage rises to 1.36 V, labeled as 'Overvoltage', and then drops to 1.0 V. A label 'Hardware forces SD 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 SD configuration'), Overvoltage enable, and ACTVOSRDY. The MSV63818V1 code is in the bottom right.

Figure 31: V_CORE overvoltage protection diagram. The top graph shows V_CORE rising to 1.36 V (Overvoltage), then dropping to 1.0 V. A label 'Hardware forces SD 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 SD configuration'), Overvoltage enable, and ACTVOSRDY. The MSV63818V1 code is in the bottom right.

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 D1, D2 and system D3 power domains can operate in one of the following operating modes:

The operating modes for D1 domain and D2 domain are independent. However system D3 domain power modes depend on D1 and D2 domain modes:

D1, D2 and system D3 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 D1 domain and/or D2 domain supply can be powered down individually when the domains are in DStandby mode.

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 Operating modes

Several system operating modes are available to tune the system according to the performance required, i.e. when the CPU does not need to execute code and are 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 wakeup 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, D2 subsystem and system D3 autonomous wakeup. A CPU subsystem can include multiple domains depending on its peripheral allocation (see Section 8.5.11: Peripheral clock gating control ).

The following operating modes are available for the different system blocks (see Table 31 ):


a. The PDDS_Dn bits belong to PWR CPU control register (PWR_CPUCR) .

In Run mode, power consumption can be reduced by one of the following means:

Table 31. Summary of the operating mode

SystemDomainCPUEntryWakeupSystem oscillatorSystem clockDomain bus matrix clkPeripheral clockCPU clockVoltage regulatorDomain supply
RunDRun (1)CRun--ONONONONONONON
CSleepWFI or return from ISR or WFEAny interrupt or eventON/OFF (2)OFF
SLEEPDEEP bit + WFI or return from ISR or WFEAny EXTI interrupt or eventON/OFF (3)
DStopCStopSLEEPDEEP bit + WFI or return from ISR or WFEON/OFF (6)OFFOFFOFFOFFONOFF
DStandbySLEEPDEEP bit + WFI or return from ISR or WFE or Wakeup source cleared (5)
Stop (4)DStopON
Stop (4)DStandbyOFF
Standby (7)DStandbyAll PDDS_Dn bit + SLEEPDEEP bit + WFI or return from ISR or WFE or Wakeup source cleared (5)WKUP pins rising or falling edge, RTC alarm (Alarm A or Alarm B), RTC Wakeup event, RTC tamper events, RTC time stamp event, external reset in NRST pin, IWDG resetOFFOFFOFF

1. In the D2 domain, the CPU subsystem has an allocated peripheral in the domain and operates in CRun or CSleep mode.

2. The CPU subsystem peripherals that have a PERxLPEN bit will operate accordingly.

3. The CPU subsystem peripherals located in the D3 domain that have a PERxAMEN bit operate accordingly.

4. All domains need to be in DStop Or DStandby.

5. When the CPU is in CStop and D3 domain in Autonomous mode, the last EXTI Wakeup source is cleared.

6. When the system oscillator HSI or CSI is used, the state is controlled by HSIKERON and CSICKERON, otherwise the system oscillator is OFF.

7. All domains are in DStandby mode.

6.6.2 Voltage scaling

The D1, D2, and D3 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 D3 domain control register (PWR_D3CR) 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 register bit.

Figure 32.\( V_{CORE} \) voltage scaling versus system power modes Figure 32: V_CORE voltage scaling versus system power modes diagram. The diagram shows three power modes: Standby, Run, and Stop. Standby mode contains 'POWER DOWN'. Run mode contains 'MAIN VOS3', 'MAIN VOS0', 'MAIN VOS1', and 'MAIN VOS2'. Stop mode contains 'MAIN or LP SVOS3', 'LP SVOS4', and 'LP SVOS5'. Arrows indicate transitions between modes and voltage scaling options. A legend on the right shows: SW Run mode (green arrow), Stop mode (blue arrow), Standby mode (red arrow), and Wakeup (yellow arrow). A 'reset' arrow points to MAIN VOS0. The diagram is labeled MSv48172V1.
Figure 32: V_CORE voltage scaling versus system power modes diagram. The diagram shows three power modes: Standby, Run, and Stop. Standby mode contains 'POWER DOWN'. Run mode contains 'MAIN VOS3', 'MAIN VOS0', 'MAIN VOS1', and 'MAIN VOS2'. Stop mode contains 'MAIN or LP SVOS3', 'LP SVOS4', and 'LP SVOS5'. Arrows indicate transitions between modes and voltage scaling options. A legend on the right shows: SW Run mode (green arrow), Stop mode (blue arrow), Standby mode (red arrow), and Wakeup (yellow arrow). A 'reset' arrow points to MAIN VOS0. The diagram is labeled MSv48172V1.

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, DStandby), and on the system D3 autonomous wakeup:

The domain operating mode can depend on the CPU subsystem when peripherals are allocated in the corresponding domain. The domain mode selection between DStop and DStandby is configured via domain dedicated PDDS_Dn bits in PWR CPU control register (PWR_CPUCR) . The CPU can choose to keep a domain in DStop, or allow a domain to enter DStandby mode.

If a domain is in DStandby mode, the corresponding power is switched off.

All the domains can be configured for the system mode (Stop or Standby) through PDDS_Dn bits in PWR CPU control register (PWR_CPUCR) . The system enters Standby only when all PDDS_Dn bits for all domains have allowed it.

Table 32. PDDS_Dn low-power mode control

PWR_CPUCRD1 modeD2 modeD3 mode
PDDS_D1PDDS_D2PDDS_D3
0xxDStopDStop or DStandbyRun or Stop
1DStandbyDStop or DStandbyany
x0anyDStopRun or Stop
1anyDStandbyany
at least one = 0DStop or DStandbyDStop or DStandbyStop
111DStandbyDStandbyStandby

Figure 33. Power control modes detailed state diagram

Power control modes detailed state diagram showing RUN, STOP, and STANDBY states with transitions between CPU sub-system modes, domain modes, and system D3 domain modes.

The diagram illustrates the power control modes for a microcontroller, organized into three main states: RUN, STOP, and STANDBY.

Legend:

MSV40896V3

Power control modes detailed state diagram showing RUN, STOP, and STANDBY states with transitions between CPU sub-system modes, domain modes, and system D3 domain modes.

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

Power control state transitions are initiated by the following events:

When a domain exits from DStandby, the domain peripherals are reset, while the domain SBF_Dn bit is set (state transitions causing a domain reset are marked in red).

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

Table 33. Low-power exit mode flags

System modeD1 domain modeD2 domain modeSBF_D1SBF_D2SBFSTOPFComment
RunDRun or DStopDRun or DStop0000D1, D2 and system contents retained
RunDStandbyDStop1000D1 contents lost, D2 and system contents retained
RunDRun or DStopDStandby0100D2 contents lost, D1 and system contents retained
RunDStandbyDStandby1100D1 and D2 contents lost, system contents retained
StopDStopDStop0001D1, D2 and system contents retained, clock system reset.
StopDStandbyDStop1001D1 contents lost, D2 and system contents retained, clock system reset
StopDStopDStandby0101D2 contents lost, D1 and system contents retained, clock system reset
StopDStandbyDStandby1101D1 and D2 contents lost, system contents retained, clock system reset
StandbyDStandbyDStandby0 (1)0 (1)10D1, D2 and system contents lost

1. When returning from Standby, the SBF_D1 and SBF_D2 reflect the reset value.

6.6.4 Power management examples

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

Figure 34 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.
    2. b) Once the \( V_{CORE} \) supply has reached the required level indicated by VOSRDY, increase the clock frequency.
  4. 4. The system performance is then reduced to a medium-speed clock with voltage scaling VOS2. To do this:
    1. a) First decrease the system frequency.
    2. b) Then decrease the voltage scaling to VOS2.
  5. 5. The next step is to reduce the system performance to HSI clock with voltage scaling VOS3. To do this:
    1. a) Switch the clock to HSI.
    2. b) Disable the PLL.
    3. c) Decrease the voltage scaling to VOS3.
  6. 6. The system performance can then be increased to high-speed clock from the PLL. To do this:
    1. a) Program the voltage scaling to VOS1.
    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.

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

Figure 34. Dynamic voltage scaling in Run mode

Timing diagram showing dynamic voltage scaling in Run mode. It includes signals for VOS 1, 2, 3; VOSRDY; PLLxON; ck_sys; ck_hclk_d1, d2, d3; and a state transition table at the bottom. The table shows states like RUN, Wait VOSRDY, and Wait PLL, with notes on whether the system is running from HSI or PLL.

The diagram illustrates the timing of dynamic voltage scaling. The top section shows the V CORE voltage levels (VOS 1, 2, 3) and the VOSRDY signal. The bottom section shows the system clock (ck_sys) and domain clocks (ck_hclk_d1, d2, d3). The state transition table at the bottom details the sequence of states: RUN, Wait VOSRDY, and Wait PLL, indicating whether the system is running from HSI or PLL.

RUNWait VOSRDYWait PLLRUNWait VOSRDYRUNWait VOSRDYRUNWait VOSRDYWait PLLRUN
RUN from HSIRun from PLLRUN from HSIRun from PLL

MSV40350V1

Timing diagram showing dynamic voltage scaling in Run mode. It includes signals for VOS 1, 2, 3; VOSRDY; PLLxON; ck_sys; ck_hclk_d1, d2, d3; and a state transition table at the bottom. The table shows states like RUN, Wait VOSRDY, and Wait PLL, with notes on whether the system is running from HSI or PLL.

1. The status of the register bits at each step is shown in blue.

Example of V CORE voltage scaling behavior in Stop mode

Figure 35 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 the peripheral in the D2 domain that will first enter DStop mode. D2 system clock is stopped. The system still provides the high-performance system clock, hence the voltage scaling shall stay at VOS1 level.
  3. 3. In a second step, the CPU subsystem enters CStop mode, D1 domain enters DStop mode 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 from Stop mode, the D1 domain exits from DStop mode and the CPU subsystem exits from 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 and the D1 system clock are enabled.
  5. 5. The CPU subsystem allocates a peripheral in the D2 domain. The D2 system clock is 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 35. Dynamic voltage scaling behavior with D1, D2 and system in Stop mode

Timing diagram showing voltage and clock signals during system stop mode transitions. Signals include VOS 1, VOS 2, VCORE (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, exti_c_wkup, pwr_d1_wkup, PLLnON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. The diagram shows transitions between RUN, STOP, and various wait states with corresponding clock source changes.
RUND1RUN
D2STOP
D3RUN
STOPWait
VCORE
Wait
HSI
D1RUN
D2STOP
D3RUN
RUNWait
VOSRDY
RUN
Run from PLLClock StoppedRUN from HSIRun from PLL

MSv40897V2

Timing diagram showing voltage and clock signals during system stop mode transitions. Signals include VOS 1, VOS 2, VCORE (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, exti_c_wkup, pwr_d1_wkup, PLLnON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. The diagram shows transitions between RUN, STOP, and various wait states with corresponding clock source changes.
  1. 1. The status of the register bits at each step is shown in blue.

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

Figure 36 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 the peripherals in the D2 domain that will first enter DStandby mode. The D2 domain bus matrix clock is stopped and the power is switched off. The system performance is unchanged hence the voltage scaling does not change.
  3. 3. The CPU subsystem then enters CStop mode, D1 domain enters DStandby mode and the system enters Standby mode. The system clock is stopped and the voltage regulator switched off.
  4. 4. The system is then woken up by a wakeup source. The system exits from 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 D1 subsystem clock are enabled.

Since there are no allocated peripherals in the D2 domain, this domain remains in DStop mode. The software shall then check the ACTVOSRDY is valid before changing the system performance.

  1. 5. 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, it 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.
  2. 6. The CPU subsystem puts the D2 domain in DStandby mode.

Figure 36. Dynamic Voltage Scaling D1, D2, system Standby mode

Timing diagram showing dynamic voltage scaling and system clock transitions. It includes signals for VOS 1-4, VOSRDY, ACTVOSRDY, and various system clocks (ck_sys, ck_hclk_d1-3). The bottom section shows system states in blue boxes: Run from PLL, Power down, RUN from HSI, and Run from PLL.

The diagram illustrates the sequence of events for dynamic voltage scaling and system clock management. The top section shows the voltage levels (VOS 1, VOS 2, (S)VOS 3, SVOS 4) and the V CORE supply. The middle section shows the status of control bits (VOS, SVOS, VOSRDY, ACTVOSRDY, exti_c_wkup, pwr_d1_wkup, PLLxON) and system clocks (ck_sys, ck_hclk_d1, ck_hclk_d2, ck_hclk_d3). The bottom section, highlighted in blue, shows the system states: 'Run from PLL', 'Power down', 'RUN from HSI', and 'Run from PLL'.

Timing diagram showing dynamic voltage scaling and system clock transitions. It includes signals for VOS 1-4, VOSRDY, ACTVOSRDY, and various system clocks (ck_sys, ck_hclk_d1-3). The bottom section shows system states in blue boxes: Run from PLL, Power down, RUN from HSI, and Run from PLL.

MSV40898V3

  1. 1. The status of the register bits at each step is shown in blue.

Example of \( V_{CORE} \) voltage scaling behavior in Run mode with D1 and D2 domains in DStandby mode

Figure 37 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 the peripherals in the D2 domain that will first enter DStandby mode. The D2 domain bus matrix clock is stopped and its power switched off. The system performance is unchanged hence the voltage scaling does not change.
  3. 3. The CPU subsystem then enters CStop mode and the D1 domain enters DStandby mode. The D1 domain bus matrix clock is stopped and its power switched off. At the same time 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 system is then woken up by a D3 Autonomous mode wakeup event. The system exits from 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 D3 Autonomous mode.
  5. 5. The D3 Autonomous mode wakeup 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 from Stop mode, the D1 domain exits from DStandby mode and the CPU subsystem exits from 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 D1 subsystem clock are enabled. The D2 domain remains in DStandby mode.

Figure 37. Dynamic voltage scaling behavior with D1 and D2 in DStandby mode and D3 in Autonomous mode

Timing diagram showing dynamic voltage scaling behavior for VOS 1, VOS 2, (S)VOS 3, SVOS 4, VOSRDY, exti_c_wkup, pwr_d1_wkup, exti_d3_wkup, pwr_d3_wkup, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. The diagram includes voltage levels (Vdd_D2, Vdd_D1) and system states (RUN, D1RUN, D2STANDBY, D3RUN, D1STANDBY, D2STANDBY, D3STOP, Wait VCORE, Wait HSI).

The figure is a timing diagram illustrating the dynamic voltage scaling (DVS) behavior of a microcontroller. It shows the relationship between voltage levels, system states, and clock signals over time.

Signal Levels:

System States:

RUND1RUN
D2STANDBY
D3RUN
D1STANDBY
D2STANDBY
D3STOP
Wait VCOREWait HSID1STANDBY
D2STANDBY
D3RUN
D1STANDBY
D2STANDBY
D3STOP
Wait VCOREWait HSID1RUN
D2STANDBY
D3RUN
RUN from PLLClock stoppedRUN from HSIClock stoppedRUN from HSI
Timing diagram showing dynamic voltage scaling behavior for VOS 1, VOS 2, (S)VOS 3, SVOS 4, VOSRDY, exti_c_wkup, pwr_d1_wkup, exti_d3_wkup, pwr_d3_wkup, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. The diagram includes voltage levels (Vdd_D2, Vdd_D1) and system states (RUN, D1RUN, D2STANDBY, D3RUN, D1STANDBY, D2STANDBY, D3STOP, Wait VCORE, Wait HSI).

MSV40899V3

  1. 1. The status of the register bits at each step is shown in blue.

6.7 Low-power modes

Several low-power modes are available to save power when the CPU does not need to execute code (i.e. 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 wakeup 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 bit in RCC_C1_xxxxENR or RCC_xxxxENR to reduce power consumption.

To reduce power consumption in CSleep mode, the individual peripheral clocks can be disabled by configuring PERxLPEN bit in RCC_C1_xxxxLPENR or RCC_xxxxLPENR . For the peripherals still receiving a clock in CSleep mode, their clock can be slowed down before entering CSleep mode.

6.7.3 Entering low-power modes

CPU subsystem CSleep and CStop low-power modes are entered by the MCU 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 D2 domain enters DStop or DStandby when the CPU subsystem has no peripheral allocated in the domain or is in CStop. The D1 domain enters DStop or DStandby when the CPU subsystem is in CStop.

The system can enter Stop or Standby low-power mode when all EXTI wakeup sources are cleared and the other domains are in DStop or DStandby mode.

6.7.4 Exiting from low-power modes

The CPU subsystem exits from 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 will wakeup 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 will wakeup the MCU, even the disabled ones.

Only enabled NVIC interrupts with sufficient priority will wakeup 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 is not set. It might be necessary to clear the interrupt flag in the peripheral.

The CPU subsystem exits from CStop, DStop and Stop modes by enabling an EXTI interrupt or event depending on how the low-power mode was entered (see above).

The system can wake up from Stop mode by enabling an EXTI wakeup, without waking up a CPU subsystem. In this case the system will operate in D3 Autonomous mode.

The CPU subsystem exits from DStandby mode by enabling an EXTI interrupt or event, regardless on how DStandby mode was entered. Program execution restarts from CPU local reset (such as a reset vector fetched from System configuration block (SYSCFG)).

The D2 domain can exit from DStop or DStandby mode when the CPU allocates a first peripheral in the domain.

The CPU subsystem 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 CSleep mode

The CSleep mode applies only to the CPU subsystem. In CSleep mode, the CPU clock is stopped. The CPU subsystem peripheral clocks operate according to the values of PERxLPEN bits in RCC_C1_xxxxENR or RCC_xxxxENR.

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 34 for details on how to enter to 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 34 for more details on how to exit from CSleep mode.

Table 34. 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:
Wakeup latencyNone

6.7.6 CStop mode

The CStop mode applies only to the CPU subsystem. In CStop mode, the CPU clock is stopped. Most CPU subsystem peripheral clocks are stopped too and only the CPU subsystem peripherals having a PERxAMEN bit operate accordingly.

In CStop mode, CPU subsystem peripherals having a kernel clock request can still request their kernel clock. For the peripheral having a PERxAMEN bit, this bit must be set to be able to request the kernel clock.

Entering CStop mode

The CStop 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.

Refer to Table 35 for details on how to enter to CStop mode.

Exiting from CStop mode

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

Refer to Table 35 for more details on how to exit from CStop mode.

Table 35. CStop mode

CStop 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 Wakeup 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 Wakeup sources are cleared.
Mode exit

If WFI or return from ISR was used for entry:

  • – EXTI Interrupt enabled in NVIC: Refer to Table 140: NVIC , for peripheral which are not stopped or powered down.

If WFE was used for entry and SEVONPEND = 0:

If WFE was used for entry and SEVONPEND = 1:

Wakeup latencyEXTI and RCC wakeup synchronization (see Section 8.4.7: Power-on and wakeup sequences )

6.7.7 DStop mode

D1 domain and/or D2 domain enters DStop mode only when the CPU subsystem is in CStop mode and has allocated peripheral in the domain (see Table 36 ). In DStop mode the domain bus matrix clock is stopped.

The Flash memory can enter low-power Stop mode when it is enabled through FLPS in PWR_CR1 register. This allows a trade-off between domain DStop restart time and low power consumption.

Table 36. DStop mode overview
Peripheral allocationCPUD1 domainD2 domainComment
No peripheral allocated in D2 domainCRun or CSleepDRunDStop
CStopDStopDStop
Peripheral allocated in D2 domainCRun or CSleepDRunDRunCPU subsystem, keep D2 domain active.
CStopDStopDStop

In DStop mode domain peripherals using the LSI or LSE clock and peripherals having a kernel clock request are still able to operate.

Entering DStop mode

The DStop mode is entered according to Section 6.7.3: Entering low-power modes , when at least one PDDS_Dn bit in PWR CPU control register (PWR_CPUCR) for the domain select Stop.

Refer to Table 37 for details on how to enter DStop mode.

If Flash memory programming is ongoing, the DStop mode entry is delayed until the memory access is finished.

If an access to the domain bus matrix is ongoing, the DStop mode entry is delayed until the domain bus matrix access is complete.

Exiting from DStop mode

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

Refer to Table 37 for more details on how to exit from DStop mode.

When exiting from DStop mode, the CPU subsystem clocks, domain(s) bus matrix clocks and voltage scaling depend on the system mode.

Table 37. DStop mode
DStop modeDescription
Mode entry
  • – The domain CPU subsystem enters CStop.
  • – The CPU subsystem has an allocated peripheral in the D2 domain and enters CStop.
  • – The CPU subsystem deallocated its last peripheral in the D2 domain.
  • – The PDDS_Dn bit for the domain selects Stop mode.

Table 37. DStop mode

DStop modeDescription
Mode exit
  • – The domain CPU subsystem exits from CStop mode (see Table 35 )
  • – The CPU subsystem has an allocated peripheral in the D2 domain and exits from CStop mode (see Table 35 )
  • – The CPU subsystem allocates a first peripheral in the D2 domain.
Wakeup latencyEXTI and RCC wakeup synchronization (see Section 8.4.7: Power-on and wakeup sequences ).

6.7.8 Stop mode

The system D3 domain enters Stop mode only when the CPU subsystem is in CStop mode, the EXTI wakeup sources are inactive and at least one PDDS_Dn bit in PWR CPU control register (PWR_CPUCR) for any domain request Stop. In Stop mode, the system clock including a PLL and the D3 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 D3 domain Stop mode, D1 domain and D2 domain are either in DStop and/or DStandby mode.

In Stop mode, the domain peripherals that use the LSI or LSE clock, and the peripherals that have a kernel clock request to select HSI or CSI as source, are still able to operate.

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

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 38 ).

Table 38. Stop mode operation

SVOSLPDSStop mode Voltage regulator operationWake-up Latency
SVOS30MainNo additional wakeup time.
1LPVoltage Regulator wakeup time from LP mode.
SVOS4 or SVOS5xLPVoltage Regulator wakeup time from LP mode + voltage level wakeup time for SVOS4 or SVOS5 level to VOS3 level

Entering Stop mode

The Stop mode is entered according to Section 6.7.3: Entering low-power modes , when at least one PDDS_Dn bit n PWR CPU control register (PWR_CPUCR) for any domain request Stop.

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

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

If an access to a bus matrix (AXI, AHB or APB) is ongoing, the Stop mode entry is delayed until the bus matrix access is finished.

To allow peripherals having a kernel clock request to operate in Stop mode, the system must use SVOS3 level.

Note: Use a DSB instruction to ensure that outstanding memory transactions complete before entering stop mode.

Exiting from Stop mode

The Stop 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 Stop mode.

When exiting from Stop mode, the system clock, D3 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 from Stop mode (see Table 33 ).

Table 39. Stop mode
Stop modeDescription
Mode entry
  • – When the CPU is in CStop mode and there is no active EXTI Wakeup source and Run_D3 = 0.
  • – At least one PDDS_Dn bit for any domain select Stop.
Mode exit
  • – On a EXTI Wakeup.
Wakeup latencySystem oscillator startup (when disabled).
+ EXTI and RCC wakeup synchronization.
+ Voltage Scaling refer to Table 38 (see Section 6.6.2: Voltage scaling )

I/O states in Stop mode

I/O pin configuration remain unchanged in Stop mode.

6.7.9 DStandby mode

Like DStop mode, DStandby mode is based on the CPU subsystem CStop mode. However the domain V CORE supply is powered off. A domain enters DStandby mode only when the CPU subsystem is in CStop mode if peripherals are allocated in the domain

A domain enters DStandby mode only when the CPU subsystem is in CStop mode if peripherals are allocated in the domain and the PDDS_Dn bit in PWR CPU control register (PWR_CPUCR) for the domain is configured accordingly. In DStandby mode, the domain is powered down and the domain RAM and register contents are lost.

Entering DStandby mode

The DStandby mode is entered according to Section 6.7.3: Entering low-power modes , when the PDDS_Dn bit in PWR CPU control register (PWR_CPUCR) for the Dn domain selects Standby mode.

Refer to Table 40 for details on how to enter DStandby mode.

If Flash memory programming is ongoing, the DStandby mode entry is delayed until the memory access is finished.

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

Note: When the CPU sets the PDDS_D2 bit to select Standby mode, the D2 domain enters DStandby mode (the CPU has no allocated peripherals in the D2 domain).

Exiting from DStandby mode

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

Refer to Table 40 for more details on how to exit from DStandby mode.

Note: When the D2 domain is in DStandby mode and the CPU sets the domain PDDS_D2 bit to select Stop mode, the D2 domain remains in DStandby mode. The D2 domain will only exit DStandby when the CPU allocates a peripheral in the D2 domain.

When exiting from DStandby mode, the domain CPU and peripherals are reset. However the state of the CPU subsystem clocks, domain(s) bus matrix clocks and voltage scaling depends on the system mode:

When the D2 domain exits from DStandby mode due to the CPU subsystem (i.e when allocating a first peripheral or when peripherals are allocated in the D2 domain and the CPU subsystem exits from CStop mode), the CPU shall verify that the domain has exited from DStandby mode. To ensure correct operation, it is recommended to follow the sequence below:

  1. 1. First check that the domain bus matrix clock is available. The domain bus matrix clock state can be checked in RCC_CR register:
    • – When RCC_DnCKRDY = 0, the domain bus matrix clock is stalled.
    • – If RCC_DnCKRDY = 1, the domain bus matrix clock is enabled.
  2. 2. Then wait for the domain has exited from DStandby mode. To do this, check the SBF_Dn flag in PWR CPU control register (PWR_CPUCR) . The domain is powered and can be accessed only when SBF_Dn is cleared. Below an example of code:
Loop
  write PWR_SBF_Dn = 0 ; try to clear bit.
  read PWR_SBF_Dn
  While 1 ==> loop

Table 40. DStandby mode

DStandby modeDescription
Mode entry
  • – The domain CPU subsystem enters CStop.
  • – The CPU subsystem has an allocated peripheral in D2 domain and enters CStop.
  • – The CPU subsystem deallocated its last peripheral in the D2 domain.
  • – The PDDS_Dn bits for the domain select Standby mode.
  • – All WKUPF bits in Power Control/Status register (PWR_WKUPFR) are cleared.
Mode exit
  • – The CPU subsystem exits from CStop mode (see Table 35 )
  • – The CPU subsystem has an allocated peripheral in the D2 domain and exits from CStop mode (see Table 35 )
  • – The CPU subsystem allocates a first peripheral in the D2 domain.
Wakeup latencyEXTI and RCC wakeup synchronization.
+ Domain power up and reset.
(see Section 8.4.7: Power-on and wakeup sequences )

6.7.10 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 D3 domain enters Standby mode only when the D1 and D2 domain are in DStandby. When the system D3 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 the HSE oscillator are also switched off. SRAM and register contents are lost except for backup domain registers (RTC registers, RTC backup register and backup RAM), and Standby circuitry (see Section 6.4.4: 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 all PDDS_Dn bits in PWR CPU control register (PWR_CPUCR) for all domains request Standby.

Refer to Table 42 for more details on how to enter to 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 42 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 time stamp 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 wakeup flag register (PWR_WKUPFR) , and PWR wakeup 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, etc.). The SBF status flags in PWR CPU control register (PWR_CPUCR) registers indicate from which mode the system has exited (see Table 41 ).

Table 41. Standby and Stop flags

SBF_D2SBF_D1SBFSTOPFDescription
0100D1 domain exits from DStandby while system stayed in Run
0101D1 domain exits from DStandby, while system has been in or exits from Stop
1000D2 domain exits from DStandby while system stayed in Run
1001D2 domain exits from DStandby while system has been in or exits from Stop
1100D1 and D2 domain exit from DStandby while the system remains in Run mode
1101D1 and D2 domain exit from DStandby while the system is in Stop mode or is exiting this mode.
0001System has been in or exits from Stop
0 (1)0 (1)10System exits from Standby

1. When exiting from Standby the SBF_D1 and SBF_D2 reflect the reset value

Table 42. Standby mode

Standby modeDescription
Mode entry
  • – The CPU subsystem is in CStop mode, and there is no active EXTI Wakeup source and RUN_D3 = 0.
  • – All PDDS_Dn bits for all domains select Standby.
  • – All WKUPF bits in Power Control/Status register (PWR_WKUPFR) are cleared.
Mode exit
  • – WKUP pins rising or falling edge, RTC alarm (Alarm A and Alarm B), RTC wakeup, tamper event, time stamp event, external reset in NRST pin, IWDG reset.
Wakeup 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:

6.7.11 Monitoring low-power modes

The devices feature state monitoring pins to monitor the CPU and Domain state transition to low-power mode (refer to Table 43 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 43. Low-power modes monitoring pin overview

Power state monitoring pinsDescription
CSLEEPSleeping CPU state
CDSLEEPDeep sleep CPU state
DxPWRENDomain (Dx, x= 1 or 2) power enabled

The values of the monitoring pins reflect the state of the CPU and domains. Refer to Table 44 for the GPIO state depending on CPU and domain state.

Table 44. GPIO state according to CPU and domain state

Domain
DxPWREN
CPUCPU power stateDomain Dx
power state
CSLEEPCDSLEEP
100CPU in Run modeDRun mode
110CPU in Sleep mode
101CPU in Run mode
111CPU in Deep sleep modeDStop mode
0--_(1)DStandby mode

1. The full domain is in power off state and the CPU is powered off.

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.Res.Res.Res.Res.Res.Res.Res.Res.Res.ALS[1:0]AVDEN
rwrwrw
1514131211109876543210
SVOS[1:0]Res.Res.Res.Res.FLPSDBPPLS[2:0]PVDERes.Res.Res.LPDS
rwrwrwrwrwrwrwrwrw

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

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

These bits select the voltage threshold detected by the AVD.

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

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.

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

Bit 9 FLPS : Flash low-power mode in DStop mode

This bit allows to obtain the best trade-off between low-power consumption and restart time when exiting from DStop mode.

When it is set, the Flash memory enters low-power mode when D1 domain is in DStop mode.

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

Note: Depending on the APB1 prescaler, there is a delay between the write to DBP and the effective disable/enable of the backup domain protection. Therefore, a dummy read operation to PWR_CR1 register is required just after writing to the DBP bit.

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: External voltage level on PVD_IN pin, compared to internal V REFINT level.

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: Voltage regulator or SMPS step-down converter in Main mode (MR) when SVOS3 is selected for Stop mode

1: Voltage regulator or SMPS step-down converter in Low-power mode (LPR) when SVOS3 is selected for Stop mode

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.Res.AVDO
r
1514131211109876543210
ACTVOS[1:0]ACTVOS RDYRes.Res.Res.Res.Res.Res.Res.Res.PVDORes.Res.Res.Res.
rrrr

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

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 PMU.

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

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 and SDLEVEL selected levels.

1: Voltage level valid, at current VOS and SDLEVEL selected levels.

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} \) or \( PVD\_IN \) voltage is equal or higher than the PVD threshold selected through the PLS[2:0] bits.

1: \( V_{DD} \) or \( PVD\_IN \) voltage 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 wakeup 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.TEMPHTEMPLVBATHVBATLRes.Res.Res.BRRDY
rrrrr
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.

Bit 21 VBATH : \( V_{BAT} \) level monitoring versus high threshold

0: \( V_{BAT} \) level below high threshold level.

1: \( V_{BAT} \) level equal or above high threshold level.

Bit 20 VBATL : \( V_{BAT} \) level monitoring versus low threshold

0: \( V_{BAT} \) level above low threshold level.

1: \( V_{BAT} \) level equal or below low threshold level.

Bits 19: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

When set, the V BAT supply and temperature monitoring is enabled.

0: V BAT and temperature monitoring disabled.

1: V BAT and temperature monitoring enabled.

Note: V BAT and temperature monitoring are only available when the backup regulator is enabled (BREN bit set to 1).

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

Bit 0 BREN : Backup regulator enable

When set, the backup regulator (used to maintain the backup RAM content in Standby and V BAT modes) is enabled.

If BREN is reset, the backup regulator is switched off. The backup RAM can still be used in Run and Stop modes. However, its content will be 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 will be 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 0046

This register is reset only by a power-on reset (POR). It is not reset by a wakeup from Standby mode or a the RESET signal.

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 SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS bits (see Table 30 ) will be ignored: data will not be written, the written-once mechanism will lock the register and any further write access will be ignored.

The default supply configuration will be kept and the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) will go on indicating invalid voltage levels. The system must be power cycled before writing a new value.

31302928272625242322212019181716
Res.Res.Res.Res.Res.USB33RDYUSBREGENUSB33DENRes.Res.Res.Res.Res.Res.Res.SDEXTRDY
rrwrwr
15141312111098765:43210
Res.Res.Res.Res.Res.Res.VBRSVBERes.Res.SDLEVEL[1:0]SDEXTHPSDENLDOENBYPASS
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 SDEXTRDY : 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 SDLEVEL[1:0] : SMPS step-down converter voltage output level selection

This bit is used when both the LDO and SMPS step-down converter are enabled with SDEN and LDOEN enabled or when SDEXTHP is enabled. In this case SDLEVEL has to be written with a value different than 00 at system startup.
00: Reset value
01: 1.8 V
10 and 11: 2.5 V

Note: Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 30 .

Bit 3 SDEXTHP : SMPS step-down converter forced ON and in High Power MR mode.

0: SMPS step-down converter in normal operating mode.

1: SMPS step-down converter forced ON and in MR mode.

Note: Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 30.

Bit 2 SDEN : SMPS step-down converter enable

0: SMPS step-down converter disabled

1: SMPS step-down converter enabled. (Default)

Note: Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 30.

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

Bit 1 LDOEN : Low drop-out regulator enable

0: Low drop-out regulator disabled.

1: Low drop-out regulator enabled (default)

Note: Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 30.

Bit 0 BYPASS : Power management unit bypass

0: Power management unit normal operation.

1: Power management unit bypassed, voltage monitoring still active.

Note: Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 30.

6.8.5 PWR CPU control register (PWR_CPUCR)

This register allows controlling the CPU 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_D3Res.CSSFSBF_D2SBF_D1SBFSTOPFRes.Res.PDDS_D3PDDS_D2PDDS_D1
rwrwrrrrrwrwrw

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

Bit 11 RUN_D3 : Keep system D3 domain in Run mode regardless of the CPU subsystems modes

0: D3 domain follows CPU subsystems modes.

1: D3 domain remains in Run mode regardless of CPU subsystems modes.

Bit 10 Reserved, must be kept at reset value.

Bit 9 CSSF : Clear D1 domain CPU Standby, Stop and HOLD flags (always read as 0)

This bit is cleared to 0 by hardware.

0: No effect.

1: D1 domain CPU flags (HOLD2F, STOPF, SBF, SBF_D1, and SBF_D2) are cleared.

Bit 8 SBF_D2: D2 domain DStandby flag

This bit is set by hardware and cleared by any system reset or by setting the CPU CSSF bit. Once set, this bit can be cleared only when the D2 domain is no longer in DStandby mode.

0: D2 domain has not been in DStandby mode

1: D2 domain has been in DStandby mode.

Bit 7 SBF_D1: D1 domain DStandby flag

This bit is set by hardware and cleared by any system reset or by setting the CPU CSSF bit. Once set, this bit can be cleared only when the D1 domain is no longer in DStandby mode.

0: D1 domain has not been in DStandby mode

1: D1 domain has been in DStandby mode.

Bit 6 SBF: System Standby flag

This bit is set by hardware and cleared only by a POR (Power-on Reset) or by setting the CPU 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 CPU 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_D3: System D3 domain Power Down Deepsleep.

This bit allows CPU to define the Deepsleep mode for System D3 domain.

0: Keep Stop mode when D3 domain enters Deepsleep.

1: Allow Standby mode when D3 domain enters Deepsleep.

Bit 1 PDDS_D2: D2 domain Power Down Deepsleep.

This bit allows CPU to define the Deepsleep mode for D2 domain.

0: Keep DStop mode when D2 domain enters Deepsleep.

1: Allow DStandby mode when D2 domain enters Deepsleep.

Bit 0 PDDS_D1: D1 domain Power Down Deepsleep selection.

This bit allows CPU to define the Deepsleep mode for D1 domain.

0: Keep DStop mode when D1 domain enters Deepsleep.

1: Allow DStandby mode when D1 domain enters Deepsleep.

6.8.6 PWR D3 domain control register (PWR_D3CR)

This register allows controlling D3 domain power.

Address offset: 0x018

Reset value: 0x0000 4000 (after power up; 0x0000 6000 when regulator is correctly configured and for subsequent resets)

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.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 0

01: Scale 3 (default)

10: Scale 2

11: Scale 1

Bit 13 VOSRDY : VOS Ready bit for \( V_{CORE} \) voltage scaling output selection.

When an internal regulator is used, this bit indicates that all the features allowed by the selected VOS can be used.

When VOS0 voltage scaling is selected, to guarantee that the clock frequency can be increased above the currently used maximum frequency, ACTVOS[1:0] must be equal to VOS[1:0] and ACTVOSRDY must be set.

Note: When Bypass mode is selected in the PWR control register 3 (PWR_CR3), VOSRDY bit is set to 1 by hardware whatever the \( V_{CORE} \) level.

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 wakeup clear register (PWR_WKUPCR)

Address offset: 0x020

Reset value: 0x0000 0000 (reset only by system reset, not reset by wakeup from Standby mode)

5 wait states are required when writing this register (when clearing a WKUPF bit in PWR_WKUPFR, the AHB write access will complete after the WKUPF 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.WKUPC6Res.WKUPC4Res.WKUPC2WKUPC1
rc_w1rc_w1rc_w1rc_w1

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

Bits 5, 3, 1:0 WKUPC[6, 4, 2:1] : Clear Wakeup pin flag for WKUPn, (n = 6, 4, 2, 1)

These bits are always read as 0.

0: No effect

1: Writing 1 clears the WKUPFn Wakeup pin flag (bit is cleared to 0 by hardware)

6.8.8 PWR wakeup flag register (PWR_WKUPFR)

Address offset: 0x024

Reset value: 0x0000 0000 (reset only by system reset, not reset by wakeup 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.WKUPF6Res.WKUPF4Res.WKUPF2WKUPF1
rrrr

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

Bits 5, 3, 1:0 WKUPF[6, 4, 2:1] : Wakeup pin WKUPn flag, (n = 6, 4, 2, 1)

This bit is set by hardware and cleared only by a Reset pin or by setting the WKUPCn bit in the PWR wakeup clear register (PWR_WKUPCR) .

0: No wakeup event occurred

1: A wakeup event was received from WKUPn pin

6.8.9 PWR wakeup enable and polarity register (PWR_WKUPEPR)

Address offset: 0x028

Reset value: 0x0000 0000 (reset only by system reset, not reset by wakeup from Standby mode)

31302928272625242322212019181716
Res.Res.Res.Res.WKUPPUPD6[1:0]rwRes.Res.WKUPPUPD4[1:0]rwRes.Res.WKUPPUPD2[1:0]rwWKUPPUPD1[1:0]rw

1514131211109876543210
Res.Res.WKUPP6Res.WKUPP4Res.WKUPP2WKUPP1Res.Res.WKUPEN6Res.WKUPEN4Res.WKUPEN2WKUPEN1

Bits 31:28, 25:24, 21:20 Reserved, must be kept at reset value.

Bits 27:26, 23:22, 19:16 WKUPPUPD[6, 4, 2:1][1:0] : Wakeup pin pull configuration for WKUPn, (n = 6, 4, 2, 1)
These bits define the I/O pad pull configuration used when WKUPENn = 1. The associated GPIO port pull configuration must be set to the same value or to 00.
The Wakeup 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, 11, 9:8 WKUPP[6, 4, 2:1] : Wakeup pin polarity bit for WKUPn, (n = 6, 4, 2, 1)
These bits define the polarity used for event detection on WKUPn external wakeup pin.
0: Detection on high level (rising edge)
1: Detection on low level (falling edge)

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

Bits 5, 3, 1:0 WKUPEN[6, 4, 2:1] : Enable Wakeup Pin WKUPn, (n = 6, 4, 2, 1)
Each bit is set and cleared by software.
0: An event on WKUPn pin does not wakeup the system from Standby mode.
1: A rising or falling edge on WKUPn pin wakes-up the system from Standby mode.

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

6.8.10 PWR register map

Table 45. Power control register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x000PWR_CR1ReservedALSAVDENSVOSReservedFLPSDBPPLSPVDEReservedLPDS
Reset value001100000000
0x004PWR_CSR1ReservedAVDOACTVOSACTVOSRDYReservedPVDOReservedReserved
Reset value00100
0x008PWR_CR2ReservedTEMPHTEMPLVBATHVBATLReservedBRRDYReservedMONENReservedReservedReservedBREN
Reset value0000000
0x00CPWR_CR3ReservedUSB33RDYUSBREGENUSB33DENReservedReservedReservedReservedSDETXRDYReservedVBRVBEReservedSDLEVELSDEXTHPSDENLDOENBYPASS
Reset value00000001000110
0x010PWR_CPUCRReservedRUN_D3ReservedCSSFSBF_D2SBF_D1SBFSTOPFRes.Res.PDDS_D3PDDS_D2PDDS_D1
Reset value000000000
0x018PWR_D3CRReservedVOSVOSRDYReservedReserved
Reset value010
0x020PWR_WKUPCRReservedWKUPC6Res.WKUPC4Res.WKUPC2
Reset value000
0x024PWR_WKUPFRReservedWKUPF6Res.WKUPF4Res.WKUPF2
Reset value000
0x028PWR_WKUPEPRReservedWKUPPUD6Res.Res.ReservedWKUPPUD4Res.Res.ReservedWKUPPUD2WKUPPUD1Res.WKUPP6Res.WKUPP4Res.WKUPP2WKUPP1Res.WKUPEN6Res.WKUPEN4Res.WKUPEN2WKUPEN1
Reset value000000000000000000000000

Refer to Section 2.3 on page 131 for the register boundary addresses.