4. Power control (PWR)

4.1 Power supplies

The STM32U0 series devices require a 1.71 V to 3.6 V operating supply voltage ( \( V_{DD} \) ). Several peripherals are supplied through independent power domains: \( V_{DDA} \) , \( V_{DDUSB} \) , \( V_{LCD} \) . Those supplies must not be provided without a valid operating supply on the \( V_{DD} \) pin.

\( V_{DD} \) is the external power supply for the I/Os, the internal regulator and the system analog such as reset, power management and internal clocks. It is provided externally through VDD pins.

\( V_{DDUSB} \) is the external independent power supply for USB transceivers. The \( V_{DDUSB} \) voltage level is independent from the \( V_{DD} \) voltage. \( V_{DDUSB} \) should be preferably connected to \( V_{DD} \) when the USB is not used.

The LCD controller can be powered either externally through VLCD pin, or internally from an internal voltage generated by the embedded step-up converter. VLCD is multiplexed with PC3 which can be used as GPIO when the LCD is not used.

\( V_{BAT} \) is the power supply for RTC, external clock 32 kHz oscillator and backup registers (through power switch) when \( V_{DD} \) is not present.

\( V_{BAT} \) is internally bonded to \( V_{DD} \) for small packages without dedicated pin.

\( V_{REF+} \) is the input reference voltage for ADCs and DACs. It is also the output of the internal voltage reference buffer when enabled.

When \( V_{DDA} < 2 \text{ V} \) , \( V_{REF+} \) must be equal to \( V_{DDA} \) .

When \( V_{DDA} \geq 2 \text{ V} \) , \( V_{REF+} \) must be between 2 V and \( V_{DDA} \) .

\( V_{REF+} \) can be grounded when ADC and DAC are not active.

The internal voltage reference buffer supports two output voltages, which are configured with VRS bit in the VREFBUF_CSR register:

\( V_{REF-} \) and \( V_{REF+} \) pins are not available on all packages. When not available on the package, they are bonded to VSSA and \( V_{DDA} \) , respectively.

When the \( V_{REF+} \) is double-bonded with \( V_{DDA} \) in a package, the internal voltage reference buffer is not available and must be kept disabled (refer to related device datasheet for packages pinout description).

\( V_{REF\_} \) must always be equal to \( V_{SSA} \) .

An embedded linear voltage regulator is used to supply the internal digital power \( V_{CORE} \) . \( V_{CORE} \) is the power supply for digital peripherals and memories.

Figure 6. Power supply overview

Figure 6. Power supply overview diagram showing the internal power domains and their connections to external pins.

The diagram illustrates the power supply architecture of the microcontroller, showing the following domains and their connections:

MSV71800V2

Figure 6. Power supply overview diagram showing the internal power domains and their connections to external pins.

1. Available on STM32U0x3xx devices only.

4.1.1 Independent analog peripherals supply

To improve ADC and DAC conversion accuracy and to extend the supply flexibility, the analog peripherals have an independent power supply which can be separately filtered and shielded from noise on the PCB.

The \( V_{DDA} \) supply voltage can be different from \( V_{DD} \) . The presence of \( V_{DDA} \) must be checked before enabling any of the analog peripherals supplied by \( V_{DDA} \) (A/D converter, D/A converter, comparators, operational amplifier, voltage reference buffer).

The \( V_{DDA} \) supply can be monitored by the Peripheral Voltage Monitoring, and compared with two thresholds (1.65 V for PVM3 or 1.86 V for PVM4), refer to Section 4.2.3: Peripheral Voltage Monitoring (PVM) for more details.

When a single supply is used, \( V_{DDA} \) can be externally connected to \( V_{DD} \) through the external filtering circuit in order to ensure a noise-free \( V_{DDA} \) reference voltage.

ADC and DAC reference voltage

To ensure a better accuracy on low-voltage inputs and outputs, the user can connect to \( V_{REF+} \) a separate reference voltage lower than \( V_{DDA} \) . \( V_{REF+} \) is the highest voltage, represented by the full scale value, for an analog input (ADC) or output (DAC) signal.

\( V_{REF+} \) can be provided either by an external reference or by an internal buffered voltage reference (VREFBUF), except for packages on which \( V_{REF+} \) is bonded with \( V_{DDA} \) .

The internal voltage reference is enabled by setting the ENVR bit in the Section 16.3.1: VREFBUF control and status register (VREFBUF_CSR) . The voltage reference is set to 2.5 V when the VRS bit is set and to 2.048 V when the VRS bit is cleared. The internal voltage reference can also provide the voltage to external components through \( V_{REF+} \) pin. Refer to the device datasheet and to Section 16: Voltage reference buffer (VREFBUF) for further information.

4.1.2 Independent USB transceivers supply

This section is applicable to STM32U0x3xx devices only.

The USB transceivers are supplied from a separate \( V_{DDUSB} \) power supply pin. \( V_{DDUSB} \) range is from 3.0 V to 3.6 V and is completely independent from \( V_{DD} \) or \( V_{DDA} \) .

After reset, the USB features supplied by \( V_{DDUSB} \) are logically and electrically isolated and therefore are not available. The isolation must be removed before using the USB FS peripheral, by setting the USV bit in the PWR_CR2 register, once the \( V_{DDUSB} \) supply is present.

The \( V_{DDUSB} \) supply is monitored by the Peripheral Voltage Monitoring (PVM1) and compared with the internal reference voltage ( \( V_{REFINT} \) , around 1.2 V), refer to Section 4.2.3: Peripheral Voltage Monitoring (PVM) for more details.

4.1.3 Independent LCD supply

This section is applicable to STM32U03xx devices only.

The VLCD pin is provided to control the contrast of the glass LCD. This pin can be used in two ways:

The voltage provided to segment and common lines defines the contrast of the glass LCD pixels. This contrast can be reduced when you configure the dead time between frames.

4.1.4 Battery backup domain

To retain the content of the Backup registers and supply the RTC function when V DD is turned off, the VBAT pin can be connected to an optional backup voltage supplied by a battery or by another source.

VBAT pin is not available on low pin-count packages, V BAT is internally connected to V DD .

The VBAT pin powers the RTC unit, the LSE oscillator and the PC13 to PC15 I/Os, allowing the RTC to operate even when the main power supply is turned off. The switch to the V BAT supply is controlled by the power-down reset embedded in the Reset block.


Warning: During \( t_{RSTTEMPO} \) (temporization at V DD startup) or after a PDR has been detected, the power switch between V BAT and V DD remains connected to V BAT . During the startup phase, if V DD is established in less than \( t_{RSTTEMPO} \) (refer to the datasheet for the value of \( t_{RSTTEMPO} \) ) and \( V_{DD} > V_{BAT} + 0.6 \) 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 VBAT pin cannot support this current injection, it is strongly recommended to connect an external low-drop diode between this power supply and the VBAT pin.


If no external battery is used in the application, it is recommended to connect V BAT to V DD supply, and add a 100 nF ceramic decoupling capacitor on VBAT pin.

When the backup domain is supplied by V DD (analog switch connected to V DD ), the following pins are available:

Note: Due to the fact that the analog switch can transfer only a limited amount of current (3 mA), the use of GPIO PC13 to PC15 in output mode is restricted: the speed has to be limited to 2 MHz with a maximum load of 30 pF and these I/Os must not be used as a current source (e.g. to drive a LED).

When the backup domain is supplied by V BAT (analog switch connected to V BAT because V DD is not present), the following functions are available:

RTC functional description on page 905)

Backup domain access

After a system reset, the backup domain (RTC registers and backup registers) is protected against possible unwanted write accesses. To enable access to the backup domain, proceed as follows:

  1. 1. Enable the power interface clock by setting the PWREN bits in the Section 5.2.18: Peripheral clock enable registers
  2. 2. Set the DBP bit in the Power control register 1 (PWR_CR1) to enable access to the backup domain
  3. 3. Select the RTC clock source in the RTC domain control register (RCC_BDCR) .
  4. 4. Enable the RTC clock by setting the RTCEN [15] bit in the RTC domain control register (RCC_BDCR) .

VBAT battery charging

When VDD is present, It is possible to charge the external battery on VBAT through an internal resistance.

The VBAT charging is done either through a 5 kOhm resistor or through a 1.5 kOhm resistor depending on the VBRS bit value in the PWR_CR4 register.

The battery charging is enabled by setting VBE bit in the PWR_CR4 register. It is automatically disabled in VBAT mode.

4.1.5 Voltage regulator

Two embedded linear voltage regulators supply all the digital circuitries, except for the Standby circuitry and the backup domain. The main regulator output voltage ( \( V_{CORE} \) ) can be programmed by software to two different power ranges (Range 1 and Range 2) in order to optimize the consumption depending on the system's maximum operating frequency (refer to Section 5.2.9: Clock source frequency versus voltage scaling and to Section 3.3.3: FLASH read access latency ).

The voltage regulators are always enabled after a reset. Depending on the application modes, the \( V_{CORE} \) supply is provided either by the main regulator (MR) or by the low-power regulator (LPR).

backup domain) and SRAM1 are powered off.

4.1.6 Dynamic voltage scaling management

The dynamic voltage scaling is a power management technique which consists in increasing or decreasing the voltage used for the digital peripherals ( \( V_{CORE} \) ), according to the application performance and power consumption needs.

Dynamic voltage scaling to increase \( V_{CORE} \) is known as over-volting. It allows to improve the device performance.

Dynamic voltage scaling to decrease \( V_{CORE} \) is known as under-volting. It is performed to save power, particularly in laptop and other mobile devices where the energy comes from a battery and is thus limited.

The main regulator provides a typical output voltage at 1.2 V. The system clock frequency can be up to 56 MHz. The flash access time for read access is minimum, write and erase operations are possible.

