7. Power control (PWR)

7.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_{CORE} \) supply domain is configured depending on the operating modes, the selected performance (clock frequency) and the voltage scaling.

7.2 PWR main features

7.3 PWR block diagram

Figure 20. Power control block diagram

Power control block diagram showing internal components like Register interface, POR/PDR, Backup domain, System supply, and their connections to external pins and internal modules like RCC, CPU1, CPU2, and EXTI.

The diagram illustrates the internal architecture of the Power control (PWR) block. On the left, external pins are listed: PDR_ON, V DD , V BAT , V DDSMPS , V LXSMPS , V FBSMPS , V SSSMPS , V DDLDO , V CAP , V DDA , V SSA , V REF+ , V REF- , V DD50USB , V DD33USB , V SS , V DDDSI , V DD12DSI , V CAPDSI , and V SSDSI . These pins connect to internal functional blocks: POR/PDR, Backup domain (containing VBAT charging), System supply (containing SMPS step-down converter and Voltage Regulator), Analog domain, USB regulator, and DSI regulator. A central 'Power management' block is connected to the Register interface (linked to the 32-bit AHB bus), BOR, TEMP thresholds, VBAT thresholds, Voltage Scaling, and PVD & AVD. The Power management block outputs signals to the RCC (pwr_hold1_ctrl, pwr_hold2_ctrl, pwr_por_rst, pwr_bor_rst), CPU1 (nvic) (pwr_c1_it), CPU2 (nvic) (pwr_c2_it), and EXTI (exti_c1_wkup, exti_c2_wkup, exti_d3_wkup, pwr_wkupx_wkup, pwr_pvd_wkup, pwr_avd_wkup). The diagram is identified by the code MSV40333V7 in the bottom right corner.

Power control block diagram showing internal components like Register interface, POR/PDR, Backup domain, System supply, and their connections to external pins and internal modules like RCC, CPU1, CPU2, and EXTI.

7.3.1 PWR pins and internal signals

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

Table 31. 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/OutputsExternal reference voltage for ADCs and DAC
VBATSupply inputBackup 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
VDDLDOSupply inputVoltage regulator supply input
VCAPSupply Input/OutputsDigital core domain supply
VDD50USBSupply inputUSB regulator supply input
VDD33USBSupply Input/OutputsUSB regulator supply output
VDDDSISupply inputDSI regulator supply input
VDD12DSISupply inputDSI PHY supply input
VCAPDSISupply outputDSI regulator supply output
VSSDSISupply inputDSI regulator ground
VSSSupply inputMain ground
Table 31. PWR input/output signals connected to package pins or balls (continued)
Pin nameSignal typeDescription
AHBI/OAHB register interface
PDR_ONDigital inputPower Down Reset enable
Table 32. PWR internal input/output signals
Signal nameSignal typeDescription
pwr_hold1_ctrlDigital outputCPU1 clock hold
pwr_hold2_ctrlDigital outputCPU2 clock hold
pwr_c1_itDigital outputCPU2 on-hold wakeup interrupt to CPU1.
pwr_c2_itDigital outputCPU1 on-hold wakeup interrupt to CPU2.
pwr_pvd_wkupDigital outputProgrammable voltage detector output
pwr_avd_wkupDigital outputAnalog voltage detector output
pwr_wkupx_wkupDigital outputCPU wakeup signals (x=1 to 6)
pwr_por_rstDigital outputPower-on reset
pwr_bor_rstDigital outputBrownout reset
exti_c1_wkupDigital inputCPU1 wakeup request
exti_c2_wkupDigital inputCPU2 wakeup request
exti_d3_wkupDigital inputD3 domain wakeup request
pwr_d1_wkupDigital outputD1 domain bus matrix clock wakeup request
pwr_d2_wkupDigital outputD2 domain bus matrix clock wakeup request
pwr_d3_wkupDigital outputD3 domain bus matrix clock wakeup request

7.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} \) , \( V_{DDDSI} \) , and \( V_{CAP} \) . It also provides regulated supplies for specific functions (step-down converter, voltage regulator, USB regulator, DSI regulator).

This power supply shall 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 21. Power supply overview

Figure 21. Power supply overview. A detailed block diagram showing the internal power distribution and regulation for the RM0399 microcontroller. The diagram is divided into several functional domains: Core domain (V_CORE), D3 domain (System logic, EXTI, Peripherals, RAM), D2 domain (CPU2, peripherals, RAM), D1 domain (CPU1, peripherals, RAM, Flash), VDD domain (LSI, HSI, CSI, HSI48, HSE, PLLs), Backup domain (LSE, RTC, Wakeup logic, backup registers, Reset), and Analog domain (REF_BUF, ADC, DAC, OPAMP, Comparator). External pins on the left include V_DD33SMPS, V_LXSMPS, V_FBSMPS, V_SSSMPS, V_CAP, V_DDLDO, V_SS, V_DD, V_BAT, BKUP_IOs, V_DDA, V_REF+, V_REF-, and V_SSA. External pins on the right include V_DD33USB, V_DD50USB, V_SSDSI, V_DD12DSI, V_DDSI, and V_CAPDSI^(1). Internal components include a Step Down Converter, Voltage regulator, USB regulator, DSI regulator, Level shifter, Power switches, VBAT charging, Backup regulator, and various IO blocks.

The diagram illustrates the power supply architecture of the microcontroller. It shows the flow of power from external pins through various regulators and switches into different internal domains. The Core domain (V CORE ) is the central part, containing the D3, D2, and D1 domains. The V DD domain contains the LSI, HSI, CSI, HSI48, HSE, and PLLs. The Backup domain contains the LSE, RTC, Wakeup logic, backup registers, and Reset. The Analog domain contains the REF_BUF, ADC, DAC, OPAMP, and Comparator. The diagram also shows the connection between the V BAT pin and the VBAT charging block, and the connection between the BKUP_IOs and the Backup domain. The V SS pins are connected to the common ground.

Figure 21. Power supply overview. A detailed block diagram showing the internal power distribution and regulation for the RM0399 microcontroller. The diagram is divided into several functional domains: Core domain (V_CORE), D3 domain (System logic, EXTI, Peripherals, RAM), D2 domain (CPU2, peripherals, RAM), D1 domain (CPU1, peripherals, RAM, Flash), VDD domain (LSI, HSI, CSI, HSI48, HSE, PLLs), Backup domain (LSE, RTC, Wakeup logic, backup registers, Reset), and Analog domain (REF_BUF, ADC, DAC, OPAMP, Comparator). External pins on the left include V_DD33SMPS, V_LXSMPS, V_FBSMPS, V_SSSMPS, V_CAP, V_DDLDO, V_SS, V_DD, V_BAT, BKUP_IOs, V_DDA, V_REF+, V_REF-, and V_SSA. External pins on the right include V_DD33USB, V_DD50USB, V_SSDSI, V_DD12DSI, V_DDSI, and V_CAPDSI^(1). Internal components include a Step Down Converter, Voltage regulator, USB regulator, DSI regulator, Level shifter, Power switches, VBAT charging, Backup regulator, and various IO blocks.

1. V CAPDSI pin must be externally connected to V DD12DSI pin.

MSv40334V7

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

Note: The SMPS step-down converter is not available on all packages.

Figure 22. System supply configurations

Six circuit diagrams showing different system supply configurations for VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VCAP, VDDLDO, VSS, and VCORE pins. The diagrams are labeled 1. LDO supply, 2. Direct SMPS supply, 3. SMPS supplies LDO (no external supply), 4. External SMPS supply, supplies LDO, 5. External SMPS supply and bypass, and 6. Bypass.

The figure displays six distinct power supply topologies for a microcontroller, organized in a 3x2 grid. Each diagram shows the internal power pins: VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VCAP, VDDLDO, VSS, and VCORE. The status of the internal SMPS and Voltage Regulator (V reg) is indicated as either 'on' or 'off'.

Six circuit diagrams showing different system supply configurations for VDDSMPS, VLXSMPS, VFBSMPS, VSSSMPS, VCAP, VDDLDO, VSS, and VCORE pins. The diagrams are labeled 1. LDO supply, 2. Direct SMPS supply, 3. SMPS supplies LDO (no external supply), 4. External SMPS supply, supplies LDO, 5. External SMPS supply and bypass, and 6. Bypass.

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

Table 33. 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.2V, 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 33. 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

7.4.1 System supply startup