The main regulator provides a typical output voltage at 1.0 V. The system clock frequency can be up to 16 MHz when running from MSI, or up to 18 MHz when running from PLL or HSE. The flash access time for a read access is increased as compared to Range 1; write and erase operations are possible.

Voltage scaling is selected through the VOS bit in the PWR_CR1 register.

The sequence to go from Range 1 to Range 2 is:

  1. 1. Reduce the system frequency to a value lower than the maximum value allowed for Range 2.
  2. 2. Adjust the number of wait states according to the new frequency target in Range 2 (LATENCY bits in the FLASH_ACR).
  3. 3. Program the VOS bits to “10” in the PWR_CR1 register.

The sequence to go from Range 2 to Range 1 is:

  1. 1. Program the VOS bits to “01” in the PWR_CR1 register.
  2. 2. Wait until the VOSF flag is cleared in the PWR_SR2 register.
  3. 3. Adjust number of wait states according new frequency target in Range 1 (LATENCY bits in the FLASH_ACR).
  4. 4. Increase the system frequency.

4.2 Power supply supervisor

4.2.1 Power-on reset (POR) / power-down reset (PDR) / brown-out reset (BOR)

The device has an integrated power-on reset (POR) / power-down reset (PDR), coupled with a brown-out reset (BOR) circuitry. The BOR is active in all power modes except Shutdown mode, and cannot be disabled.

Five BOR thresholds can be selected through option bytes.

During power-on, the BOR keeps the device under reset until the supply voltage \( V_{DD} \) reaches the specified \( V_{BORx} \) threshold. When \( V_{DD} \) drops below the selected threshold, a device reset is generated. When \( V_{DD} \) is above the \( V_{BORx} \) upper limit, the device reset is released and the system can start.

For more details on the brown-out reset thresholds, refer to the electrical characteristics section in the datasheet.

On STM32U0 devices, continuous monitoring of the power supply might be changed to periodical sampling to reduce power consumption in Stop 2 and Standby modes by setting ENULP bit in Power control register 3 (PWR_CR3) . When sampling mode is selected, fast supply drop between two samples is not detected.

Figure 7. Brown-out reset waveform

Figure 7. Brown-out reset waveform. The graph shows the supply voltage VDD over time. The VDD line rises from a low level to a high level, then drops back to a low level. Two horizontal dashed lines represent the BOR threshold levels: V_BOR0 (rising edge) for the rising VDD and V_BOR0 (falling edge) for the falling VDD. The vertical distance between these two thresholds is labeled 'hysteresis'. A horizontal double-headed arrow labeled 'Temporization t_RSTTEMPO' indicates the time interval between the falling VDD crossing the threshold and the Reset signal going high. The Reset signal is shown as a line that goes high when VDD falls below the threshold and goes low when VDD rises above the threshold. The diagram is labeled MS31444V5 in the bottom right corner.
Figure 7. Brown-out reset waveform. The graph shows the supply voltage VDD over time. The VDD line rises from a low level to a high level, then drops back to a low level. Two horizontal dashed lines represent the BOR threshold levels: V_BOR0 (rising edge) for the rising VDD and V_BOR0 (falling edge) for the falling VDD. The vertical distance between these two thresholds is labeled 'hysteresis'. A horizontal double-headed arrow labeled 'Temporization t_RSTTEMPO' indicates the time interval between the falling VDD crossing the threshold and the Reset signal going high. The Reset signal is shown as a line that goes high when VDD falls below the threshold and goes low when VDD rises above the threshold. The diagram is labeled MS31444V5 in the bottom right corner.

4.2.2 Programmable voltage detector (PVD)

You can use the PVD to monitor the \( V_{DD} \) power supply by comparing it to a threshold selected by the \( PLS[2:0] \) bits in the Power control register 2 (PWR_CR2) .

The PVD is enabled by setting the PVDE bit.

A PVDO flag is available, in the Power status register 2 (PWR_SR2) , to indicate if \( V_{DD} \) is higher or lower than the PVD threshold. This event is internally connected to the EXTI line16 and can generate an interrupt if enabled through the EXTI registers. The rising/falling edge sensitivity of the EXTI Line16 should be configured according to PVD output behavior i.e. if the EXTI line 16 is configured to rising edge sensitivity, the interrupt is generated when \( V_{DD} \) drops below the PVD threshold. As an example the service routine could perform emergency shutdown tasks.

Figure 8. PVD thresholds

Figure 8. PVD thresholds. The diagram shows two synchronized waveforms. The top waveform represents VDD, which rises from zero, levels off, and then falls back to zero. A horizontal dashed line indicates the V_PVD threshold. A second dashed line slightly above it indicates the hysteresis level, with a '100 mV hysteresis' label and double-headed arrow between them. Vertical dashed lines mark the points where VDD crosses these thresholds. The bottom waveform is the 'PVD output', which is high when VDD is above the threshold and low when VDD falls below it. Specifically, the output goes low when VDD falls below the lower threshold and returns high when VDD rises above the upper (hysteresis) threshold.
Figure 8. PVD thresholds. The diagram shows two synchronized waveforms. The top waveform represents VDD, which rises from zero, levels off, and then falls back to zero. A horizontal dashed line indicates the V_PVD threshold. A second dashed line slightly above it indicates the hysteresis level, with a '100 mV hysteresis' label and double-headed arrow between them. Vertical dashed lines mark the points where VDD crosses these thresholds. The bottom waveform is the 'PVD output', which is high when VDD is above the threshold and low when VDD falls below it. Specifically, the output goes low when VDD falls below the lower threshold and returns high when VDD rises above the upper (hysteresis) threshold.

4.2.3 Peripheral Voltage Monitoring (PVM)

Only \( V_{DD} \) is monitored by default, as it is the only supply required for all system-related functions. The other supplies ( \( V_{DDA} \) and \( V_{DDUSB} \) ) can be independent from \( V_{DD} \) and can be monitored with four Peripheral Voltage Monitoring (PVM).

Each of the three \( PVM_x \) ( \( x=1, 3, 4 \) ) is a comparator between a fixed threshold \( V_{PVM_x} \) and the selected power supply. \( PVMO_x \) flags indicate if the independent power supply is higher or lower than the \( PVM_x \) threshold: \( PVMO_x \) flag is cleared when the supply voltage is above the \( PVM_x \) threshold, and is set when the supply voltage is below the \( PVM_x \) threshold.

Each PVM output is connected to an EXTI line and can generate an interrupt if enabled through the EXTI registers. The \( PVM_x \) output interrupt is generated when the independent power supply drops below the \( PVM_x \) threshold and/or when it rises above the \( PVM_x \) threshold, depending on EXTI line rising/falling edge configuration.

Each PVM can remain active in Stop 0, Stop 1 and Stop 2 modes, and the PVM interrupt can wake up from the Stop mode.

Table 20. PVM features

PVMPower supplyPVM thresholdEXTI line
PVM1 (1)\( V_{DDUSB} \)\( V_{PVM1} \) (around 1.2 V)19
PVM3\( V_{DDA} \)\( V_{PVM3} \) (around 1.65 V)20
PVM4\( V_{DDA} \)\( V_{PVM4} \) (around 1.86 V)21

1. Available on STM32 U0x3xx devices only.

The independent supplies ( \( V_{DDA} \) and \( V_{DDUSB} \) ) are not considered as present by default, and a logical and electrical isolation is applied to ignore any information coming from the peripherals supplied by these dedicated supplies.

can be enabled to confirm whether the supply is present or not.

The following sequence must be done before using the USB FS peripheral on STM32U0x3xx devices:

  1. 1. If \( V_{DDUSB} \) is independent from \( V_{DD} \) :
    1. a) Enable the PVM1 by setting PVME1 bit in the Power control register 2 (PWR_CR2) .
    2. b) Wait for the PVM1 wake-up time
    3. c) Wait until PVMO1 bit is cleared in the Power status register 2 (PWR_SR2) .
    4. d) Optional: Disable the PVM1 for consumption saving.
  2. 2. Set the USV bit in the Power control register 2 (PWR_CR2) to remove the \( V_{DDUSB} \) power isolation.

The following sequence must be done before using any of these analog peripherals: analog to digital converters, digital to analog converters, comparators, operational amplifiers, voltage reference buffer:

  1. 1. If \( V_{DDA} \) is independent from \( V_{DD} \) :
    1. a) Enable the PVM3 (or PVM4) by setting PVME3 (or PVME4) bit in the Power control register 2 (PWR_CR2) .
    2. b) Wait for the PVM3 (or PVM4) wake-up time
    3. c) Wait until PVMO3 (or PVMO4) bit is cleared in the Power status register 2 (PWR_SR2) .
    4. d) Optional: Disable the PVM3 (or PVM4) for consumption saving.
  2. 2. Enable the analog peripheral, which automatically removes the \( V_{DDA} \) isolation.

4.3 Low-power modes

By default, the microcontroller is in Run mode after a system or a power Reset. Several low-power modes are available to save power when the CPU does not need to be kept running, for example when waiting for an external event. It is up to the user to select the mode that gives the best compromise between low-power consumption, short startup time and available wake-up sources.

The device features seven low-power modes:

The RTC can remain active (Stop mode with RTC, Stop mode without RTC).

Some peripherals with the wake-up capability can enable the HSI16 RC during the

Stop mode to detect their wake-up condition.

In Stop 2 mode, most of the \( V_{CORE} \) domain is put in a lower leakage mode.

Stop 1 offers the largest number of active peripherals and wake-up sources, a smaller wake-up time but a higher consumption than Stop 2. In Stop 0 mode, the main regulator remains ON, which allows the fastest wake-up time but with much higher consumption. The active peripherals and wake-up sources are the same as in Stop 1 mode.