The system startup sequence from power-on in different supply configurations is the following (see Figure 23 and Figure 24 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.2 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 ok.
  3. 3. Once V CORE is ok, 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 shall 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) shall be checked to guarantee valid voltage levels:
    1. a) As long as ACTVOSRDY indicates that voltage levels are invalid, the system is in Run* mode, write accesses to the RAMs are not permitted and VOS shall 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 LXSMPS output voltage is set at 1.2 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 LXSMPS voltage level shall reach the programmed SDLEVEL so that ACTVOSRDY indicates valid voltage levels (see Figure 23).

Figure 23. 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 seven phases: Power down, Reset, Wait Oscillator, HW system Init, Run*, Wait ACTVOS RDY, and Run. Key signals include V_DD, V_DD_SMPs (rising to POR threshold), pwr_por_rst (active low pulse), V_LXSMPS (set to 1.2V), V_DDLDO (rising to 1.0V VOS3), V_CORE (rising to 1.0V), ACTVOSRDY (high until phase 5b), VOSRDY (high from phase 3), ck_sys (clock, active from phase 4), Supply configuration (Default configuration until phase 5a, then SD supplies LDO), BYPASS, LDOEN, and SDEN. Phases are labeled (1) through (5b) at the bottom.

The diagram illustrates the power-up sequence for a device where V CORE is supplied by an LDO. The signals shown are:

Phases are labeled (1) through (5b) at the bottom of the diagram.

Timing diagram showing device startup with V_CORE supplied from voltage regulator. The diagram plots several signals over time, divided into seven phases: Power down, Reset, Wait Oscillator, HW system Init, Run*, Wait ACTVOS RDY, and Run. Key signals include V_DD, V_DD_SMPs (rising to POR threshold), pwr_por_rst (active low pulse), V_LXSMPS (set to 1.2V), V_DDLDO (rising to 1.0V VOS3), V_CORE (rising to 1.0V), ACTVOSRDY (high until phase 5b), VOSRDY (high from phase 3), ck_sys (clock, active from phase 4), Supply configuration (Default configuration until phase 5a, then SD supplies LDO), BYPASS, LDOEN, and SDEN. Phases are labeled (1) through (5b) at the bottom.
  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 the SMPS step-down converter default level (1.2 V). Due to a too high supply compared to the VOS3 level, the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) indicates 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 24).

Figure 24. 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 illustrates the sequence of events from power down to run mode, including voltage levels for V_DD, V_LX, V_DDLDO, and V_CORE, as well as status signals like rst_por, ACTVOSRDY, and VOSRDY. The operating mode transitions from Power down to Reset, then Wait Oscillator, HW system Init, Run, Wait ACTVOS RDY, and finally Run. The supply configuration changes from Default configuration to Direct SD supply at the transition from Wait ACTVOS RDY to Run.

The figure is a timing diagram illustrating the device startup sequence when V CORE is directly supplied from the SMPS step-down converter. The diagram shows the following signals and their behavior over time:

The diagram is divided into phases labeled (1) through (5b) at the bottom, corresponding to the operating mode transitions.

Timing diagram showing device startup with V_CORE supplied directly from SMPS step-down converter. The diagram illustrates the sequence of events from power down to run mode, including voltage levels for V_DD, V_LX, V_DDLDO, and V_CORE, as well as status signals like rst_por, ACTVOSRDY, and VOSRDY. The operating mode transitions from Power down to Reset, then Wait Oscillator, HW system Init, Run, Wait ACTVOS RDY, and finally Run. The supply configuration changes from Default configuration to Direct SD supply at the transition from Wait ACTVOS RDY to Run.

MSV40337V4

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 PWR control register 3 (PWR_CR3) register content is retained. However the software shall 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)

For packages where VDDLDO is internally connected to VDD, when \( V_{CORE} \) is supplied in Bypass mode (LDO OFF), the \( 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 25. 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_DDLDO/V_CAP/V_12, V_CORE, Operating mode, ck_sys, and Supply configuration over time. V_DD rises to a POR threshold. pwr_por_rst goes low when V_DD reaches the threshold. V_DDLDO/V_CAP/V_12 rises to 1.2V. V_CORE rises to 1.2V. 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 switches to BYPASS mode. BYPASS, LDOEN, and SDEN signals are shown as low or high during these phases.

The figure is a timing diagram illustrating the device startup sequence when \( V_{CORE} \) is supplied in bypass mode from an external regulator. The diagram shows the relationship between supply voltages, reset signals, operating modes, and system clock over time.

MSv62412V2.

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_DDLDO/V_CAP/V_12, V_CORE, Operating mode, ck_sys, and Supply configuration over time. V_DD rises to a POR threshold. pwr_por_rst goes low when V_DD reaches the threshold. V_DDLDO/V_CAP/V_12 rises to 1.2V. V_CORE rises to 1.2V. 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 switches to BYPASS mode. BYPASS, LDOEN, and SDEN signals are shown as low or high during these phases.

7.4.2 Core domain

The \( V_{CORE} \) core domain supply can be provided by the SMPS step-down converter, 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.2 V. This allows the system to start up in any supply configurations (see Figure 22 ).

After a system reset, the software shall 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 33 .

Note: The SMPS step-down converter is not available on all packages.

Voltage regulator

The embedded voltage regulator (LDO) requires external capacitors to be connected to \( V_{CAP} \) 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^{(a)} \) , \( 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


a. \( VOS0 \) corresponds to \( V_{CORE} \) boost allowing to reach the system maximum frequency (refer to Section : \( VOS0 \) activation/deactivation sequence )

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: 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 \( V_{LXSMPS} \) pin and, via a capacitor, to \( V_{SS} \) .

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:

The SMPS step-down converter operates in MR 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 SMPS step-down converter supplies the \( V_{CORE} \) domain to retain the content of registers and internal memories. The regulator can be kept in MR mode to allow fast exit from Stop mode, or can be set in LP mode to achieve a lower \( V_{CORE} \) supply level 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) . MR mode or 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 SMPS step-down converter is OFF and the \( V_{CORE} \) domains are powered down. The content of the registers and memories are lost except for the Standby circuitry and the backup domain.

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 is not available on all packages.

7.4.3 PWR external supply

When \( V_{CORE} \) is supplied from an external source, different operating modes can be used depending on the system operating modes (Run, 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 shall be reflected in the \( V_{OS} \) bits of \( PWR\_D3CR \) register. The RAMs shall 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 shall 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 shall be switched ON when exiting Standby mode.

7.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 standby 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 a 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} \) to \( V_{DD} \) supply and to add a 100 nF ceramic decoupling capacitor on the VBAT pin.

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

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

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

Accessing the backup domain

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

For more detail on RTC and backup RAM access, refer to Section 9: 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.

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

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

Figure 26. Backup domain

Figure 26. Backup domain diagram showing the internal architecture of the backup domain. It includes a VCORE domain with a Voltage regulator and a Backup interface, and a Backup domain with a Backup regulator, Backup RAM, RTC, LSE, and Backup IOs. Power sources include VBAT, VDD, VDDLDO, and VCAP. A switch labeled VSW is shown between VBAT and VDD.

The diagram illustrates the internal architecture of the backup domain. On the left, the V CORE domain contains a Voltage regulator connected to V DDLDO and V CAP . A Backup interface is connected to this domain. On the right, the Backup domain contains a Backup regulator , Backup RAM , RTC , LSE , and Backup IOs . A switch labeled V SW is connected between V BAT and V DD . The Backup interface is connected to the Backup RAM and the RTC . The Backup regulator is connected to the Backup RAM and the Backup IOs . The RTC and LSE are connected to the Backup RAM . The Backup IOs are connected to the Backup RAM and the Backup regulator . The diagram is labeled MSV40338V2.

Figure 26. Backup domain diagram showing the internal architecture of the backup domain. It includes a VCORE domain with a Voltage regulator and a Backup interface, and a Backup domain with a Backup regulator, Backup RAM, RTC, LSE, and Backup IOs. Power sources include VBAT, VDD, VDDLDO, and VCAP. A switch labeled VSW is shown between VBAT and VDD.

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

7.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 28: Voltage reference buffer (VREFBUF) ), \( V_{REF+} \) is provided from the internal voltage reference buffer. The internal voltage reference buffer can also deliver a reference voltage to external components through \( V_{REF+}/V_{REF-} \) pins.

When the internal voltage reference buffer is disabled by ENVR, \( V_{REF+} \) is delivered by an independent external reference supply voltage.

7.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. 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 shall 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} \) shall 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 60: USB on-the-go high-speed (OTG_HS) ).

Figure 27. USB supply configurations

Figure 27 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator (ON) connected to VDD33USB and VDD50USB pins. The right diagram, labeled 'External USB supply', shows the USB regulator (Bypass) connected to VDD30, VDD33USB, and VDD50USB pins. Both diagrams show the regulator connected to VSS and the output connected to the USB transceiver pins.

The diagram illustrates two power supply configurations for the USB transceivers. On the left, labeled 'USB regulator supply', the internal USB regulator is active (ON). It takes \( V_{DD50} \) as input and provides \( V_{DD33USB} \) and \( V_{DD50USB} \) outputs to the transceiver pins. \( V_{SS} \) is connected to ground. On the right, labeled 'External USB supply', the internal USB regulator is bypassed. In this mode, the \( V_{DD33USB} \) and \( V_{DD50USB} \) pins are connected together and supplied by an external \( V_{DD30} \) source. The \( V_{SS} \) pin is also connected to ground.

Figure 27 shows two circuit diagrams for USB supply configurations. The left diagram, labeled 'USB regulator supply', shows a USB regulator (ON) connected to VDD33USB and VDD50USB pins. The right diagram, labeled 'External USB supply', shows the USB regulator (Bypass) connected to VDD30, VDD33USB, and VDD50USB pins. Both diagrams show the regulator connected to VSS and the output connected to the USB transceiver pins.

7.4.8 DSI regulator

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

When enabled through REGEN bit in Section 34.16.11: DSI Wrapper regulator and PLL control register (DSI_WRPCR) , \( V_{DD12DSI} \) is delivered by the DSI regulator.

When the DSI regulator is disabled (REGEN = '0'), \( V_{DD12DSI} \) can be delivered by an external supply.

For more information on the DSI regulator (see Section 34: DSI Host (DSI) ).

If the DSI is not used at all:

Figure 28. DSI supply configuration

Figure 28. DSI supply configuration. The diagram shows two configurations for the DSI PHY and DSI regulator. The left side shows the DSI PHY supplied by the internal DSI regulator (on). The right side shows the DSI PHY external supply (off).

The diagram illustrates two power supply configurations for the DSI PHY and DSI regulator, separated by a dashed vertical line.

Left side: DSI PHY supplied by internal DSI regulator (on)

Right side: DSI PHY external supply (off)

MSV40849V1

Figure 28. DSI supply configuration. The diagram shows two configurations for the DSI PHY and DSI regulator. The left side shows the DSI PHY supplied by the internal DSI regulator (on). The right side shows the DSI PHY external supply (off).

7.5 Power supply supervision

Power supply level monitoring is available on the following supplies:

7.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 29 ). 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 29. Power-on reset/power-down reset waveform

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

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

Figure 30. BOR thresholds

Figure 30. BOR thresholds. A graph showing VDD (Y-axis) versus Temperature (T) (X-axis). The VDD curve shows a rise to a peak and then a fall. The BORrise threshold is indicated by a horizontal dashed line on the rising edge, and the BORfall threshold is indicated by a horizontal dashed line on the falling edge. The hysteresis is the vertical difference between these two thresholds. Below the graph, the pwr_bor_rst signal is shown as a horizontal line that goes high when VDD falls below the BORfall threshold and returns low when VDD rises above the BORrise threshold. The diagram is labeled MSv40341V2 in the bottom right corner.

The figure illustrates the relationship between the supply voltage \( V_{DD} \) and temperature \( T \) . The \( V_{DD} \) curve rises to a peak and then falls. Two horizontal dashed lines represent the BORrise and BORfall thresholds. The vertical distance between these lines is labeled 'hysteresis'. Below the graph, the \( pwr\_bor\_rst \) signal is shown as a horizontal line that goes high when \( V_{DD} \) falls below the BORfall threshold and returns low when \( V_{DD} \) rises above the BORrise threshold. The diagram is labeled MSv40341V2 in the bottom right corner.

Figure 30. BOR thresholds. A graph showing VDD (Y-axis) versus Temperature (T) (X-axis). The VDD curve shows a rise to a peak and then a fall. The BORrise threshold is indicated by a horizontal dashed line on the rising edge, and the BORfall threshold is indicated by a horizontal dashed line on the falling edge. The hysteresis is the vertical difference between these two thresholds. Below the graph, the pwr_bor_rst signal is shown as a horizontal line that goes high when VDD falls below the BORfall threshold and returns low when VDD rises above the BORrise threshold. The diagram is labeled MSv40341V2 in the bottom right corner.

1. For thresholds and hysteresis values, please refer to the datasheets.

7.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 31. PVD thresholds

Timing diagram showing PVD thresholds (PVDrise, PVDfall, hysteresis) and control signals (PVDO, PVDEN) over time (T).

The figure is a timing diagram illustrating the Power Voltage Detector (PVD) thresholds and control signals over time (T). The top graph shows the supply voltage (V DD or PVD IN ) rising and then falling. The rising threshold is labeled PVDrise, the falling threshold is labeled PVDfall, and the difference between them is labeled hysteresis. Below the voltage graph, the PVDO (Power Voltage Detector Output) signal is shown. It is initially high, then goes low when the voltage drops below the falling threshold, and returns high when the voltage rises above the rising threshold. The PVDEN (Power Voltage Detector Enable) signal is shown below PVDO. It is initially low, then goes high at a point labeled 'SW enable', and returns low at a point labeled 'PDR reset'. The diagram is labeled MSv40342V2 in the bottom right corner.

Timing diagram showing PVD thresholds (PVDrise, PVDfall, hysteresis) and control signals (PVDO, PVDEN) over time (T).

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

Figure 32. AVD thresholds. A graph showing VDDA vs Time (T) with hysteresis thresholds AVDrise and AVDfall. Below the graph, timing diagrams show the AVDO and AVDEN signals. AVDEN is set high at 'SW enable' and low at 'SW disable'. AVDO is high when VDDA < AVDfall and low when VDDA > AVDrise.

The figure illustrates the operation of the Analog Voltage Detector (AVD). The top graph plots the supply voltage \( V_{DDA} \) against time (T). It shows a trapezoidal voltage profile. Two horizontal dashed lines represent the AVD thresholds: \( AVDrise \) (higher threshold) and \( AVDfall \) (lower threshold). The vertical distance between these two thresholds is labeled 'hysteresis'. Vertical dashed lines mark the points where \( V_{DDA} \) crosses these thresholds. Below the graph, two timing diagrams are shown. The \( AVDO \) signal is high when \( V_{DDA} \) is below the \( AVDfall \) threshold and low when \( V_{DDA} \) is above the \( AVDrise \) threshold. The \( AVDEN \) signal is shown being set high at a point labeled 'SW enable' and being set low at a point labeled 'SW disable'.

Figure 32. AVD thresholds. A graph showing VDDA vs Time (T) with hysteresis thresholds AVDrise and AVDfall. Below the graph, timing diagrams show the AVDO and AVDEN signals. AVDEN is set high at 'SW enable' and low at 'SW disable'. AVDO is high when VDDA < AVDfall and low when VDDA > AVDrise.
  1. 1. For thresholds and hysteresis values, please refer to the datasheets.

7.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} \) . \( V_{BATHigh} \) and \( V_{BATLow} \) 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).

\( V_{BATHigh} \) and \( V_{BATLow} \) are connected to RTC tamper signals (see Section 49: 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 7.4.4: Backup domain ).

Figure 33. VBAT thresholds

Figure 33. VBAT thresholds. A graph showing the battery voltage (V_BAT) over time (T). The voltage rises to a peak and then falls. Two threshold levels, V_BATHigh and V_BATLow, are indicated by horizontal dashed lines. Below the graph, two digital signals, VBATH and VBATL, are shown. VBATH is high when V_BAT > V_BATHigh and low otherwise. VBATL is low when V_BAT < V_BATLow and high otherwise. The graph includes a label MSv40344V1 in the bottom right corner.

The figure illustrates the battery voltage ( \( V_{BAT} \) ) over time ( \( T \) ). The voltage rises to a peak and then falls. Two threshold levels, \( V_{BATHigh} \) and \( V_{BATLow} \) , are indicated by horizontal dashed lines. Below the graph, two digital signals, \( V_{BATH} \) and \( V_{BATL} \) , are shown. \( V_{BATH} \) is high when \( V_{BAT} > V_{BATHigh} \) and low otherwise. \( V_{BATL} \) is low when \( V_{BAT} < V_{BATLow} \) and high otherwise. The graph includes a label MSv40344V1 in the bottom right corner.