The system clock, when exiting from Stop 0, Stop 1 or Stop 2 mode, can be either MSI up to 48 MHz or HSI16, depending on the software configuration.

Refer to Section 4.3.6: Stop 0 mode and Section 4.3.8: Stop 2 mode .

All clocks in the \( V_{CORE} \) domain are stopped, the PLL, the MSI, the HSI16 and the HSE are disabled. The LSI and the LSE can be kept running.

The RTC can remain active (Standby mode with RTC, Standby mode without RTC).

The system clock, when exiting Standby modes, is MSI from 1 MHz up to 8 MHz.

Refer to Section 4.3.9: Standby mode .

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

Figure 9. Low-power modes possible transitions

Diagram showing possible transitions between power modes: Run mode, Low power run mode, Sleep mode, Stop 0 mode, Stop 1 mode, Stop 2 mode, Standby mode, Shutdown mode, and Low power sleep mode.
graph TD
    Run[Run mode] <--> LPR[Low power run mode]
    Run <--> S[Sleep mode]
    Run <--> S1[Stop 1 mode]
    Run <--> S0[Stop 0 mode]
    Run <--> S2[Stop 2 mode]
    Run <--> Standby[Standby mode]
    Run <--> Shutdown[Shutdown mode]
    LPR <--> S
    LPR <--> S1
    LPR <--> S0
    LPR <--> S2
    LPR <--> Standby
    LPR <--> Shutdown
    LPR <--> LPS[Low power sleep mode]
    S <--> S1
    S <--> S0
    S <--> S2
    S <--> Standby
    S <--> Shutdown
    S1 <--> S0
    S1 <--> S2
    S1 <--> Standby
    S1 <--> Shutdown
    S0 <--> S2
    S0 <--> Standby
    S0 <--> Shutdown
    S2 <--> Standby
    S2 <--> Shutdown
    Standby <--> Shutdown
  

Diagram illustrating the possible transitions between power modes. The central mode is Run mode, which has bidirectional transitions to Low power run mode, Sleep mode, Stop 1 mode, Stop 0 mode, Stop 2 mode, Standby mode, and Shutdown mode. Low power run mode has bidirectional transitions to Low power sleep mode, Sleep mode, Stop 1 mode, Stop 0 mode, Stop 2 mode, Standby mode, and Shutdown mode. Sleep mode has bidirectional transitions to Stop 1 mode, Stop 0 mode, Stop 2 mode, Standby mode, and Shutdown mode. Stop 1 mode has bidirectional transitions to Stop 0 mode, Stop 2 mode, Standby mode, and Shutdown mode. Stop 0 mode has bidirectional transitions to Stop 2 mode, Standby mode, and Shutdown mode. Stop 2 mode has bidirectional transitions to Standby mode and Shutdown mode. Standby mode has a bidirectional transition to Shutdown mode.

Diagram showing possible transitions between power modes: Run mode, Low power run mode, Sleep mode, Stop 0 mode, Stop 1 mode, Stop 2 mode, Standby mode, Shutdown mode, and Low power sleep mode.

MS33361V2

Peripheral clock gating

In Run mode, the HCLK and PCLK for individual peripherals and memories can be stopped at any time to reduce the power consumption.

To further reduce the power consumption in Sleep and Stop modes, the peripheral clocks can be disabled prior to executing the WFI or WFE instructions.

The peripheral clock gating is controlled by the RCC_AHBxENR and RCC_APBxENR registers.

Disabling the peripherals clocks in Sleep and Stop modes can be performed automatically by resetting the corresponding bit in the RCC_AHBxSMENR and RCC_APBxSMENR registers.

Debug mode

By default, the debug connection is lost if the application puts the MCU in Stop 0, Stop 1, Stop 2, Standby or Shutdown mode while the debug features are used. This is due to the fact that the Cortex®-M0+ core is no longer clocked.

However, by setting some configuration bits in the DBGMCU_CR register, the software can be debugged even when using the low-power modes extensively. For more details, refer to Section 38.2.6: Debug in low-power modes .

Table 21. Low-power mode summary

Mode nameEntryWake-up source (1)Wake-up system clockEffect on clocksVoltage regulators
MRLPR
Sleep
(Sleep-now or
Sleep-on-exit)
WFI or Return
from ISR
Any interruptSame as before
entering Sleep
mode
CPU clock OFF
no effect on other clocks
or analog clock sources
ONON
WFEWake-up event
Low-power
run
Set LPR bitClear LPR bitSame as Low-
power run clock
NoneOFFON
Low-power
sleep
Set LPR bit +
WFI or Return
from ISR
Any interruptSame as before
entering Low-
power sleep
mode
CPU clock OFF
no effect on other clocks
or analog clock sources
OFFON
Set LPR bit +
WFE
Wake-up eventOFFON
Stop 0LPMS="000" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
Any EXTI line
(configured in the
EXTI registers)
Specific
peripherals
events
HSI16 when
STOPWUCK=1 in
RCC_CFGR
MSI with the
frequency before
entering the Stop
mode when
STOPWUCK=0.
All clocks OFF except
LSI and LSE
ONON
Stop 1LPMS="001" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
OFF
Stop 2LPMS="010" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
Standby with
SRAM2
LPMS="011"+
Set RRS bit +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
external reset on
NRST pin,
IWDG reset
MSI from 1 MHz
up to 8 MHz
OFFOFF
StandbyLPMS="011" +
Clear RRS bit +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
external reset on
NRST pin,
IWDG reset
ShutdownLPMS="1--" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
external reset on
NRST pin
MSI 4 MHzAll clocks OFF except
LSE
OFFOFF

1. Refer to Table 22: Functionalities depending on the working mode .

Table 22. Functionalities depending on the working mode

Legend: Y = Yes (Enable). O = Optional (Disable by default. Can be enabled by software). - = Not available

PeripheralRunSleepLow-power runLow-power sleepStop 0/1Stop 2StandbyShutdownVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
CPUY-Y----------
Flash memoryO (1)O (1)O (1)O (1)---------
SRAM1YY (2)YY (2)Y-Y------
SRAM2YY (2)YY (2)Y-Y-O (3)----
Backup RegistersYYYYY-Y-Y-Y-Y
Brown-out reset (BOR)YYYYYYYYYY---
Programmable Voltage Detector (PVD)OOOOOOOO-----
Peripheral Voltage Monitor (PVMx; x = 1,3,4)OOOOOOOO-----
DMA and DMAMUXOOOO---------
Oscillator HSI16OOOO(4)-(4)------
Oscillator HSI48OO-----------
High Speed External (HSE)OOOO---------
Low Speed Internal (LSI)OOOOO-O-O----
Low Speed External (LSE)OOOOO-O-O-O-O
Multi-Speed Internal (MSI)OOOO---------
Clock Security System (CSS)OOOO---------
Clock Security System on LSEOOOOOOOOOO---
RTC / Auto wake-upOOOOOOOOOOOOO
Number of RTC Tamper pins55555O5O5O5O5
USARTx (x = 1, 2)OOOOO (5)O (5)-------
USARTx (x = 3, 4)OOOO---------
LPUARTx (x = 1)OOOOO (5)O (5)O (5)O (5)-----
Table 22. Functionalities depending on the working mode (continued)

Legend: Y = Yes (Enable). O = Optional (Disable by default. Can be enabled by software). - = Not available

PeripheralRunSleepLow-power runLow-power sleepStop 0/1Stop 2StandbyShutdownVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
LPUARTx (x = 2, 3)OOOOO (5)O (5)-------
I2Cx (x = 1)OOOOO (6)O (6)-------
I2Cx (x = 2, 4)OOOO---------
I2Cx (x = 3)OOOOO (6)O (6)O (6)O (6)-----
SPIx (x = 1, 2, 3)OOOO---------
ADC1OOOO---------
DAC1OOOOO--------
VREFBUFOOOOO--------
OPAMP1OOOOO--------
COMPx (x = 1, 2)OOOOOOOO-----
Temperature sensorOOOO---------
Timers (TIMx)OOOO---------
LPTIMx (x = 1, 2, 3)OOOOOOOO-----
Independent watchdog (IWDG)OOOOOOOOOO---
Window watchdog (WWDG)OOOO---------
SysTick timerOOOO---------
LCDOOOOOOOO-----
USBOO---O (7)-------
Touch sensing controller (TSC)OOOO---------
Random number generator (RNG)O (8)O (8)-----------
AES hardware acceleratorOOOO---------

Table 22. Functionalities depending on the working mode (continued)

Legend: Y = Yes (Enable). O = Optional (Disable by default. Can be enabled by software). - = Not available

PeripheralRunSleepLow-power runLow-power sleepStop 0/1Stop 2StandbyShutdownVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
CRC calculation unitOOOO---------
GPIOsOOOOOOOO(9) 5 pins (10)(11) up to 5 pins (10)-
  1. 1. The flash memory can be configured in power-down mode. By default, it is not in power-down mode.
  2. 2. The SRAM clock can be gated on or off.
  3. 3. SRAM2 content is preserved when the bit RRS is set in PWR_CR3 register.
  4. 4. Some peripherals with wake-up from Stop capability can request HSI16 to be enabled. In this case, HSI16 is woken up by the peripheral, and only feeds the peripheral which requested it. HSI16 is automatically put off when the peripheral does not need it anymore.
  5. 5. UART and LPUART reception is functional in Stop mode, and generates a wake-up interrupt on Start, address match or received frame event.
  6. 6. I2C address detection is functional in Stop mode, and generates a wake-up interrupt in case of address match.
  7. 7. USB bus state monitoring is functional in Stop mode. It generates a wake-up interrupt upon resume from USB suspend.
  8. 8. Voltage scaling Range 1 only.
  9. 9. I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.
  10. 10. I/Os with wake-up from Standby/Shutdown capability are the following: PA0, PC13, PE6, PA2, PC5.
  11. 11. I/Os can be configured with internal pull-up, pull-down or floating in Shutdown mode but the configuration is lost when exiting the Shutdown mode.