Figure 33. VBAT thresholds. A graph showing the battery voltage (V_BAT) over time (T). The voltage rises to a peak and then falls. Two threshold levels, V_BATHigh and V_BATLow, are indicated by horizontal dashed lines. Below the graph, two digital signals, VBATH and VBATL, are shown. VBATH is high when V_BAT > V_BATHigh and low otherwise. VBATL is low when V_BAT < V_BATLow and high otherwise. The graph includes a label MSv40344V1 in the bottom right corner.
  1. 1. For thresholds and hysteresis values, please refer to the datasheets.

7.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 49: Real-time clock (RTC) ).

Figure 34. Temperature thresholds

Figure 34. Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature curve rises to a peak and then falls. Two horizontal dashed lines represent the threshold levels: TEMP_high (higher) and TEMP_low (lower). Below the graph, two digital signals are shown: TEMP_H (high) and TEMP_L (low). TEMP_H is high when the temperature is above TEMP_high and low when it is below TEMP_low. TEMP_L is low when the temperature is below TEMP_low and high when it is above TEMP_high. The graph is labeled MSV40345V1.

The figure illustrates the relationship between temperature and two threshold levels, \( TEMP_{high} \) and \( TEMP_{low} \) , over time. The top part of the figure is a graph with 'Temperature' on the vertical axis and 'T' (Time) on the horizontal axis. A solid line represents the temperature, which rises from a low value, crosses the \( TEMP_{low} \) threshold, reaches the \( TEMP_{high} \) threshold, stays at that level for some time, and then falls back down, crossing the \( TEMP_{low} \) threshold again. Below the graph, two digital signals are shown. The 'TEMPH' signal is initially low, goes high when the temperature crosses the \( TEMP_{high} \) threshold, and returns to low when the temperature falls below the \( TEMP_{low} \) threshold. The 'TEMPL' signal is initially high, goes low when the temperature falls below the \( TEMP_{low} \) threshold, and returns to high when the temperature rises above the \( TEMP_{high} \) threshold. Vertical dashed lines connect the threshold crossings on the temperature graph to the corresponding transitions on the digital signals. The bottom right of the figure contains the text 'MSV40345V1'.

Figure 34. Temperature thresholds. A graph showing Temperature vs. Time (T). The temperature curve rises to a peak and then falls. Two horizontal dashed lines represent the threshold levels: TEMP_high (higher) and TEMP_low (lower). Below the graph, two digital signals are shown: TEMP_H (high) and TEMP_L (low). TEMP_H is high when the temperature is above TEMP_high and low when it is below TEMP_low. TEMP_L is low when the temperature is below TEMP_low and high when it is above TEMP_high. The graph is labeled MSV40345V1.

1. For thresholds and hysteresis values, please refer to the datasheets.

7.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 35. \( V_{CORE} \) overvoltage protection

Figure 35: V_CORE overvoltage protection timing diagram. The top graph shows V_CORE voltage over time (T). The voltage starts at 1.2 V, rises to an overvoltage level, and then drops to 1.0 V. A label 'Hardware forces SD voltage level to 1.0 V' points to the 1.0 V level. Below the graph, three timing signals are shown: PWR_CR3, Overvoltage enable, and ACTVOSRDY. PWR_CR3 is high during the overvoltage event and labeled 'wrongly programmed SD configuration'. Overvoltage enable is high during the overvoltage event. ACTVOSRDY is high during the overvoltage event. The diagram is labeled MSv40346V1.
Figure 35: V_CORE overvoltage protection timing diagram. The top graph shows V_CORE voltage over time (T). The voltage starts at 1.2 V, rises to an overvoltage level, and then drops to 1.0 V. A label 'Hardware forces SD voltage level to 1.0 V' points to the 1.0 V level. Below the graph, three timing signals are shown: PWR_CR3, Overvoltage enable, and ACTVOSRDY. PWR_CR3 is high during the overvoltage event and labeled 'wrongly programmed SD configuration'. Overvoltage enable is high during the overvoltage event. ACTVOSRDY is high during the overvoltage event. The diagram is labeled MSv40346V1.

7.6 Power management

The power management block controls the \( V_{CORE} \) supply in accordance with the system operation modes (see Section 7.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 7.6.2: Voltage scaling ):

7.6.1 Operating modes

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

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

a. The domain CPU subsystem, for example CPU1 subsystem for D1 domain.

a. The other domain CPU subsystem, for example CPU1 subsystem for D2 domain.

b. The PDDS_Dn bits belong to PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) .

and
- All PDDS_Dn (b) bits for all domains select Standby mode.

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

Table 34. Low-power mode summary

SystemDomainCPUEntryWakeupSys-oscillatorSystem clkDomain bus matrix clkPeripheral clkCPU clkVoltage regulatorDomain supply
RunDRun (1)CRun--ONONONONONONON
CSleepWFI or return from ISR or WFEAny interrupt or eventON/OFF (2)OFF
CStopSLEEPDEEP bit + WFI or return from ISR or WFEAny EXTI interrupt or eventON/OFF (3)
DStop (4)SLEEPDEEP bit + WFI or return from ISR or WFEON/OFF (7)OFFOFFOFFON
DStandby (4)SLEEPDEEP bit + WFI or return from ISR or WFEOFF
Stop (5)DStop (4)SLEEPDEEP bit + WFI or return from ISR or WFE or Wakeup source cleared (6)Any EXTI interrupt or eventON
DStandby (4)OFF
Standby (8)DStandby (4)All PDDS_Dn bit + SLEEPDEEP bit + WFI or return from ISR or WFE or Wakeup source cleared (6)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 resetOFFOFF
  1. 1. At least one CPU subsystem that has an allocated peripheral in the domain is in CRun or CSleep.
  2. 2. The CPU subsystem peripherals that have a PERxLPEN bit will operate accordingly.
  3. 3. The CPU subsystem peripherals that have a PERxAMEN bit will operate accordingly.
  4. 4. All CPU subsystems that have an allocated peripheral in the domain need to be in CStop.
  5. 5. All domains need to be in DStop Or DStandby.
  6. 6. When both CPUs are in CStop and D3 domain in autonomous mode, the last EXTI Wakeup source is cleared.
  1. 7. When the system oscillator HSI or CSI is used, the state is controlled by HSIKERON and CSIKERON, otherwise the system oscillator is OFF.
  2. 8. All domains are in DStandby mode.

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

VOS0 activation/deactivation sequence

The system maximum frequency can be reached by boosting the voltage scaling level to VOS0. This is done through the ODEN bit in the SYSCFG_PWRRCR register.

The sequence to activate the VOS0 is the following:

  1. 1. Ensure that the system voltage scaling is set to VOS1 by checking the VOS bits in PWR D3 domain control register ( PWR D3 domain control register (PWR_D3CR) )
  2. 2. Enable the SYSCFG clock in the RCC by setting the SYSCFGEN bit in the RCC_APB4ENR register.
  3. 3. Enable the ODEN bit in the SYSCFG_PWRRCR register.
  4. 4. Wait for VOSRDY to be set.

Once the \( V_{\text{CORE}} \) supply has reached the required level, the system frequency can be increased. Figure 36 shows the recommended sequence for switching \( V_{\text{CORE}} \) from VOS1 to VOS0 sequence.

The sequence to deactivate the VOS0 is the following:

  1. 1. Ensure that the system frequency was decreased.
  2. 2. Ensure that the SYSCFG clock is enabled in the RCC by setting the SYSCFGEN bit set in the RCC_APB4ENR register.
  3. 3. Reset the ODEN bit in the SYSCFG_PWRCR register to disable VOS0.

Once VOS0 is disabled, the voltage scaling can be reduced further by configuring VOS bits in PWR D3 domain control register (PWR_D3CR) according to the required system performance.

Note: VOS0 can be enabled only when VOS1 is programmed in PWR D3 domain control register (PWR_D3CR) VOS bits. VOS0 deactivation must be managed by software before the system enters low-power mode.

Figure 36. Switching \( V_{CORE} \) from VOS1 to VOS0

Timing diagram showing the switching of V_CORE from 1,26 V to 1,35 V. The diagram includes four waveforms: V_CORE, ODEN, ACTVOSRDY, and VOSRDY. A 20 µs time interval is marked between the start of the voltage transition and the stabilization of the other signals.

The figure is a timing diagram illustrating the switching of \( V_{CORE} \) from 1,26 V to 1,35 V. The diagram shows four waveforms over time:

The diagram indicates that the voltage transition occurs while ODEN, ACTVOSRDY, and VOSRDY are low. The 20 µs interval marks the time from the start of the voltage transition to the stabilization of the other signals.

MSv63819V1

Timing diagram showing the switching of V_CORE from 1,26 V to 1,35 V. The diagram includes four waveforms: V_CORE, ODEN, ACTVOSRDY, and VOSRDY. A 20 µs time interval is marked between the start of the voltage transition and the stabilization of the other signals.
Figure 37.\( V_{CORE} \) voltage scaling versus system power modes Figure 37: V_CORE voltage scaling versus system power modes diagram. The diagram shows voltage scaling paths for Run, Stop, and Standby modes. Run mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3 (with a reset input). Stop mode includes MAIN or LP SVOS3, LP SVOS4, and LP SVOS5. Standby mode includes POWER DOWN. Arrows indicate transitions between these states: SW Run mode (green), Stop mode (blue), Standby mode (red), and Wakeup (yellow).

The diagram illustrates the voltage scaling paths for different system power modes. It is divided into three main sections: Run, Stop, and Standby.

Legend:

MSV40347V3

Figure 37: V_CORE voltage scaling versus system power modes diagram. The diagram shows voltage scaling paths for Run, Stop, and Standby modes. Run mode includes MAIN VOS0, MAIN VOS1, MAIN VOS2, and MAIN VOS3 (with a reset input). Stop mode includes MAIN or LP SVOS3, LP SVOS4, and LP SVOS5. Standby mode includes POWER DOWN. Arrows indicate transitions between these states: SW Run mode (green), Stop mode (blue), Standby mode (red), and Wakeup (yellow).

7.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 both CPU subsystems 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 CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) . Each CPU can choose to keep a domain in DStop, or allow a domain to enter DStandby. A domain enters DStandby only when both CPUs have allowed it.

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

All the domains can configure the system mode (Stop or Standby) through PDDS_Dn bits in PWR_CPU1 control register (PWR_CPU1CR) and PWR_CPU2 control register (PWR_CPU2CR) . The system enters Standby only when all PDDS_Dn bits for all domains have allowed it.

Table 35. PDDS_Dn low-power mode control

PWR_CPU1CRPWR_CPU2CRD1 modeD2 modeD3 mode
PDDS_D1PDDS_D2PDDS_D3PDDS_D1PDDS_D2PDDS_D3
0xDStopanyRun or Stop
xx0xDStopanyRun or Stop
1x1xDStandbyanyany
x0xxxanyDStopRun or Stop
x0anyDStopRun or Stop
11anyDStandbyany
at least one = 0DStop or DStandbyDStop or DStandbyStop
111111DStandbyDStandbyStandby

Figure 38. Power control modes detailed state diagram

Power control modes detailed state diagram showing RUN, STOP, and STANDBY states with transitions between CPU sub-systems and power domains.

The diagram illustrates the power control modes for a system with two CPU sub-systems (CPU1 and CPU2) and three power domains (D1, D2, and System D3). The main states are RUN, STOP, and STANDBY.

RUN State: This state is divided into several sub-states based on the power configuration of the CPU sub-systems and domains.

STOP State: Entered from the RUN state via 'Enter to STOP' transitions. In this state, CPU1 and CPU2 are in 'CSTOP', and 'EXTI wakeups inactive'. Domains D1 and D2 are in 'DSTOP' or 'DSTANDBY'.

STANDBY State: Entered from the RUN state via 'Enter to STANDBY' transition. In this state, D1 and D2 domains are in 'DSTANDBY'.

Legend:

MSv40349V3

Power control modes detailed state diagram showing RUN, STOP, and STANDBY states with transitions between CPU sub-systems and power domains.

After a system reset, both CPUs are in CRun mode.

Power control state transitions are initiated by the following events:

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

Table 36 shows the flags that indicate from which mode the domain/system exits. Each CPU has its own set of flags which can be read from PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) .

Table 36. Low-power exit mode flags

System modeD1 domain modeD2 domain modeSBF_D1SBF_D2SBFSTOPFComment
RunDRun or DStopDRun or DStop0000D1, D2 and system contents retained
RunDStandbyDRun or DStop1000D1 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.

7.6.4 Power management examples

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

Figure 39 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 39. Dynamic voltage scaling in Run mode

Timing diagram showing dynamic voltage scaling in Run mode. It includes signals for VOS 1, 2, 3, VOS, VOSRDY, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. Below the signals is a state transition table with columns for RUN, Wait VOSRDY, and Wait PLL states, and rows for clock sources (HSI, PLL).

The diagram illustrates the timing for dynamic voltage scaling. The top section shows the voltage levels (VOS 1, 2, 3) and the VOS register value over time. VOSRDY indicates when the voltage is stable. PLLxON shows the PLL status. The clock signals (ck_sys, ck_hclk_d1, d2, d3) show frequency changes corresponding to the voltage levels. The bottom table summarizes the system states:

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, VOS, VOSRDY, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. Below the signals is a state transition table with columns for RUN, Wait VOSRDY, and Wait PLL states, and rows for clock sources (HSI, PLL).
  1. 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 40 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. CPU1 subsystem first enters CStop and D1 domain DStop mode. D1 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, CPU2 subsystem enters CStop mode, D2 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. CPU2 subsystem is then woken up. The system exits from Stop mode, the D2 domain exits from DStop mode and the CPU2 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 D2 system clock are enabled.
  5. 5. The CPU1 subsystem is then woken up and exits from CStop mode. The D1 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 40. Dynamic voltage scaling behavior with D1, D2 and system in Stop mode

Timing diagram showing dynamic voltage scaling behavior. It includes waveforms for VOS 1, VOS 2, VCORE (S)VOS 3, SVOS 4, VOSRDY, pwr_c1_wkup, pwr_d1_wkup, pwr_c2_wkup, pwr_d2_wkup, PLLnON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. Below the waveforms is a state transition table with columns for RUN, D1STOP D2RUN D3RUN, STOP, Wait VCORE, Wait HSI, RUN from HSI, and Run from PLL.
RUND1STOP
D2RUN
D3RUN
STOPWait
VCORE
Wait
HSI
D1STOP
D2RUN
D3RUN
RUNWait
VOSRDY
RUN
Run from PLLClock StoppedRUN from HSIRun from PLL

MSv40351V3

Timing diagram showing dynamic voltage scaling behavior. It includes waveforms for VOS 1, VOS 2, VCORE (S)VOS 3, SVOS 4, VOSRDY, pwr_c1_wkup, pwr_d1_wkup, pwr_c2_wkup, pwr_d2_wkup, PLLnON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3. Below the waveforms is a state transition table with columns for RUN, D1STOP D2RUN D3RUN, STOP, Wait VCORE, Wait HSI, RUN from HSI, and Run from PLL.

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

Figure 41 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. CPU2 subsystem first enters CStop mode and D2 domain enters 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. CPU1 subsystem then enters to CStop mode, D1 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, D1 subsystem clock, and D2 subsystem clock are enabled. The software shall then check the ACTVOSRDY is valid before changing the system performance.
  5. 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.
  6. 6. The CPU2 completes processing and sets CPU2 subsystem in CStop mode and D2 domain in DStandby mode. The D2 domain bus matrix clock is stopped and its supply switched off.

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