4.3.1 Run mode

Slowing down system clocks

In Run mode, the speed of the system clocks (SYSCLK, HCLK, PCLK) can be reduced by programming the prescaler registers. These prescalers can also be used to slow down the peripherals before entering the Sleep mode.

For more details, refer to Section 5.4.3: Clock configuration register (RCC_CFGR) .

4.3.2 Low-power run mode (LP run)

To further reduce the consumption when the system is in Run mode, the regulator can be configured in low-power mode. In this mode, the system frequency should not exceed 2 MHz.

Please refer to the product datasheet for more details on voltage regulator and peripherals operating conditions.

I/O states in Low-power run mode

In Low-power run mode, all I/O pins keep the same state as in Run mode.

Entering the Low-power run mode

To enter the Low-power run mode, proceed as follows:

  1. 1. Optional: Jump into the SRAM and power-down the flash by setting the FPD_LPRUN bit in the Power control register 1 (PWR_CR1) .
  2. 2. Decrease the system clock frequency below 2 MHz.
  3. 3. Force the regulator in low-power mode by setting the LPR bit in the PWR_CR1 register.

Refer to Table 23: Low-power run on how to enter the Low-power run mode.

Exiting the Low-power run mode

To exit the Low-power run mode, proceed as follows:

  1. 1. Force the regulator in main mode by clearing the LPR bit in the PWR_CR1 register.
  2. 2. Wait until REGLPF bit is cleared in the PWR_SR2 register.
  3. 3. Increase the system clock frequency.

Refer to Table 23: Low-power run on how to exit the Low-power run mode.

Table 23. Low-power run

Low-power run modeDescription
Mode entryDecrease the system clock frequency below 2 MHz
LPR = 1
Mode exitLPR = 0
Wait until REGLPF = 0
Increase the system clock frequency
Wake-up latencyRegulator wake-up time from low-power mode

4.3.3 Low-power modes

Entering low-power mode

Low-power modes are entered by the MCU by executing the WFI (Wait For Interrupt), or WFE (Wait for Event) instructions, or when the SLEEPONEXIT bit in the Cortex®-M0+ System Control register is set on Return from ISR.

Entering Low-power mode through WFI or WFE is executed only if no interrupt is pending or no event is pending.

Exiting low-power mode

From Sleep modes, and Stop modes the MCU exit low-power mode depending on the way the low-power mode was entered:

by:

– NVIC IRQ interrupt.

- When SEVONPEND = 0 in the Cortex®-M0+ System Control register. By enabling an interrupt 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 wakes up and interrupt the MCU.

- When SEVONPEND = 1 in the Cortex®-M0+ System Control register.

By enabling an interrupt in the peripheral control register and optionally in the NVIC. When the MCU resumes from WFE, the peripheral interrupt pending bit and when enabled the NVIC peripheral IRQ channel pending bit (in the NVIC interrupt clear pending register) have to be cleared.

All NVIC interrupts wake up the MCU, even the disabled ones. Only enabled NVIC interrupts with sufficient priority wake up and interrupt the MCU.

– Event

Configuring a EXTI line 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 may be necessary to clear the interrupt flag in the peripheral.

The device exits Standby and Shutdown low-power modes upon an external reset (NRST pin), a rising or falling edge on one of enabled WKUPx pins, or upon an RTC or TAMP event. On top of these, it exits Standby mode also upon an IWDG reset (see Figure 300: RTC block diagram ).

After waking up from Standby or Shutdown mode, the program execution restarts in the same way as after a Reset (for example boot pin sampling, option bytes loading, reset vector is fetched).

4.3.4 Sleep mode

I/O states in Sleep mode

In Sleep mode, all I/O pins keep the same state as in Run mode.

Entering the Sleep mode

The Sleep mode is entered according Section : Entering low-power mode , when the SLEEPDEEP bit in the Cortex®-M0+ System Control register is clear.

Refer to Table 24: Sleep for details on how to enter the Sleep mode.

Exiting the Sleep mode

The Sleep mode is exit according Section : Exiting low-power mode .

Refer to Table 24: Sleep for more details on how to exit the Sleep mode.

Table 24. Sleep

Sleep-now modeDescription
Mode entry

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

  • – SLEEPDEEP = 0
  • – No interrupt (for WFI) or event (for WFE) is pending

Refer to the Cortex®-M0+ System Control register.

On return from ISR while:

  • – SLEEPDEEP = 0 and
  • – SLEEPONEXIT = 1
  • – No interrupt is pending

Refer to the Cortex®-M0+ System Control register.

Mode exit

If WFI or return from ISR was used for entry

Interrupt: refer to Table 55: Vector table

If WFE was used for entry and SEVONPEND = 0:

Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)

If WFE was used for entry and SEVONPEND = 1:

Interrupt even when disabled in NVIC: refer to Table 55: Vector table or

Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)

Wake-up latencyNone

4.3.5 Low-power sleep mode (LP sleep)

Please refer to the product datasheet for more details on voltage regulator and peripherals operating conditions.

I/O states in Low-power sleep mode

In Low-power sleep mode, all I/O pins keep the same state as in Run mode.

Entering the Low-power sleep mode

The Low-power sleep mode is entered from Low-power run mode according to Section : Entering low-power mode , when the SLEEPDEEP bit in the Cortex®-M0+ System Control register is clear.

Refer to Table 25: Low-power sleep for details on how to enter the Low-power sleep mode.

Exiting the Low-power sleep mode

The low-power Sleep mode is exit according to Section : Exiting low-power mode . When exiting the Low-power sleep mode by issuing an interrupt or an event, the MCU is in Low-power run mode.

Refer to Table 25: Low-power sleep for details on how to exit the Low-power sleep mode.

Table 25. Low-power sleep

Low-power sleep-now modeDescription
Low-power sleep mode is entered from the Low-power run mode.
WFI (Wait for Interrupt) or WFE (Wait for Event) while:
– SLEEPDEEP = 0
– No interrupt (for WFI) or event (for WFE) is pending
Refer to the Cortex®-M0+ System Control register.
Mode entryLow-power sleep mode is entered from the Low-power run mode.
On return from ISR while:
– SLEEPDEEP = 0 and
– SLEEPONEXIT = 1
– No interrupt is pending
Refer to the Cortex®-M0+ System Control register.
Mode exitIf WFI or Return from ISR was used for entry
Interrupt: refer to Table 55: Vector table
If WFE was used for entry and SEVONPEND = 0:
Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)
If WFE was used for entry and SEVONPEND = 1:
Interrupt even when disabled in NVIC: refer to Table 55: Vector table
Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)
After exiting the Low-power sleep mode, the MCU is in Low-power run mode.
Wake-up latencyNone

4.3.6 Stop 0 mode

The Stop 0 mode is based on the Cortex®-M0+ deepsleep mode combined with the peripheral clock gating. The voltage regulator is configured in main regulator mode. In Stop 0 mode, all clocks in the V CORE domain are stopped; the PLL, the MSI, the HSI16 and the HSE oscillators are disabled. Some peripherals with the wake-up capability (I2Cx (x=1,2,3), U(S)ARTx(x=1,2,3) and LPUART) can switch on the HSI16 to receive a frame, and switch off the HSI16 after receiving the frame if it is not a wake-up frame. In this case, the HSI16 clock is propagated only to the peripheral requesting it.

SRAM1, SRAM2 and register contents are preserved.

The BOR is always available in Stop 0 mode. The consumption is increased when thresholds higher than V BOR0 are used.

I/O states in Stop 0 mode

In the Stop 0 mode, all I/O pins keep the same state as in the Run mode.

Entering the Stop 0 mode

The Stop 0 mode is entered according Section : Entering low-power mode , when the SLEEPDEEP bit in the Cortex®-M0+ System Control register is set.

Refer to Table 26: Stop 0 mode for details on how to enter the Stop 0 mode.

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

If an access to the APB domain is ongoing, The Stop 0 mode entry is delayed until the APB access is finished.

In Stop 0 mode, the following features can be selected by programming individual control bits:

Several peripherals can be used in Stop 0 mode and can add consumption if they are enabled and clocked by LSI or LSE, or when they request the HSI16 clock: LCD, LPTIM1, LPTIM2, I2Cx (x=1,2,3,4) U(S)ARTx(x=1,2,3,4), LPUART.

The DACx (x=1,2), the OPAMP and the comparators can be used in Stop 0 mode, the PVMx (x=1,3,4) and the PVD as well. If they are not needed, they must be disabled by software to save their power consumptions.

The ADCx (x=1), temperature sensor and VREFBUF buffer can consume power during the Stop 0 mode, unless they are disabled before entering this mode.

Exiting the Stop 0 mode

The Stop 0 mode is exit according Section : Entering low-power mode .

Refer to Table 26: Stop 0 mode for details on how to exit Stop 0 mode.

When exiting Stop 0 mode by issuing an interrupt or a wake-up event, the HSI16 oscillator is selected as system clock if the bit STOPWUCK is set in Clock configuration register (RCC_CFGR) . The MSI oscillator is selected as system clock if the bit STOPWUCK is cleared. The wake-up time is shorter when HSI16 is selected as wake-up system clock. The MSI selection allows wake-up at higher frequency, up to 48 MHz.

When exiting the Stop 0 mode, the MCU is either in Run mode Range 1 or Run Mode Range 2 depending on VOS bit in PWR_CR1.