Timing diagram showing dynamic voltage scaling for D1, D2, and system Standby mode. The diagram plots VOS 1, VOS 2, V_CORE, (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, ACTIVOSRDY, exti_c1_wkup, pwr_d1_wkup, exti_c2_wkup, pwr_d2_wkup, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3 over time. The bottom section shows system states in blue: Run from PLL, Power down, RESET Wait VCORE, Wait HSI, RUN from HSI, and Run from PLL.

The figure is a timing diagram illustrating the dynamic voltage scaling (DVS) sequence for D1, D2, and system Standby mode. It shows the relationship between voltage levels, register states, and clock signals during system transitions.

Signal Levels:

System States (Blue Box):

D1RUN
D2RUN
D3RUN
D1RUN
D2STANDBY
D3RUN
D1STANDBY
D2STANDBY
D3STANDBY
RESET
Wait VCORE
Wait HSIWait ACTVOS RDYD1RUN
D2RUN
D3RUN
Wait VOSRDYWait PLLD1RUN
D2RUN
D3RUN
D1RUN
D2STANDBY
D3RUN
Run from PLLPower downRUN from HSIRun from PLL

MSv40352V3

Timing diagram showing dynamic voltage scaling for D1, D2, and system Standby mode. The diagram plots VOS 1, VOS 2, V_CORE, (S)VOS 3, SVOS 4, VOS, SVOS, VOSRDY, ACTIVOSRDY, exti_c1_wkup, pwr_d1_wkup, exti_c2_wkup, pwr_d2_wkup, PLLxON, ck_sys, ck_hclk_d1, ck_hclk_d2, and ck_hclk_d3 over time. The bottom section shows system states in blue: Run from PLL, Power down, RESET Wait VCORE, Wait HSI, RUN from HSI, and Run from PLL.
  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 42 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. CPU1 subsystem first enters CStop mode and the D1 domain enters to DStandby mode. The D1 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. CPU2 subsystem then enters CStop mode and the D2 domain enters DStandby mode. The D2 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.

  1. 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.
  2. 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.
  3. 6. CPU1 subsystem is then woken up. The system exits from Stop mode, the D1 domain exits from DStandby mode and CPU1 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.

Figure 42. 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-4, VOSRDY, various wake-up pins, and system clocks across different power states (RUN, DStandby, 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 supply voltages (V DD ), voltage scaling levels (VOS), voltage scaling ready signal (VOSRDY), wake-up pins (exti, pwr), and system clocks (ck_sys, ck_hclk) during transitions between different power states.

Signals and States:

Power States and Register Bit Status (shown in blue in the original document):

RUND1STANDBY
D2RUN
D3RUN
D1STANDBY
D2STANDBY
D3STOP
Wait
VCORE
Wait
HSI
D1STANDBY
D2STANDBY
D3RUN
D1STANDBY
D2STANDBY
D3STOP
Wait
VCORE
Wait
HSI
D1RUN
D2STANDBY
D3RUN
RUN from PLLClock stoppedRUN from HSIClock stoppedRUN from HSI
Timing diagram showing dynamic voltage scaling behavior for VOS 1-4, VOSRDY, various wake-up pins, and system clocks across different power states (RUN, DStandby, Wait VCORE, Wait HSI).

MSV40353V3

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

7.7 Low-power modes

Several low-power modes are available to save power when the CPU(s) do 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:

7.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 9.5.6: System clock (sys_ck) .

7.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 , RCC_C2_xxxxENR or RCC_DnxxxxENR to reduce power consumption.

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

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

A domain can enter DStop or DStandby low-power mode when the CPU subsystem(s) that have an allocated peripheral in the domain enters CStop mode, or when the other domain CPU deallocates its last peripheral and the domain CPU subsystem is in CStop mode.

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.

7.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®-M4 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®-M4 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)).

A domain can exit from DStop or DStandby mode when the other domain CPU allocates a first peripheral in the domain. In this case the CPU in the domain is not woken up.

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

7.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, RCC_C2_xxxxENR or RCC_DnxxxxENR.

Entering CSleep mode

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

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

Exiting from CSleep mode

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

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

Table 37. 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

7.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 shall be set to be able to request the kernel clock.

Entering CStop mode

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

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

Exiting from CStop mode

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

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

Table 38. 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:

If WFE was used for entry and SEVONPEND = 0:

If WFE was used for entry and SEVONPEND = 1:

Note: When CPU1 sends a SEV event to wakeup CPU2, the event duration is equal to 512 clock cycles.

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

7.7.7 DStop mode

D1 domain and/or D2 domain enters DStop mode only when all CPU subsystems having peripherals allocated in the domain are in CStop mode (see Table 39 ). 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 39. DStop mode overview

Peripheral allocationCPU1CPU2D1 domainD2 domainComment
CPU1 subsystem no peripheral allocated in D2 domain.
and
CPU2 subsystem no peripheral allocated in D1 domain.
CStopCRun or CSleepDStopDRun
CRun or CSleepCStopDRunDStop
CStopCStopDStopDStop
CPU1 subsystem peripheral allocated in D2 domain.
and
CPU2 subsystem no peripheral allocated in D1 domain.
CStopCRun or CSleepDStopDRun
CRun or CSleepCStopDRunDRunCPU1 subsystem, keep D2 domain active.
CStopCStopDStopDStop
CPU1 subsystem no peripheral allocated in D2 domain.
and
CPU2 subsystem peripheral allocated in D1 domain.
CStopCRun or CSleepDRunDRunCPU2 subsystem, keep D1 domain active.
CRun or CSleepCStopDRunDStop
CStopCStopDStopDStop
CPU1 subsystem peripheral allocated in D2 domain.
and
CPU2 subsystem peripheral allocated in D1 domain.
CStopCRun or CSleepDRunDRunCPU2 subsystem, keep D1 domain active.
CRun or CSleepCStopDRunDRunCPU1 subsystem, keep D2 domain active.
CStopCStopDStopDStop

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 7.7.3: Entering low-power modes , when at least one PDDS_Dn bit in PWR CPU1 control register (PWR_CPU1CR) or PWR CPU2 control register (PWR_CPU2CR) for the domain select Stop.

Refer to Table 40 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 7.7.4: Exiting from low-power modes .

Refer to Table 40 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 40. DStop mode

DStop modeDescription
Mode entry
  • – The domain CPU subsystem enters CStop and the other domain CPU subsystem has no peripheral allocated in the domain or is also in CStop.
  • – The other domain CPU subsystem has an allocated peripheral and enters to CStop and the Domain CPU subsystem is in CStop.
  • – The other domain CPU subsystem deallocated its last peripheral in the domain and the Domain CPU subsystem is in CStop.
  • – At least one PDDS_Dn bit for the domain selects Stop mode.
Mode exit
  • – The domain CPU subsystem exits from CStop mode (see Table 38 )
  • – The other domain CPU subsystem has an allocated peripheral in the domain and exits from CStop mode (see Table 38 )
  • – The other domain CPU subsystem allocates a first peripheral in the domain.
Wakeup latencyEXTI and RCC wakeup synchronization (see Section 9.4.7: Power-on and wakeup sequences ).

7.7.8 Stop mode

The system D3 domain enters Stop mode only when all CPU subsystems are in CStop mode, the EXTI wakeup sources are inactive and at least one PDDS_Dn bit in PWR CPU1 control register (PWR_CPU1CR) or PWR CPU2 control register (PWR_CPU2CR) for any domain request Stop. In Stop mode, the system clock including a PLL and the D3 domain bus matrix clocks are stopped. When HSI or CSI is selected, the system oscillator operates according to the HSIKERON and CSIKERON bits in RCC_CR register. Other system oscillator sources are stopped.

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:

The IWDG is started by writing to its Key register or by hardware option. Once started it cannot be stopped except by a Reset (see Section 48.3.3: Window option in Section 48: Independent watchdog (IWDG) ).

The selected SVOS4 and SVOS5 levels add an additional startup delay when exiting from system Stop mode (see Table 41 ).

Table 41. 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 7.7.3: Entering low-power modes , when at least one PDDS_Dn bit in PWR CPU1 control register (PWR_CPU1CR) or PWR CPU2 control register (PWR_CPU2CR) for any domain request Stop.

Refer to Table 44 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.

Before entering Stop mode, the software must ensure that VOS0 is not active.

Exiting from Stop mode

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

Refer to Table 44 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.

A CPU hold mechanism is used to allow the system to be re-initialized by a “master” CPU. The “master” CPU can be woken up by its own wakeup sources and by the “slave” CPU wakeup sources. The “slave” CPU is kept on hold until it is released by the “master” CPU. The hold mechanism is controlled by HOLDn register bits. When the “slave” CPU is on hold, the “slave” CPU subsystem clocks are stalled until they are released by the “master” CPU.

A “slave” CPU will only be put on hold when exiting from Stop mode and the “slave” CPU associated HOLDn bit is set. The “slave” CPU remains on hold until the “master” CPU clears the HOLDn bit (i.e. after system re-initialization). When a wakeup event is issued for the “slave” CPU that is on hold, the “master” CPU is woken up and receives a HOLDnF interrupt.

Note: For correct operation, it is mandatory that the “master” CPU clears the “slave” CPU HOLDn bit each time it exits from CStop mode.

System D3 autonomous mode wakeup from Stop does not support the hold mechanism, hence there is no re-initialization and the system runs from the HSI or CSI clock.

Table 42. Stop mode hold control

HOLD1HOLD2Comment
00Hold mechanism disabled, each CPU is only woken up from Stop mode by its own wakeup source.
01CPU1 is “master” and is woken up from Stop mode by its own wakeup sources and on a CPU2 wakeup sources through PWR_CPU1CR.HOLD2F interrupt.
When a CPU2 wakeup source event occurs, the CPU2 needs to be released from hold by CPU1 (i.e. after system re-initialization.)
10CPU2 is “master” and is woken up from Stop mode by its own wakeup sources and on a CPU1 wakeup sources through PWR_CPU2CR.HOLD1F interrupt.
When a CPU1 wakeup sources event occurs, the CPU1 need to be released from hold by CPU2 (i.e. after system re-initialization.)
11Hold mechanism disabled, each CPU is only woken up from Stop mode by its own wakeup source.

Figure 43 shows the Stop mode hold mechanism state diagram.

Figure 43. Stop mode hold mechanism state diagram

State diagram for Stop mode hold mechanism showing RUN and STOP states with transitions between CPU1 and CPU2 CRun, CSleep, and CStop modes based on HOLD signals and wakeups.

The diagram illustrates the state transitions for two CPUs (CPU1 and CPU2) in RUN and STOP modes. The RUN mode contains several sub-states:

The STOP mode contains:

State diagram for Stop mode hold mechanism showing RUN and STOP states with transitions between CPU1 and CPU2 CRun, CSleep, and CStop modes based on HOLD signals and wakeups.

STOPF and HOLD1F and HOLD2F status flags in PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) indicate that the system has exited from Stop mode (see Table 43 ). Each CPU has its own set of flag.

The Hold procedure for the “master” CPU is the following:

The HOLDn bits only take effect when it is set and the system exits from Stop mode. The associated CPU is kept on hold when the MCU exits from Stop mode and until the HOLDn bit is cleared (see state transitions in blue in Figure 43 ).

When the system does not enter Stop mode, the system configuration is kept and the CPU is not on hold. In this case, the HOLDn bit has no effect (see state transitions in green in Figure 43 ). Refer also to Table 43 for a detailed description of the hold mechanism.

Table 43. Wakeup hold behavior and associated flags (1)

SystemHOLD1HOLD2HOLD1FHOLD2FSTOPFBehavior
Exit from Stop mode10x01CPU2 woken up from CStop mode with CPU2 wakeup event.
101CPU2 and CPU1 woken up from CStop mode with CPU1 wakeup event. CPU1 in hold until released by CPU2. CPU2 receives HOLD1F interrupt.
x01System D3 domain woken up from Stop mode with EXTI wakeup source. CPU1 and CPU2 kept in CStop.
Run modex0000CPU2 is only woken up from CStop mode with CPU2 wakeup event. The system has not been in Stop.
000CPU1 woken up from CStop mode with CPU1 wakeup event. The system has not been in Stop.

1. CPU2 is “master” and CPU1 is “Slave” (the reversed table applies when CPU1 is “master” and CPU2 is “slave”).

Table 44. Stop mode

Stop modeDescription
Mode entry
  • – When CPU1 and CPU2 are 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 latency

I/O states in Stop mode

I/O pin configuration remain unchanged in Stop mode.

7.7.9 DStandby mode

Like DStop mode, DStandby mode is based on CPU subsystems CStop mode. However the domain V CORE supply is powered off. A domain enters DStandby mode only when all CPU subsystems that have peripherals allocated in the domain are in CStop mode and all PDDS_Dn bits in PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) for the domain are 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 7.7.3: Entering low-power modes , when all PDDS_Dn bits in PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) for the Dn domain select Standby mode.

Refer to Table 45 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 other domain CPU PDDS_Dn bit selects Stop mode, the Dn domain remains in DStop. When the other domain CPU sets the PDDS_Dn bit to select Standby mode, the Dn domain will enter DStandby mode (the other domain CPU has no allocated peripherals in the Dn domain).

Exiting from DStandby mode

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

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

Note: When a domain is in DStandby mode and the other domain CPU sets the domain PDDS_Dn bit to select Stop mode, the domain remains in DStandby mode. The domain will only exit DStandby when the other domain CPU allocates a peripheral in the 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 a domain exits from DStandby mode due to the other domain CPU subsystem (i.e when allocating a first peripheral or when the other domain CPU subsystem having peripherals allocated in the domain exits from CStop mode), the other domain 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 till that the domain has exited from DStandby mode. To do this, check the SBF_Dn flag in PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) . 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 45. DStandby mode

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

7.7.10 Standby mode

The Standby mode allows achieving the lowest power consumption. Like Stop mode, it is based on CPU subsystems 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 7.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 7.7.3: Entering low-power modes , when all PDDS_Dn bits in PWR CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) for all domains request Standby.

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

Note: Before entering Standby mode, the software must ensure that VSO0 is not active.

Exiting from Standby mode

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

Refer to Table 47 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 CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register (PWR_CPU2CR) , 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 CPU1 control register (PWR_CPU1CR) and PWR CPU2 control register

(PWR_CPU2CR) registers indicate from which mode the system has exited (see Table 46 ). Each CPU has its own SBF flags.

The system will boot according to the option bytes CM7B and CM4B (see Section 2.6: Boot configuration ).

Table 46. 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
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 47. Standby mode

Standby modeDescription
Mode entry
  • – The CPU1 subsystem and CPU2 subsystem are 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 9.4.2: System reset )

I/O states in Standby mode

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

7.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 48 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 48. Low-power modes monitoring pin overview

Power state monitoring pinsDescription
CxSLEEPSleeping CPU (Cx, x= 1 or 2) state
CxDSLEEPDeep sleep CPU (Cx, x= 1 or 2) state
DxPWRENDomain (Dx, x= 1 or 2) power enabled

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

Table 49. GPIO state according to CPU and domain state

Domain
DxPWREN
CPUxCPUx power
state
Domainx power
state
CxSLEEPCxDSLEEP
100CPUx in Run modeDRun mode
110CPUx in Sleep mode
101CPUx in Run mode
111CPUx in Deep sleep modeDRun (1) , DStop mode
0--_(2)DStandby mode

1. The domain might be in Run mode if a peripheral is allocated to the other CPU.

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

7.8 PWR registers

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

7.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.ALSAVDEN
rwrw
1514131211109876543210
SVOSRes.Res.Res.Res.FLPSDBPPLSPVDERes.Res.Res.LPDS
rwrwrwrwrwrwrwrwrw

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

Bits 18:17 ALS : Analog voltage detector level selection
These bits select the voltage threshold detected by the AVD.
00: 1.7 V
01: 2.1 V
10: 2.5 V
11: 2.8 V

Bit 16 AVDEN : Peripheral voltage monitor on V DDA enable
0: Peripheral voltage monitor on V DDA disabled.
1: Peripheral voltage monitor on V DDA enabled

Bits 15:14 SVOS : System Stop mode voltage scaling selection
These bits control the V CORE voltage level in system Stop mode, to obtain the best trade-off between power consumption and performance.
00: Reserved
01: SVOS5 Scale 5
10: SVOS4 Scale 4
11: SVOS3 Scale 3 (default)

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.
0: Flash memory remains in normal mode when D1 domain enters DStop (quick restart time).
1: Flash memory enters low-power mode when D1 domain enters DStop mode (low-power consumption).

Bit 8 DBP : Disable backup domain write protection

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

Bits 7:5 PLS : Programmable voltage detector level selection

These bits select the voltage threshold detected by the PVD.

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

Bit 4 PVDE : Programmable voltage detector enable

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)

7.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
ACTVOSACTVOSRDYRes.Res.Res.Res.Res.Res.Res.Res.PVDORes.Res.Res.Res.
rrr

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

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

7.8.4 PWR control register 3 (PWR_CR3)

Address offset: 0x00C

Reset value: 0x0000 0006 (reset only by POR only, not reset by wakeup from Standby mode and RESET pad).

The lower byte of this register is written once after POR and shall 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 33 ) 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 shall be power cycled before writing a new value.