Table 26. Stop 0 mode

Stop 0 modeDescription
Mode entry

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

  • – SLEEPDEEP bit is set in Cortex®-M0+ System Control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = “000” in PWR_CR1

On Return from ISR while:

  • – SLEEPDEEP bit is set in Cortex®-M0+ System Control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “000” in PWR_CR1

Note: To enter Stop 0 mode, all EXTI Line pending bits (in EXTI rising edge pending register 1 (EXTI_RPR1) and EXTI falling edge pending register 1 (EXTI_FPR1)), and the peripheral flags generating wake-up interrupts must be cleared. Otherwise, the Stop 0 mode entry procedure is ignored and program execution continues.

Mode exit

If WFI or Return from ISR was used for entry

Any EXTI Line configured in Interrupt mode (the corresponding EXTI Interrupt vector must be enabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 55: Vector table

If WFE was used for entry and SEVONPEND = 0:

Any EXTI Line configured in event mode. Refer to Section 11: Nested vectored interrupt controller (NVIC) .

If WFE was used for entry and SEVONPEND = 1:

Any EXTI Line configured in Interrupt mode (even if the corresponding EXTI Interrupt vector is disabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 55: Vector table .

Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)

Wake-up latencyLongest wake-up time between: MSI or HSI16 wake-up time and flash wake-up time from Stop 0 mode.

4.3.7 Stop 1 mode

The Stop 1 mode is the same as Stop 0 mode except that the main regulator is OFF, and only the low-power regulator is ON. Stop 1 mode can be entered from Run mode and from Low-power run mode.

Refer to Table 27: Stop 1 mode for details on how to enter and exit Stop 1 mode.

Table 27. Stop 1 mode

Stop 1 modeDescription
Mode entry

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

  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = “001” in PWR_CR1

On Return from ISR while:

  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “001” in PWR_CR1

Note: To enter Stop 1 mode, all EXTI Line pending bits (in EXTI rising edge pending register 1 (EXTI_RPR1) and EXTI falling edge pending register 1 (EXTI_FPR1)), and the peripheral flags generating wake-up interrupts must be cleared. Otherwise, the Stop 1 mode entry procedure is ignored and program execution continues.

Mode exit

If WFI or Return from ISR was used for entry

Any EXTI Line configured in Interrupt mode (the corresponding EXTI Interrupt vector must be enabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 55: Vector table .

If WFE was used for entry and SEVONPEND = 0:

Any EXTI Line configured in event mode. Refer to Section 11: Nested vectored interrupt controller (NVIC) .

If WFE was used for entry and SEVONPEND = 1:

Any EXTI Line configured in Interrupt mode (even if the corresponding EXTI Interrupt vector is disabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 55: Vector table

Wake-up event: refer to Section 11: Nested vectored interrupt controller (NVIC)

Wake-up latencyLongest wake-up time between: MSI or HSI16 wake-up time and regulator wake-up time from Low-power mode + flash wake-up time from Stop 1 mode.

4.3.8 Stop 2 mode

The Stop 2 mode is based on the Cortex ® -M0+ deepsleep mode combined with peripheral clock gating. In Stop 2 mode, all clocks in the V CORE domain are stopped, the PLL, the MSI, the HSI16 and the HSE oscillators are disabled. Some peripherals with wake-up capability (I2C3 and LPUART) can switch on the HSI16 to receive a frame, and switch off the HSI16 after receiving the frame if it is not a wake-up frame. In this case the HSI16 clock is propagated only to the peripheral requesting it.

SRAM1, SRAM2 and register contents are preserved.

The BOR is always available in Stop 2 mode. The consumption is increased when thresholds higher than V BOR0 are used.

Note: The comparators outputs, the LPUART outputs and the LPTIM1 outputs are forced to low speed (OSPEEDy=00) during the Stop 2 mode.

I/O states in Stop 2 mode

In the Stop 2 mode, all I/O pins keep the same state as in the Run mode.

Entering Stop 2 mode

The Stop 2 mode is entered according Section : Entering low-power mode , when the SLEEPDEEP bit in the Cortex ® -M0+ System Control register is set.

Refer to Table 28: Stop 2 mode for details on how to enter the Stop 2 mode.

Stop 2 mode can only be entered from Run mode. It is not possible to enter Stop 2 mode from the Low-power run mode.

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

If an access to the APB domain is ongoing, The Stop 2 mode entry is delayed until the APB access is finished.

In Stop 2 mode, the following features can be selected by programming individual control bits:

Several peripherals can be used in Stop 2 mode and can add consumption if they are enabled and clocked by LSI or LSE, or when they request the HSI16 clock: LCD, LPTIM1, I2C3, LPUART.

The comparators can be used in Stop 2 mode, the PWMx (x=1,3,4) and the PVD as well. If they are not needed, they must be disabled by software to save their power consumptions.

The ADCx, OPAMPx, DACx, temperature sensor and VREFBUF buffer can consume power during Stop 2 mode, unless they are disabled before entering this mode.

All the peripherals which cannot be enabled in Stop 2 mode must be either disabled by clearing the Enable bit in the peripheral itself, or put under reset state by setting the corresponding bit in the AHB peripheral reset register (RCC_AHBRSTR) , APB peripheral reset register 1 (RCC_APBSTR1) , and APB peripheral reset register 2 (RCC_APBSTR2) .

Exiting Stop 2 mode

The Stop 2 mode is exit according Section : Exiting low-power mode .

Refer to Table 28: Stop 2 mode for details on how to exit Stop 2 mode.

When exiting Stop 2 mode by issuing an interrupt or a wake-up event, the HSI16 oscillator is selected as system clock if the bit STOPWUCK is set in Clock configuration register (RCC_CFGR) . The MSI oscillator is selected as system clock if the bit STOPWUCK is cleared. The wake-up time is shorter when HSI16 is selected as wake-up system clock. The MSI selection allows wake-up at higher frequency, up to 48 MHz.

When exiting the Stop 2 mode, the MCU is in Run mode (Range 1 or Range 2 depending on VOS bit in PWR_CR1).

Table 28. Stop 2 mode

Stop 2 modeDescription
Mode entry

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

  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = “010” in PWR_CR1

On return from ISR while:

  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “010” in PWR_CR1

Note: To enter Stop 2 mode, all EXTI Line pending bits (in EXTI rising edge pending register 1 (EXTI_RPR1) and EXTI falling edge pending register 1 (EXTI_FPR1)), and the peripheral flags generating wake-up interrupts must be cleared. Otherwise, the Stop mode entry procedure is ignored and program execution continues.

Mode exit

If WFI or Return from ISR was used for entry:

Any EXTI Line configured in Interrupt mode (the corresponding EXTI Interrupt vector must be enabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to .

If WFE was used for entry and SEVONPEND = 0:

Any EXTI Line configured in event mode. Refer to Section 12.3.2: EXTI direct event input wake-up .

If WFE was used for entry and SEVONPEND = 1:

Any EXTI Line configured in Interrupt mode (even if the corresponding EXTI Interrupt vector is disabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 55: Vector table

Any EXTI Line configured in event mode. Refer to Section 12.3.2: EXTI direct event input wake-up .

Wake-up latencyLongest wake-up time between: MSI or HSI16 wake-up time and regulator wake-up time from Low-power mode + flash wake-up time from Stop 2 mode.

4.3.9 Standby mode

The Standby mode allows to achieve the lowest power consumption with BOR. It is based on the Cortex ® -M0+ deepsleep mode, with the voltage regulators disabled (except when SRAM2 content is preserved). The PLL, the HSI16, the MSI and the HSE oscillators are also switched off.

SRAM1 and register contents are lost except for registers in the Backup domain and Standby circuitry (see Figure 6 ). SRAM2 content can be preserved if the bit RRS is set in the PWR_CR3 register. In this case the Low-power regulator is ON and provides the supply to SRAM2 only.

The BOR is always available in Standby mode. The consumption is increased when thresholds higher than \( V_{BOR0} \) are used.

I/O states in Standby mode

In the Standby mode, the I/Os are by default in floating state. If the APC bit of PWR_CR3 register has been set, the I/Os can be configured either with a pull-up (refer to PWR_PUCRx registers ( \( x = A,B,C,D,E,F \) )), or with a pull-down (refer to PWR_PDCRx registers ( \( x = A,B,C,D,E,F \) )), or can be kept in analog state if none of the PWR_PUCRx or PWR_PDCRx register has been set. The pull-down configuration has highest priority over pull-up configuration in case both PWR_PUCRx and PWR_PDCRx are set for the same I/O.

Some I/Os (listed in Section 7.3.1: General-purpose I/O (GPIO) ) are used for SW debug. They can only be configured to their respective reset pull-up or pull-down state during Standby mode by setting their respective bit in the PWR_PUCRx or PWR_PDCRx registers, or are configured to floating state if the bit is kept cleared.

The RTC outputs on PC13 are functional in Standby mode. PC14 and PC15 used for LSE are also functional. Five wake-up pins (WKUPx, \( x=1,2\dots5 \) ) and the 3 RTC tampers are available.

Entering Standby mode

The Standby mode is entered according to Section : Entering low-power mode , when the SLEEPDEEP bit in the Cortex ® -M0+ System Control register is set.

Refer to Table 29: Standby mode for details on how to enter Standby mode.

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

Exiting Standby mode

The Standby mode is exited according to Section : Entering low-power mode . The SBF status flag in the Power status register 1 (PWR_SR1) indicates that the MCU was in Standby mode. All registers are reset after wake-up from Standby except for Power control register 3 (PWR_CR3) .

Refer to Table 29: Standby mode for more details on how to exit Standby mode.

When exiting Standby mode, I/Os that were configured with pull-up or pull-down during Standby through the PWR_PUCRx or PWR_PDCRx registers keep this configuration upon exiting Standby mode until the bit APC of PWR_CR3 register has been cleared. Once the bit APC is cleared, they are either configured to their reset values or to the pull-up/pull-down state according the GPIOx_PUPDR registers. The content of the PWR_PUCRx or PWR_PDCRx registers however is not lost and can be re-used for a sub-sequent entering into Standby mode.

Some I/Os (listed in Section 7.3.1: General-purpose I/O (GPIO) ) are used for SW debug, and have internal pull-up or pull-down activated after reset, so are configured at this reset value as well when exiting Standby mode.

For I/Os with a pull-up or pull-down pre-defined after reset (some SW I/Os) or with GPIOx_PUPDR programming done after exiting from Standby, when this programming is different from the PWR_PUCRx or PWR_PDCRx programmed value during Standby, both a pull-down and pull-up is applied until the bit APC is cleared, releasing the PWR_PUCRx or PWR_PDCRx programmed value.

Table 29. Standby mode

Standby modeDescription
Mode entryWFI (Wait for Interrupt) or WFE (Wait for Event) while:
  • – SLEEPDEEP bit is set in Cortex®-M0+ System Control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = “011” in PWR_CR1
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
On return from ISR while:
  • – SLEEPDEEP bit is set in Cortex®-M0+ System Control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “011” in PWR_CR1 and
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
  • – The RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, tamper or timestamp flags) is cleared
Mode exitWKUPx pin edge, RTC event, TAMP event, external Reset on NRST pin, IWDG Reset, BOR reset
Wake-up latencyReset phase

4.3.10 Shutdown mode

The Shutdown mode allows to achieve the lowest power consumption. It is based on the deepsleep mode, with the voltage regulator disabled. The \( V_{CORE} \) domain is consequently powered off. The PLL, the HSI16, the MSI, the LSI and the HSE oscillators are also switched off.

SRAM1, SRAM2 and register contents are lost except for registers in the Backup domain. The BOR is not available in Shutdown mode. No power voltage monitoring is possible in this mode, therefore the switch to Backup domain is not supported.

I/O states in Shutdown mode

In the Shutdown mode, I/Os are by default in floating state. If the APC bit of PWR_CR3 register has been set, the I/Os can be configured either with a pull-up (refer to PWR_PUCRx registers ( \( x = A, B, C, D, E, F \) ), or with a pull-down (refer to PWR_PDCRx registers ( \( x = A, B, C, D, E, F \) )), or can be kept in analog state if none of the PWR_PUCRx or PWR_PDCRx register has been set. The pull-down configuration has highest priority over pull-up configuration in case both PWR_PUCRx and PWR_PDCRx are set for the same I/O. However this configuration is lost when exiting the Shutdown mode due to the power-on reset.

Some I/Os (listed in Section 7.3.1: General-purpose I/O (GPIO) ) are used for SW debug. They can only be configured to their respective reset pull-up or pull-down state during Standby mode by setting their respective bit in the PWR_PUCRx or PWR_PDCRx registers, or configured to floating state if the bit is kept cleared.

The RTC outputs on PC13 are functional in Shutdown mode. PC14 and PC15 used for LSE are also functional. Up to six wake-up pins (WKUPx, \( x = 1, 2 \dots 5 \) ) and the 3 RTC tampers are available.

Entering Shutdown mode

The Shutdown mode is entered according to Entering low-power mode , when the SLEEPDEEP bit in the Cortex ® -M0+ System Control register is set.

Refer to Table 30: Shutdown mode for details on how to enter Shutdown mode.

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

Exiting Shutdown mode

The Shutdown mode is exited according to Section : Exiting low-power mode . A power-on reset occurs when exiting from Shutdown mode. All registers (except for the ones in the Backup domain) are reset after wake-up from Shutdown.

Refer to Table 30: Shutdown mode for more details on how to exit Shutdown mode.

When exiting Shutdown mode, the I/Os that were configured with pull-up or pull-down during Shutdown through the PWR_PUCRx or PWR_PDCRx registers lose their

configuration and are configured in floating state or to their pull-up pull-down reset value (for some I/Os listed in Section 7.3.1: General-purpose I/O (GPIO) ).

The WUFX bits of the PWR_SR1 register are cleared by a power-on reset during Shutdown mode exit. They are set only when the related wake-up signal is longer than the release of the power-on reset signal.

Table 30. Shutdown mode

Shutdown modeDescription
Mode entryWFI (Wait for Interrupt) or WFE (Wait for Event) while:
  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = “1XX” in PWR_CR1
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
On return from ISR while:
  • – SLEEPDEEP bit is set in Cortex ® -M0+ System Control register
  • – SLEEPONEXT = 1
  • – No interrupt is pending
  • – LPMS = “1XX” in PWR_CR1 and
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
  • – The RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, tamper or timestamp flags) is cleared
Mode exitWKUPx pin edge, RTC event, TAMP event, external Reset on NRST pin
Wake-up latencyReset phase

4.3.11 Auto-wakeup from low-power mode

The RTC can be used to wake up the MCU from low-power mode without depending on an external interrupt (Auto-wakeup mode). The RTC provides a programmable time base for waking up from Stop (0, 1 or 2) or Standby mode at regular intervals. For this purpose, two of the three alternative RTC clock sources can be selected by programming the RTCSEL[1:0] bits in the RTC domain control register (RCC_BDCR) :

To wake up from Stop mode with an RTC alarm event, it is necessary to:

To wake up from Standby mode, there is no need to configure the EXTI Line 18.

To wake up from Stop mode with an RTC wake-up event, it is necessary to:

To wake up from Standby mode, there is no need to configure the EXTI Line 20.

The LCD Start of frame interrupt can also be used as a periodic wake-up from Stop (0, 1 or 2) mode. The LCD is not available in Standby mode.

The LCD clock is derived from the RTC clock selected by RTCSEL[1:0].

4.4 PWR registers

The peripheral registers can be accessed by half-words (16-bit) or words (32-bit).

4.4.1 Power control register 1 (PWR_CR1)

Address offset: 0x00

Reset value: 0x0000 0208

This register is reset after wake-up from Standby mode.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.LPRRes.Res.Res.VOS[1:0]DBPRes.Res.FPD_L
PSLP
FPD_L
PRUN
FPD
STOP
LPMS[2:0]
rwrwrwrwrwrwrwrwrwrw

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

Bit 14 LPR : Low-power run

When this bit is set, the regulator is switched from main mode (MR) to low-power mode (LPR).

Note: Stop 2 mode cannot be entered when LPR bit is set. Stop 1 is entered instead.

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

Bits 10:9 VOS[1:0] : Voltage scaling range selection

00: Cannot be written (forbidden by hardware)

01: Range 1

10: Range 2

11: Cannot be written (forbidden by hardware)

Bit 8 DBP : Disable backup domain write protection

In reset state, the RTC and backup registers are protected against parasitic write access. This bit must be set to enable write access to these registers.

0: Access to RTC and Backup registers disabled

1: Access to RTC and Backup registers enabled

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

Bit 5 FPD_LPSLP : Flash memory powered down during Low-power sleep mode.

This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power sleep mode.

0: Flash memory idle

1: Flash memory powered down

Bit 4 FPD_LPRUN : Flash memory powered down during Low-power run mode.

This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Low-power run mode.

0: Flash memory idle

1: Flash memory powered down

Bit 3 FPD_STOP : Flash memory powered down during Stop mode.

This bit determines whether the flash memory is put in power-down mode or remains in idle mode when the device enters Stop mode.

0: Flash memory idle

1: Flash memory powered down

Bits 2:0 LPMS[2:0] : Low-power mode selection

These bits select the low-power mode entered when CPU enters the deepsleep mode.

000: Stop 0 mode

001: Stop 1 mode

010: Stop 2 mode

011: Standby mode

1xx: Shutdown mode

Note: If LPR bit is set, Stop 2 mode cannot be selected and Stop 1 mode shall be entered instead of Stop 2.

In Standby mode, SRAM2 can be preserved or not, depending on RRS bit configuration in PWR_CR3.

4.4.2 Power control register 2 (PWR_CR2)

Address offset: 0x04

Reset value: 0x0000 0000

This register is reset when exiting the 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.USVRes.Res.Res.PVME4PVME3PVME1PLS[2:0]PVDE
rwrwrwrwrwrwrwrw

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

Bit 10 USV : V DDUSB USB supply valid

This bit is used to validate the V DDUSB supply for electrical and logical isolation purpose.

Setting this bit is mandatory to use the USB FS peripheral. If V DDUSB is not always present in the application, the PVM can be used to determine whether this supply is ready or not.

0: V DDUSB is not present. Logical and electrical isolation is applied to ignore this supply.

1: V DDUSB is valid.

Note: This bit is available only on the STM32U0x3xx devices.

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

Bit 6 PVME4 : Peripheral voltage monitoring 4 enable: \( V_{DDA} \) vs. 1.86 V

0: PVM4 ( \( V_{DDA} \) monitoring vs. 1.86 V threshold) disable.

1: PVM4 ( \( V_{DDA} \) monitoring vs. 1.86 V threshold) enable.

Bit 5 PVME3 : Peripheral voltage monitoring 3 enable: \( V_{DDA} \) vs. 1.62 V

0: PVM3 ( \( V_{DDA} \) monitoring vs. 1.62 V threshold) disable.

1: PVM3 ( \( V_{DDA} \) monitoring vs. 1.62 V threshold) enable.

Bit 4 PVME1 : Peripheral voltage monitoring 1 enable: \( V_{DDUSB} \) vs. 1.2 V

0: PVM1 ( \( V_{DDUSB} \) monitoring vs. 1.2 V threshold) disable.

1: PVM1 ( \( V_{DDUSB} \) monitoring vs. 1.2 V threshold) enable.

Note: This bit is available only on the STM32U0x3xx devices.

Bits 3:1 PLS[2:0] : Programmable voltage detector level selection.

These bits select the voltage threshold detected by the programmable voltage detector:

000: \( V_{PVD0} \) around 2.0 V

001: \( V_{PVD1} \) around 2.2 V

010: \( V_{PVD2} \) around 2.4 V

011: \( V_{PVD3} \) around 2.5 V

100: \( V_{PVD4} \) around 2.6 V

101: \( V_{PVD5} \) around 2.8 V

110: \( V_{PVD6} \) around 2.9 V

111: External input analog voltage PVD_IN (compared internally to VREFINT)

Note: These bits are write-protected when the bit PVDL (PVD Lock) is set in the SYSCFG_CBR register.

These bits are reset only by a system reset.

Bit 0 PVDE : Programmable voltage detector enable

0: Programmable voltage detector disable.

1: Programmable voltage detector enable.

Note: This bit is write-protected when the bit PVDL (PVD Lock) is set in the SYSCFG_CBR register.

This bit is reset only by a system reset.

4.4.3 Power control register 3 (PWR_CR3)

Address offset: 0x08

Reset value: 0x0000 8000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWR_RST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
EIWULRes.Res.Res.Res.APCENULPRRSRes.EWUP 7Res.EWUP 5EWUP 4EWUP 3EWUP 2EWUP 1
rwrwrwrwrwrwrwrwrwrw

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

Bit 15 EIWUL : Enable internal wake-up line

0: Internal wake-up line disable.

1: Internal wake-up line enable.

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

Bit 10 APC : Apply pull-up and pull-down configuration

When this bit is set, the I/O pull-up and pull-down configurations defined in the PWR_PUCRx and PWR_PDCRx registers are applied. When this bit is cleared, the PWR_PUCRx and PWR_PDCRx registers are not applied to the I/Os, instead the I/Os are in floating mode during Standby or configured according GPIO controller GPIOx_PUPDR register during RUN mode.

Bit 9 ENULP : Enable ULP sampling

When this bit is set, the BORL, BORH and PVD are periodically sampled instead continuous monitoring to reduce power consumption. Fast supply drop between two sample/compare phases is not detected in this mode. This bit has impact only on Stop 2 and Standby low-power modes.

Bit 8 RRS : SRAM2 retention in Standby mode

0: SRAM2 is powered off in Standby mode (SRAM2 content is lost).

1: SRAM2 is powered by the low-power regulator in Standby mode (SRAM2 content is kept).

Bit 7 Reserved, must be kept at reset value.

Bit 6 EWUP7 : Enable Wake-up pin WKUP7.

When this bit is set, the external wake-up pin WKUP7 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP7 bit in the PWR_CR4 register.

Bit 5 Reserved, must be kept at reset value.

Bit 4 EWUP5 : Enable Wake-up pin WKUP5

When this bit is set, the external wake-up pin WKUP5 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP5 bit in the PWR_CR4 register.

Bit 3 EWUP4 : Enable Wake-up pin WKUP4

When this bit is set, the external wake-up pin WKUP4 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP4 bit in the PWR_CR4 register.

Bit 2 EWUP3 : Enable Wake-up pin WKUP3

When this bit is set, the external wake-up pin WKUP3 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP3 bit in the PWR_CR4 register.

Bit 1 EWUP2 : Enable Wake-up pin WKUP2

When this bit is set, the external wake-up pin WKUP2 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP2 bit in the PWR_CR4 register.

Bit 0 EWUP1 : Enable Wake-up pin WKUP1

When this bit is set, the external wake-up pin WKUP1 is enabled and triggers a wake-up from Standby or Shutdown event when a rising or a falling edge occurs. The active edge is configured via the WP1 bit in the PWR_CR4 register.

4.4.4 Power control register 4 (PWR_CR4)

Address offset: 0x0C

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.VBRVBERes.WP7Res.WP5WP4WP3WP2WP1
rwrwrwrwrwrwrwrw

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

Bit 9 VBR : V BAT battery charging resistor selection

Bit 8 VBE : V BAT battery charging enable

Bit 7 Reserved, must be kept at reset value.

Bit 6 WP7 : Wake-up pin WKUP7 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP7

Bit 5 Reserved, must be kept at reset value.

Bit 4 WP5 : Wake-up pin WKUP5 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP5

Bit 3 WP4 : Wake-up pin WKUP4 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP4

Bit 2 WP3 : Wake-up pin WKUP3 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP3

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

Bit 1 WP2 : Wake-up pin WKUP2 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP2

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

Bit 0 WP1 : Wake-up pin WKUP1 polarity

This bit defines the polarity used for an event detection on external wake-up pin, WKUP1

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

4.4.5 Power status register 1 (PWR_SR1)

Address offset: 0x10

Reset value: 0x0000 0000

This register is neither reset when exiting Standby mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: 2 additional APB cycles are needed to read this register vs. a standard APB read.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
WUFIRes.Res.Res.STOPF[2:0]SBFRes.WUF7Res.WUF5WUF4WUF3WUF2WUF1
rrrrrrrrrrr

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

Bit 15 WUFI : Wake-up flag internal

This bit is set when a wake-up is detected on the internal wake-up line. It is cleared when all internal wake-up sources are cleared.

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

Bits 11:9 STOPF[2:0] : Stop Flags

These bits are set by hardware when the device enters any stop mode and are cleared by setting the CSBF bit in the PWR_SCR register, or by a power-on reset. It is not cleared by the system reset.

000: The device did not enter any Stop mode.

100: The device entered in Stop 0 mode.

101: The device entered in Stop 1 mode.

110: The device entered in Stop 2 mode.

Bit 8 SBF : Standby flag

This bit is set by hardware when the device enters the Standby mode and is cleared by setting the CSBF bit in the PWR_SCR register, or by a power-on reset. It is not cleared by the system reset.

0: The device did not enter the Standby mode

1: The device entered the Standby mode

Bit 7 Reserved, must be kept at reset value.

Bit 6 WUF7 : Wake-up flag 7

This bit is set when a wake-up event is detected on wake-up pin, WKUP7. It is cleared by writing '1' in the CWUF7 bit of the PWR_SCR register.

Bit 5 Reserved, must be kept at reset value.

Bit 4 WUF5 : Wake-up flag 5

This bit is set when a wake-up event is detected on wake-up pin, WKUP5. It is cleared by writing '1' in the CWUF5 bit of the PWR_SCR register.

Bit 3 WUF4 : Wake-up flag 4

This bit is set when a wake-up event is detected on wake-up pin, WKUP4. It is cleared by writing '1' in the CWUF4 bit of the PWR_SCR register.

Bit 2 WUF3 : Wake-up flag 3

This bit is set when a wake-up event is detected on wake-up pin, WKUP3. It is cleared by writing '1' in the CWUF3 bit of the PWR_SCR register.

Bit 1 WUF2 : Wake-up flag 2

This bit is set when a wake-up event is detected on wake-up pin, WKUP2. It is cleared by writing '1' in the CWUF2 bit of the PWR_SCR register.

Bit 0 WUF1 : Wake-up flag 1

This bit is set when a wake-up event is detected on wake-up pin, WKUP1. It is cleared by writing '1' in the CWUF1 bit of the PWR_SCR register.

4.4.6 Power status register 2 (PWR_SR2)

Address offset: 0x14

Reset value: 0x0000 XXX0 ((the bits in this register reflect the actual status)

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PVMO4PVMO3Res.PVMO1PVDOVOSFREGLP
F
REGLP
S
FLASH
_RDY
Res.Res.Res.Res.Res.Res.Res.
rrrrrrrr

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

Bit 15 PVMO4 : Peripheral voltage monitoring output: \( V_{DDA} \) vs. 2.2 V

0: \( V_{DDA} \) voltage is above PWM4 threshold (around 2.2 V).

1: \( V_{DDA} \) voltage is below PWM4 threshold (around 2.2 V).

Note: PVMO4 is cleared when PWM4 is disabled (PVME4 = 0). After enabling PWM4, the PWM4 output is valid after the PWM4 wake-up time.

Bit 14 PVMO3 : Peripheral voltage monitoring output: \( V_{DDA} \) vs. 1.62 V

0: \( V_{DDA} \) voltage is above PWM3 threshold (around 1.62 V).

1: \( V_{DDA} \) voltage is below PWM3 threshold (around 1.62 V).

Note: PVMO3 is cleared when PWM3 is disabled (PVME3 = 0). After enabling PWM3, the PWM3 output is valid after the PWM3 wake-up time.

Bit 13 Reserved, must be kept at reset value.

Bit 12 PVMO1 : Peripheral voltage monitoring output: \( V_{DDUSB} \) vs. 1.2 V

0: \( V_{DDUSB} \) voltage is above PWM1 threshold (around 1.2 V).

1: \( V_{DDUSB} \) voltage is below PWM1 threshold (around 1.2 V).

Note: PVMO1 is cleared when PWM1 is disabled (PVME1 = 0). After enabling PWM1, the PWM1 output is valid after the PWM1 wake-up time.

This bit is available only on the STM32U0x3xx devices.

Bit 11 PVDO : Programmable voltage detector output

0: \( V_{DD} \) is above the selected PVD threshold

1: \( V_{DD} \) is below the selected PVD threshold

Bit 10 VOSF : Voltage scaling flag

A delay is required for the internal regulator to be ready after the voltage scaling has been changed. VOSF indicates that the regulator reached the voltage level defined with VOS bits of the PWR_CR1 register.

0: The regulator is ready in the selected voltage range

1: The regulator output voltage is changing to the required voltage level

Bit 9 REGLPF : Low-power regulator flag

This bit is set by hardware when the MCU is in Low-power run mode. When the MCU exits from the Low-power run mode, this bit remains at 1 until the regulator is ready in main mode. A polling on this bit must be done before increasing the product frequency.

This bit is cleared by hardware when the regulator is ready.

0: The regulator is ready in main mode (MR)

1: The regulator is in low-power mode (LPR)

Bit 8 REGLPS : Low-power regulator started

This bit provides the information whether the low-power regulator is ready after a power-on reset or a Standby/Shutdown. If the Standby mode is entered while REGLPS bit is still cleared, the wake-up from Standby mode time may be increased.

0: The low-power regulator is not ready

1: The low-power regulator is ready

Bit 7 FLASH_RDY : Flash ready flag

This bit is set by hardware to indicate when the flash memory is ready to be accessed after wake-up from power-down. To place the flash memory in power-down, set either FPD_LPRUN, FPD_LPSLP or FPD_STOP bits, and enter the corresponding low-power mode.

0: Flash memory in power down

1: Flash memory ready to be accessed

Note: If the system boots from SRAM, the user application must wait until the FLASH_RDY bit is set, prior to jumping to flash memory.

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

4.4.7 Power status clear register (PWR_SCR)

Address offset: 0x18

Reset value: 0x0000 0000

Access: 3 additional APB cycles are needed to write this register vs. a standard APB write.

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.CSBFRes.CWUF 7Res.CWUF 5CWUF 4CWUF 3CWUF 2CWUF 1
wwwwwww

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

Bit 8 CSBF : Clear standby flag

Setting this bit clears the SBF flag in the PWR_SR1 register.

Bit 7 Reserved, must be kept at reset value.

Bit 6 CWUF7 : Clear wake-up flag 7

Setting this bit clears the WUF7 flag in the PWR_SR1 register.

Bit 5 Reserved, must be kept at reset value.

Bit 4 CWUF5 : Clear wake-up flag 5

Setting this bit clears the WUF5 flag in the PWR_SR1 register.

Bit 3 CWUF4 : Clear wake-up flag 4

Setting this bit clears the WUF4 flag in the PWR_SR1 register.

Bit 2 CWUF3 : Clear wake-up flag 3

Setting this bit clears the WUF3 flag in the PWR_SR1 register.

Bit 1 CWUF2 : Clear wake-up flag 2

Setting this bit clears the WUF2 flag in the PWR_SR1 register.

Bit 0 CWUF1 : Clear wake-up flag 1

Setting this bit clears the WUF1 flag in the PWR_SR1 register.

4.4.8 Power Port A pull-up control register (PWR_PUCRA)

Address offset: 0x20

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PUy : Port A pull-up bit y (y = 15 to 0)

When set, this bit activates the pull-up on PA[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

4.4.9 Power Port A pull-down control register (PWR_PDCRA)

Address offset: 0x24

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PDy : Port A pull-down bit y (y = 15 to 0)

When set, this bit activates the pull-down on PA[y] when APC bit is set in PWR_CR3 register.

4.4.10 Power Port B pull-up control register (PWR_PUCRB)

Address offset: 0x28

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PUy : Port B pull-up bit y (y = 15 to 0)

When set, this bit activates the pull-up on PB[y] when APC bit is set in PWR_CR3 register.

4.4.11 Power Port B pull-down control register (PWR_PDCRB)

Address offset: 0x2C

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PDy : Port B pull-down bit y (y = 15 to 0)

When set, this bit activates the pull-down on PB[y] when APC bit is set in PWR_CR3 register.

4.4.12 Power Port C pull-up control register (PWR_PUCRC)

Address offset: 0x30

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PUy : Port C pull-up bit y (y = 15 to 0)

When set, this bit activates the pull-up on PC[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

4.4.13 Power Port C pull-down control register (PWR_PDCRC)

Address offset: 0x34

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 15:0 PDy : Port C pull-down bit y (y = 15 to 0)

When set, this bit activates the pull-down on PC[y] when APC bit is set in PWR_CR3 register.

4.4.14 Power Port D pull-up control register (PWR_PUCRD)

Address offset: 0x38

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.PU13PU12PU11PU10PU9PU8Res.PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 13:8 PUy : Port D pull-up bit y (y = 13 to 8)

When set, this bit activates the pull-up on PD[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

Bit 7 Reserved, must be kept at reset value.

Bits 6:0 PUy : Port D pull-up bit y (y = 6 to 0)

When set, this bit activates the pull-up on PD[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

4.4.15 Power Port D pull-down control register (PWR_PDCRD)

Address offset: 0x3C

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.PD13PD12PD11PD10PD9PD8Res.PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 13:8 PDy : Port D pull-down bit y (y = 13 to 8)

When set, this bit activates the pull-down on PD[y] when APC bit is set in PWR_CR3 register.

Bit 7 Reserved, must be kept at reset value.

Bits 6:0 PDy : Port D pull-down bit y (y = 6 to 0)

When set, this bit activates the pull-down on PD[y] when APC bit is set in PWR_CR3 register.

4.4.16 Power Port E pull-up control register (PWR_PUCRE)

Address offset: 0x40

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.PU9PU8PU7Res.Res.Res.PU3Res.Res.Res.
rwrwrwrw

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

Bits 9:7 PUy : Port E pull-up bit y (y = 9 to 7)

When set, this bit activates the pull-up on PE[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

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

Bit 3 PU3 : Port E pull-up bit 3

When set, this bit activates the pull-up on PE[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

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

4.4.17 Power Port E pull-down control register (PWR_PDCRE)

Address offset: 0x44

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.PD9PD8PD7Res.Res.Res.PD3Res.Res.Res.
rwrwrwrw

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

Bits 9:7 PDy : Port E pull-down bit y (y = 9 to 7)

When set, this bit activates the pull-down on PE[y] when APC bit is set in PWR_CR3 register.

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

Bit 3 PD3 : Port E pull-down bit 3

When set, this bit activates the pull-down on PE[y] when APC bit is set in PWR_CR3 register.

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

4.4.18 Power Port F pull-up control register (PWR_PUCRF)

Address offset: 0x48

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU3PU2PU1PU0
rwrwrwrw

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

Bits 3:0 PUy : Port F pull-up bit y (y = 3 to 0)

When set, this bit activates the pull-up on PH[y] when APC bit is set in PWR_CR3 register. If the corresponding PDy bit is also set, the pull-up is not activated and the pull-down is activated instead with highest priority.

4.4.19 Power Port F pull-down control register (PWR_PDCRF)

Address offset: 0x4C

Reset value: 0x0000 0000

This register is neither reset when exiting Standby or Shutdown mode, nor by the PWRRST bit in the RCC_APB1RSTR1 register.

Access: Additional APB cycles are needed to access this register vs. a standard APB access (3 for a write and 2 for a read).

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD3PD2PD1PD0
rwrwrwrw

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

Bits 3:0 PDy : Port F pull-down bit y (y = 3 to 0)

When set, this bit activates the pull-down on PH[y] when APC bit is set in PWR_CR3 register.

4.4.20 PWR register map and reset value table

Table 31. PWR register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x000PWR_CR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LPRRes.Res.Res.VOS
[1:0]
DBPRes.Res.Res.Res.FPD_LPSLPFPD_LPRUNFPD_STOPLPMS
[2:0]
Reset value0010001
0x004PWR_CR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.USVRes.Res.Res.Res.PVME4PVME3PVME1PLS
[2:0]
Reset value0000
0x008PWR_CR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EIWIULRes.Res.Res.Res.APCENULPRRSRes.Res.EWUP7Res.EWUP5EWUP4EWUP3EWUP2EWUP1
Reset value1000000000
0x00CPWR_CR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VBRSVBERes.WP7Res.WP5WP4WP3WP2WP1
Reset value00000000
0x010PWR_SR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUFIRes.Res.Res.STOPF[2:0]SBFRes.Res.Res.WUF7Res.WUF5WUF4WUF3WUF2WUF1
Reset value00000000
0x014PWR_SR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PVM04PVM03Res.Res.PVM01PVDOVOSFREGLPFREGLPSFLASH_RDYRes.Res.Res.Res.Res.Res.
Reset valueXXXXXXX
0x018PWR_SCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CSBFRes.Res.CWUF7Res.CWUF5CWUF4CWUF3CWUF2CWUF1
Reset value0000000
0x020PWR_PUCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
Reset value000000000000000
0x024PWR_PDCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
Reset value000000000000000
0x028PWR_PUCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
Reset value000000000000000
0x02CPWR_PDCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
Reset value000000000000000
0x030PWR_PUCRCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
Reset value000000000000000
0x034PWR_PDCRCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
Reset value000000000000000
0x038PWR_PUCRDRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU13PU12PU11PU10PU9PU8Res.Res.PU6PU5PU4PU3PU2PU1PU0
Reset value000000000000

Table 31. PWR register map and reset values (continued)

OffsetRegister313029282726252423222120191817161514131211109876543210
0x03CPWR_PDCRDResResResResResResResResResResResResResResResResResRes00000000000000
Reset value0000000000000
0x040PWR_PUCREResResResResResResResResResResResResResResResResResResResResResRes0000000000
Reset value0000
0x044PWR_PDCREResResResResResResResResResResResResResResResResResResResResResRes0000000000
Reset value0000
0x048PWR_PUCRFResResResResResResResResResResResResResResResResResResResResResResResResResResResRes0000
Reset value0000
0x04CPWR_PDCRFResResResResResResResResResResResResResResResResResResResResResResResResResResResRes0000
Reset value0000
Refer to Section 2.2 on page 55 for the register boundary addresses