31302928272625242322212019181716
Res.Res.Res.Res.Res.USB33RDYUSBREGENUSB33DENRes.Res.Res.Res.Res.Res.Res.SDEXTRDY
rrwrwr
1514131211109876543210
Res.Res.Res.Res.Res.Res.VBRSVBERes.Res.SDLEVELSDEXTHPSDENLDOENBYPASS
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.

  1. Bit 25 USBREGEN : USB regulator enable.
    0: USB regulator disabled.
    1: USB regulator enabled.
  2. Bit 24 USB33DEN : \( V_{DD33USB} \) voltage level detector enable.
    0: \( V_{DD33USB} \) voltage level detector disabled.
    1: \( V_{DD33USB} \) voltage level detector enabled.
  3. Bits 23:17 Reserved, must be kept at reset value
  4. 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.
  5. Bits 15:10 Reserved, must be kept at reset value
  6. 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.
  7. Bit 8 VBE : \( V_{BAT} \) charging enable
    0: \( V_{BAT} \) battery charging disabled.
    1: \( V_{BAT} \) battery charging enabled.
  8. Bits 7:6 Reserved, must be kept at reset value
  9. Bits 5:4 SDLEVEL (1) : 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
  10. Bit 3 SDEXTHP (1) : 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.
  11. Bit 2 SDEN (1)(2) : SMPS step-down converter enable
    0: SMPS step-down converter disabled
    1: SMPS step-down converter enabled. (Default)
  12. Bit 1 LDOEN (1) : Low drop-out regulator enable
    0: Low drop-out regulator disabled.
    1: Low drop-out regulator enabled (default)
  13. Bit 0 BYPASS (1) : Power management unit bypass
    0: Power management unit normal operation.
    1: Power management unit bypassed, voltage monitoring still active.
  1. 1. Illegal combinations of SDLEVEL, SDEXTHP, SDEN, LDOEN and BYPASS are described in Table 33 .
  2. 2. The SMPS step-down converter is not available on all packages. In this case, the SMPS step-down converter is disabled.

7.8.5 PWR CPU1 control register (PWR_CPU1CR)

This register allows controlling CPU1 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_D3HOLD2CSSFSBF_D2SBF_D1SBFSTOPFHOLD2FRes.PDDS_D3PDDS_D2PDDS_D1
nwnwnwrrrrrnwnwnw

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 HOLD2 : Hold the CPU2 and allocated peripherals when exiting from Stop mode.

0: CPU2 and allocated peripherals are not affected, and start running when woken up from Stop mode.

1: CPU2 and allocated peripherals are on hold when woken up from Stop mode. Writing this bit to 0 will release the CPU2 and allocated peripherals.

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

This bit is cleared to 0 by hardware.

0: No effect.

1: D1 domain CPU1 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 CPU1 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 CPU1 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 CPU1 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 CPU1 CSSF bit.

0: System has not been in Stop mode

1: System has been in Stop mode

Bit 4 HOLD2F : CPU2 on hold wakeup flag.

This flag also generates a CPU1 interrupt. CPU1 has been woken up from a CPU2 wakeup source with CPU2 on hold. This flag is set by hardware and cleared only by a system reset or by setting the CPU1 CSSF bit.

0: No CPU2 system wake up with hold.

1: CPU2 system wake up with hold.

Bit 3 Reserved, must be kept at reset value

Bit 2 PDDS_D3 : System D3 domain Power Down Deepsleep.

This bit allows CPU1 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 CPU1 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 CPU1 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.

7.8.6 PWR CPU2 control register (PWR_CPU2CR)

This register allows controlling CPU2 power.

Address offset: 0x014

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_D3HOLD1CSSFSBF_D2SBF_D1SBFSTOPFHOLD1FRes.PDDS_D3PDDS_D2PDDS_D1
rwrwrwrrrrrrwrwrw

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

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

0: D3 domain follows the CPU subsystems modes.

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

Bit 10 HOLD1 : Hold the CPU1 and allocated peripherals when exiting from Stop mode.

0: CPU1 and allocated peripherals are not affected, and start running when woken up from Stop mode.

1: CPU1 and allocated peripherals are on hold when woken up from Stop mode. Writing this bit to 0 will release the CPU1 and allocated peripherals.

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

This bit is cleared to 0 by hardware.

0: No effect.

1: D2 domain CPU2 flags (HOLD1F, STOPF, SBF, SBF_D1, and SBF_D2) 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 CPU2 CSSF bit. Once set, it 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 Reset or by setting the CPU2 CSSF bit. Once set, this bit can be cleared only when the D1 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 6 SBF : System Standby flag

This bit is set by hardware and cleared only by a POR (Power-on Reset) or by setting the CPU2 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 CPU2 CSSF bit.

0: System has not been in Stop mode.

1: System has been in Stop mode.

Bit 4 HOLD1F : CPU1 in hold wakeup flag.

This flag also generates a CPU2 interrupt.

CPU2 has been woken up from a CPU1 wakeup source with CPU1 on hold. This flag is set by hardware and cleared only by a system reset or by setting the CPU2 CSSF bit.

0: No CPU1 system wake up with hold.

1: CPU1 system wake up with hold.

Bit 3 Reserved, must be kept at reset value

Bit 2 PDDS_D3 : System D3 domain Power Down Deepsleep.

This bit allows CPU2 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 CPU2 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 CPU2 to define the Deepsleep mode for D1 domain.

0: Keep DStop mode when D1 domain enters to Deepsleep.

1: Allow DStandby mode when D1 domain enters to Deepsleep.

7.8.7 PWR D3 domain control register (PWR_D3CR)

This register allows controlling D3 domain power.

Address offset: 0x018

Reset value: 0x0000 4000 (Following reset VOSRDY will be read 1 by software).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
VOSVOSRDYRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwr

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

Bits 15:14 VOS : Voltage scaling selection according to performance

These bits control the \( V_{CORE} \) voltage level and allow to obtains the best trade-off between power consumption and performance:

00: Reserved (Scale 3 selected).

01: Scale 3 (default)

10: Scale 2

11: Scale 1

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

This bit is set to 1 by hardware when Bypass mode is selected in PWR control register 3 (PWR_CR3).

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

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

Bits 31:6 Reserved, always read as 0.

Bits 5:0 WKUPCn : Clear Wakeup pin flag for WKUPn.

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)

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

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

Bits 5:0 WKUPn : Wakeup pin WKUPn flag.

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

7.8.10 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.WKUPPUPD6WKUPPUPD5WKUPPUPD4WKUPPUPD3WKUPPUPD2WKUPPUPD1
rwrwrwrwrwrwrwrwrwrwrwrw

1514131211109876543210
Res.WKUPP6WKUPP5WKUPP4WKUPP3WKUPP2WKUPP1Res.
rwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 27:16 WKUPPUPD[truncate(n/2)-7] : Wakeup pin pull configuration for WKUP(truncate(n/2)-7)

These bits define the I/O pad pull configuration used when WKUPEN(truncate(n/2)-7) = 1. The associated GPIO port pull configuration shall 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:8 WKUPPn-7 : Wakeup pin polarity bit for WKUPn-7

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

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

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

Bits 5:0 WKUPENn : Enable Wakeup Pin WKUPn

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 pin is enabled (by setting the WKUPENn bit) when WKUPn pin level is already high when WKUPPn selects rising edge, or low when WKUPPn selects falling edge.

7.8.11 PWR register map

Table 50. Power control register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x000PWR_CR1ReservedALSAVDENSVOSReservedFLPSDBPPLSPVDEReservedLPDS
Reset value00110000000000000
0x004PWR_CSR1ReservedAVDOACTVOSACTVOSRDYReservedReservedPVDOReservedReserved
Reset value0010
0x008PWR_CR2ReservedTEMPHTEMPLVBATHVBATLReservedReservedReservedReservedMONENReservedBREN
Reset value000000
0x00CPWR_CR3ReservedUSB33RDYUSBREGENUSB33DENReservedReservedReservedReservedReservedSDEXTRDYReservedReservedVBRVBEReservedSDLEVELSDEXTHPSDENLDOENBYPASS
Reset value0000000000110
0x010PWR_CPU1CRReservedRUN_D3HOLD2CSSFSBF_D2SBF_D1SBFSTOPFHOLD2Fres.PDDS_D3PDDS_D2PDDS_D1
Reset value0000000000000
0x014PWR_CPU2CRReservedRUN_D3HOLD1CSSFSBF_D2SBF_D1SBFSTOPFHOLD1Fres.PDDS_D3PDDS_D2PDDS_D1
Reset value0000000000000
0x018PWR_D3CRReservedVOSVOSRDYReserved
Reset value010
0x020PWR_WKUPCRReservedWKUPC6WKUPC5WKUPC4WKUPC3WKUPC2WKUPC1
Reset value00000000
0x024PWR_WKUPFRReservedWKUPF6WKUPF5WKUPF4WKUPF3WKUPF2WKUPF1
Reset value00000000
0x028PWR_WKUPEPRReservedWKUPPUD6WKUPPUD5WKUPPUD4WKUPPUD3WKUPPUD2WKUPPUD1res.WKUPP6WKUPP5WKUPP4WKUPP3WKUPP2WKUPP1res.WKUPEN6WKUPEN5WKUPEN4WKUPEN3WKUPEN2WKUPEN1
Reset value000000000000000000

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