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} = 1.71 \text{ V to } 3.6 \text{ V} \)
\( 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_{DDA} = 1.62 \text{ V (ADCs/COMPs) / } 1.86 \text{ V (DACs/OPAMPs) / } 2.4 \text{ V (VREFBUF) to } 3.6 \text{ V.}
\)
\( V_{DDA} \) is the external analog power supply for A/D converters, D/A converters, voltage reference buffer, operational amplifiers and comparators. The \( V_{DDA} \) voltage level is independent from the \( V_{DD} \) voltage. \( V_{DDA} \) should be preferably connected to VDD when these peripherals are not used.
- • \( V_{DDUSB} = 3.0 \text{ V to } 3.6 \text{ V (available on STM32U0x3xx devices only)} \)
\( 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.
- • \( V_{LCD} = 2.5 \text{ V to } 3.6 \text{ V (available on STM32U0x3xx devices only)} \)
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} = 1.55 \text{ V to } 3.6 \text{ V} \)
\( 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-} \) , \( V_{REF+} \)
\( 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+} \) around 2.048 V. This requires \( V_{DDA} \) equal to or higher than 2.4 V.
- – \( V_{REF+} \) around 2.5 V. This requires \( V_{DDA} \) equal to or higher than 2.8 V.
\( 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} \) .
- • \( V_{CORE} \) is an internal supply for digital peripherals, SRAM and flash memory. It is produced by an embedded linear voltage regulator. On top of \( V_{CORE} \) , the flash memory is also powered from \( V_{DD} \) .
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

The diagram illustrates the power supply architecture of the microcontroller, showing the following domains and their connections:
- V DDA domain: Connected to pins \( V_{DDA} \) and \( V_{SSA} \) . It includes A/D converters, Comparators, D/A converters, Operational amplifiers, and a Voltage reference buffer.
- External connections (1):
- \( V_{LCD} \) pin connected to an LCD block.
- \( V_{DDUSB} \) and \( V_{SS} \) pins connected to USB transceivers.
- V
DD
domain:
Connected to pin
\(
V_{DD}
\)
. It includes:
- \( V_{DDIO1} \) connected to an I/O ring.
- Reset block, Temp. sensor, PLL, HSI, MSI, HSI48.
- Standby circuitry (Wakeup logic, IWDG).
- Voltage regulator (which outputs \( V_{CORE} \) ).
- V SS domain: Connected to pin \( V_{SS} \) .
- V CORE domain: Supplied by the internal voltage regulator. It includes Core, Memories, and Digital peripherals.
- Low voltage detector: Connected to \( V_{DD} \) and \( V_{SS} \) pins.
- Backup domain: Connected to pin \( V_{BAT} \) . It includes LSE crystal 32 K osc, BKP registers, RCC BDCR register, RTC, and SRAM2 (optional).
MSV71800V2
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 analog peripherals voltage supply input is available on a separate \( V_{DDA} \) pin.
- • An isolated supply ground connection is provided on \( V_{SSA} \) pin.
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:
- • It can receive from an external circuitry the desired maximum voltage that is provided on segment and common lines to the glass LCD by the microcontroller.
- • It can also be used to connect an external capacitor that is used by the microcontroller for its voltage step-up converter. This step-up converter is controlled by software to provide the desired voltage to segment and common lines of the glass LCD.
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.
- • When an external power supply is provided to the VLCD pin, it should range from 2.5 V to 3.6 V. It does not depend on V DD .
- • When the LCD is based on the internal step-up converter, the VLCD pin should be connected to a capacitor (see the product datasheet for further information).
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:
- • PC13, PC14 and PC15, which can be used as GPIO pins
- • PC13, PC14 and PC15, which can be configured by RTC or LSE (refer to Section 31.3: RTC functional description on page 905 )
- • PA0/RTC_TAMP2 and PE6/RTC_TAMP3 when they are configured by the RTC as tamper pins
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:
- • PC13, PC14 and PC15 can be controlled only by RTC or LSE (refer to Section 31.3 ):
RTC functional description on page 905)
- • PA0/RTC_TAMP2 and PE6/RTC_TAMP3 when they are configured by the RTC as tamper pins
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. Enable the power interface clock by setting the PWREN bits in the Section 5.2.18: Peripheral clock enable registers
- 2. Set the DBP bit in the Power control register 1 (PWR_CR1) to enable access to the backup domain
- 3. Select the RTC clock source in the RTC domain control register (RCC_BDCR) .
- 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).
- • In Run, Sleep and Stop 0 modes, both regulators are enabled and the main regulator (MR) supplies full power to the \( V_{CORE} \) domain (core, memories and digital peripherals).
- • In Low-power run and Low-power sleep modes, the main regulator is off and the low-power regulator (LPR) supplies low power to the \( V_{CORE} \) domain, preserving the contents of the registers, SRAM1 and SRAM2.
- • In Stop 1 and Stop 2 modes, the main regulator is off and the low-power regulator (LPR) supplies low power to the \( V_{CORE} \) domain, preserving the contents of the registers, SRAM1 and SRAM2.
- • In Standby mode with SRAM2 content preserved (RRS bit is set in the PWR_CR3 register), the main regulator (MR) is off and the low-power regulator (LPR) provides the supply to SRAM2 only. The core, digital peripherals (except Standby circuitry and
backup domain) and SRAM1 are powered off.
- • In Standby mode, both regulators are powered off. The contents of the registers, SRAM1 and SRAM2 is lost except for the Standby circuitry and the backup domain.
- • In Shutdown mode, both regulators are powered off. When exiting from Shutdown mode, a power-on reset is generated. Consequently, the contents of the registers, SRAM1 and SRAM2 is lost, except for the backup domain.
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.
- • Range 1: High-performance range.
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.
- • Range 2: Low-power range.
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. Reduce the system frequency to a value lower than the maximum value allowed for Range 2.
- 2. Adjust the number of wait states according to the new frequency target in Range 2 (LATENCY bits in the FLASH_ACR).
- 3. Program the VOS bits to “10” in the PWR_CR1 register.
The sequence to go from Range 2 to Range 1 is:
- 1. Program the VOS bits to “01” in the PWR_CR1 register.
- 2. Wait until the VOSF flag is cleared in the PWR_SR2 register.
- 3. Adjust number of wait states according new frequency target in Range 1 (LATENCY bits in the FLASH_ACR).
- 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

- 1. The reset temporization \( t_{RSTTEMPO} \) is present only for the BOR lowest threshold ( \( V_{BOR0} \) ).
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

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
| PVM | Power supply | PVM threshold | EXTI 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.
- • If these supplies are shorted externally to \( V_{DD} \) , the application should assume they are available without enabling any Peripheral Voltage Monitoring.
- • If these supplies are independent from \( V_{DD} \) , the Peripheral Voltage Monitoring (PVM)
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. If
\(
V_{DDUSB}
\)
is independent from
\(
V_{DD}
\)
:
- a) Enable the PVM1 by setting PVME1 bit in the Power control register 2 (PWR_CR2) .
- b) Wait for the PVM1 wake-up time
- c) Wait until PVMO1 bit is cleared in the Power status register 2 (PWR_SR2) .
- d) Optional: Disable the PVM1 for consumption saving.
- 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. If
\(
V_{DDA}
\)
is independent from
\(
V_{DD}
\)
:
- a) Enable the PVM3 (or PVM4) by setting PVME3 (or PVME4) bit in the Power control register 2 (PWR_CR2) .
- b) Wait for the PVM3 (or PVM4) wake-up time
- c) Wait until PVMO3 (or PVMO4) bit is cleared in the Power status register 2 (PWR_SR2) .
- d) Optional: Disable the PVM3 (or PVM4) for consumption saving.
- 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:
- • Sleep mode: CPU clock off, all peripherals including Cortex ® -M0+ core peripherals such as NVIC, SysTick, etc. can run and wake up the CPU when an interrupt or an event occurs. Refer to Section 4.3.4: Sleep mode .
- • Low-power run mode: This mode is achieved when the system clock frequency is reduced below 2 MHz. The code is executed from the SRAM or the flash memory. The regulator is in low-power mode to minimize the regulator's operating current. Refer to Section 4.3.2: Low-power run mode (LP run) .
- • Low-power sleep mode: This mode is entered from the Low-power run mode: Cortex ® -M0+ is off. Refer to Section 4.3.5: Low-power sleep mode (LP sleep) .
- • Stop 0, Stop 1 and Stop 2 modes: SRAM1, SRAM2 and all registers content are retained. 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 (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 .
- • Standby mode:
\(
V_{CORE}
\)
domain is powered off. However, it is possible to preserve the SRAM2 contents:
- – Standby mode with SRAM2 retention when the bit RRS is set in PWR_CR3 register. In this case, SRAM2 is supplied by the low-power regulator.
- – Standby mode when the bit RRS is cleared in PWR_CR3 register. In this case the main regulator and the low-power regulator are powered off.
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 .
- • Shutdown mode: \( V_{CORE} \) domain is powered off. All clocks in the \( V_{CORE} \) domain are stopped, the PLL, the MSI, the HSI16, the LSI and the HSE are disabled. The LSE can be kept running. The system clock, when exiting the Shutdown mode, is MSI at 4 MHz. In this mode, the supply voltage monitoring is disabled and the product behavior is not guaranteed in case of a power voltage drop. Refer to Section 4.3.10: Shutdown mode .
In addition, the power consumption in Run mode can be reduced by one of the following means:
- • Slowing down the system clocks
- • Gating the clocks to the APB and AHB peripherals when they are unused.
Figure 9. Low-power modes possible transitions

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.
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 name | Entry | Wake-up source (1) | Wake-up system clock | Effect on clocks | Voltage regulators | |
|---|---|---|---|---|---|---|
| MR | LPR | |||||
| Sleep (Sleep-now or Sleep-on-exit) | WFI or Return from ISR | Any interrupt | Same as before entering Sleep mode | CPU clock OFF no effect on other clocks or analog clock sources | ON | ON |
| WFE | Wake-up event | |||||
| Low-power run | Set LPR bit | Clear LPR bit | Same as Low- power run clock | None | OFF | ON |
| Low-power sleep | Set LPR bit + WFI or Return from ISR | Any interrupt | Same as before entering Low- power sleep mode | CPU clock OFF no effect on other clocks or analog clock sources | OFF | ON |
| Set LPR bit + WFE | Wake-up event | OFF | ON | |||
| Stop 0 | LPMS="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 | ON | ON |
| Stop 1 | LPMS="001" + SLEEPDEEP bit + WFI or Return from ISR or WFE | OFF | ||||
| Stop 2 | LPMS="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 | OFF | OFF | |
| Standby | LPMS="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 | ||||
| Shutdown | LPMS="1--" + SLEEPDEEP bit + WFI or Return from ISR or WFE | WKUP pin edge, RTC event, external reset on NRST pin | MSI 4 MHz | All clocks OFF except LSE | OFF | OFF |
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
| Peripheral | Run | Sleep | Low-power run | Low-power sleep | Stop 0/1 | Stop 2 | Standby | Shutdown | VBAT | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | ||||||
| CPU | Y | - | Y | - | - | - | - | - | - | - | - | - | - |
| Flash memory | O (1) | O (1) | O (1) | O (1) | - | - | - | - | - | - | - | - | - |
| SRAM1 | Y | Y (2) | Y | Y (2) | Y | - | Y | - | - | - | - | - | - |
| SRAM2 | Y | Y (2) | Y | Y (2) | Y | - | Y | - | O (3) | - | - | - | - |
| Backup Registers | Y | Y | Y | Y | Y | - | Y | - | Y | - | Y | - | Y |
| Brown-out reset (BOR) | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | - | - | - |
| Programmable Voltage Detector (PVD) | O | O | O | O | O | O | O | O | - | - | - | - | - |
| Peripheral Voltage Monitor (PVMx; x = 1,3,4) | O | O | O | O | O | O | O | O | - | - | - | - | - |
| DMA and DMAMUX | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Oscillator HSI16 | O | O | O | O | (4) | - | (4) | - | - | - | - | - | - |
| Oscillator HSI48 | O | O | - | - | - | - | - | - | - | - | - | - | - |
| High Speed External (HSE) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Low Speed Internal (LSI) | O | O | O | O | O | - | O | - | O | - | - | - | - |
| Low Speed External (LSE) | O | O | O | O | O | - | O | - | O | - | O | - | O |
| Multi-Speed Internal (MSI) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Clock Security System (CSS) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Clock Security System on LSE | O | O | O | O | O | O | O | O | O | O | - | - | - |
| RTC / Auto wake-up | O | O | O | O | O | O | O | O | O | O | O | O | O |
| Number of RTC Tamper pins | 5 | 5 | 5 | 5 | 5 | O | 5 | O | 5 | O | 5 | O | 5 |
| USARTx (x = 1, 2) | O | O | O | O | O (5) | O (5) | - | - | - | - | - | - | - |
| USARTx (x = 3, 4) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| LPUARTx (x = 1) | O | O | O | O | O (5) | O (5) | O (5) | O (5) | - | - | - | - | - |
Legend: Y = Yes (Enable). O = Optional (Disable by default. Can be enabled by software). - = Not available
| Peripheral | Run | Sleep | Low-power run | Low-power sleep | Stop 0/1 | Stop 2 | Standby | Shutdown | VBAT | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | ||||||
| LPUARTx (x = 2, 3) | O | O | O | O | O (5) | O (5) | - | - | - | - | - | - | - |
| I2Cx (x = 1) | O | O | O | O | O (6) | O (6) | - | - | - | - | - | - | - |
| I2Cx (x = 2, 4) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| I2Cx (x = 3) | O | O | O | O | O (6) | O (6) | O (6) | O (6) | - | - | - | - | - |
| SPIx (x = 1, 2, 3) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| ADC1 | O | O | O | O | - | - | - | - | - | - | - | - | - |
| DAC1 | O | O | O | O | O | - | - | - | - | - | - | - | - |
| VREFBUF | O | O | O | O | O | - | - | - | - | - | - | - | - |
| OPAMP1 | O | O | O | O | O | - | - | - | - | - | - | - | - |
| COMPx (x = 1, 2) | O | O | O | O | O | O | O | O | - | - | - | - | - |
| Temperature sensor | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Timers (TIMx) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| LPTIMx (x = 1, 2, 3) | O | O | O | O | O | O | O | O | - | - | - | - | - |
| Independent watchdog (IWDG) | O | O | O | O | O | O | O | O | O | O | - | - | - |
| Window watchdog (WWDG) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| SysTick timer | O | O | O | O | - | - | - | - | - | - | - | - | - |
| LCD | O | O | O | O | O | O | O | O | - | - | - | - | - |
| USB | O | O | - | - | - | O (7) | - | - | - | - | - | - | - |
| Touch sensing controller (TSC) | O | O | O | O | - | - | - | - | - | - | - | - | - |
| Random number generator (RNG) | O (8) | O (8) | - | - | - | - | - | - | - | - | - | - | - |
| AES hardware accelerator | O | O | O | O | - | - | - | - | - | - | - | - | - |
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
| Peripheral | Run | Sleep | Low-power run | Low-power sleep | Stop 0/1 | Stop 2 | Standby | Shutdown | VBAT | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | - | Wake-up capability | ||||||
| CRC calculation unit | O | O | O | O | - | - | - | - | - | - | - | - | - |
| GPIOs | O | O | O | O | O | O | O | O | (9) 5 pins (10) | (11) up to 5 pins (10) | - | ||
- 1. The flash memory can be configured in power-down mode. By default, it is not in power-down mode.
- 2. The SRAM clock can be gated on or off.
- 3. SRAM2 content is preserved when the bit RRS is set in PWR_CR3 register.
- 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. UART and LPUART reception is functional in Stop mode, and generates a wake-up interrupt on Start, address match or received frame event.
- 6. I2C address detection is functional in Stop mode, and generates a wake-up interrupt in case of address match.
- 7. USB bus state monitoring is functional in Stop mode. It generates a wake-up interrupt upon resume from USB suspend.
- 8. Voltage scaling Range 1 only.
- 9. I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.
- 10. I/Os with wake-up from Standby/Shutdown capability are the following: PA0, PC13, PE6, PA2, PC5.
- 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. 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. Decrease the system clock frequency below 2 MHz.
- 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. Force the regulator in main mode by clearing the LPR bit in the PWR_CR1 register.
- 2. Wait until REGLPF bit is cleared in the PWR_SR2 register.
- 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 mode | Description |
|---|---|
| Mode entry | Decrease the system clock frequency below 2 MHz LPR = 1 |
| Mode exit | LPR = 0 Wait until REGLPF = 0 Increase the system clock frequency |
| Wake-up latency | Regulator 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:
- • If the WFI instruction or Return from ISR was used to enter the low-power mode, any peripheral interrupt acknowledged by the NVIC can wake up the device.
- • If the WFE instruction is used to enter the low-power mode, the MCU exits the low-power mode as soon as an event occurs. The wake-up event can be generated either
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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
Refer to the Cortex®-M0+ System Control register. On return from ISR while:
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 latency | None |
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 mode | Description |
|---|---|
| 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 entry | Low-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 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 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 latency | None |
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:
- • Independent watchdog (IWDG): 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 29.4: IWDG functional description .
- • Real-time clock (RTC): this is configured by the RTCEN bit in the RTC domain control register (RCC_BDCR)
- • Internal RC oscillator (LSI): this is configured by the LSION bit in the Control/status register (RCC_CSR)
- • External 32.768 kHz oscillator (LSE): this is configured by the LSEON bit in the RTC domain control register (RCC_BDCR) .
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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
On Return from ISR while:
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 latency | Longest 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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
On Return from ISR while:
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 latency | Longest 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:
- • Independent watchdog (IWDG): 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 29.4: IWDG functional description in Section 29: Independent watchdog (IWDG) .
- • Real-time clock (RTC): this is configured by the RTCEN bit in the Section 5.4.22: RTC domain control register (RCC_BDCR)
- • Internal RC oscillator (LSI): this is configured by the LSION bit in the Section 5.4.23: Control/status register (RCC_CSR) .
- • External 32.768 kHz oscillator (LSE): this is configured by the LSEON bit in the RTC domain control register (RCC_BDCR) .
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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
On return from ISR while:
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 latency | Longest 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:
- • Independent watchdog (IWDG): 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 29.4: IWDG functional description in Section 29: Independent watchdog (IWDG) .
- • real-time clock (RTC): this is configured by the RTCEN bit in the Backup domain control register (RCC_BDCR)
- • Internal RC oscillator (LSI): this is configured by the LSION bit in the Control/status register (RCC_CSR).
- • External 32.768 kHz oscillator (LSE): this is configured by the LSEON bit in the Backup domain control register (RCC_BDCR)
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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
|
| Mode exit | WKUPx pin edge, RTC event, TAMP event, external Reset on NRST pin, IWDG Reset, BOR reset |
| Wake-up latency | Reset 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:
- • real-time clock (RTC): this is configured by the RTCEN bit in the Backup domain control register (RCC_BDCR). Caution: in case of VDD power-down the RTC content is lost.
- • external 32.768 kHz oscillator (LSE): this is configured by the LSEON bit in the Backup domain control register (RCC_BDCR)
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 mode | Description |
|---|---|
| Mode entry | WFI (Wait for Interrupt) or WFE (Wait for Event) while:
|
| Mode exit | WKUPx pin edge, RTC event, TAMP event, external Reset on NRST pin |
| Wake-up latency | Reset 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) :
- • Low-power 32.768 kHz external crystal oscillator (LSE OSC)
This clock source provides a precise time base with very low-power consumption. - • Low-power internal RC Oscillator (LSI)
This clock source has the advantage of saving the cost of the 32.768 kHz crystal. This internal RC Oscillator is designed to add minimum power consumption.
To wake up from Stop mode with an RTC alarm event, it is necessary to:
- • Configure the EXTI Line 18 to be sensitive to rising edge
- • Configure the RTC to generate the RTC alarm
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:
- • Configure the EXTI Line 20 to be sensitive to rising edge
- • Configure the RTC to generate the RTC alarm
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.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | LPR | Res. | Res. | Res. | VOS[1:0] | DBP | Res. | Res. | FPD_L PSLP | FPD_L PRUN | FPD STOP | LPMS[2:0] | |||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||||
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.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | USV | Res. | Res. | Res. | PVME4 | PVME3 | PVME1 | PLS[2:0] | PVDE | ||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| EIWUL | Res. | Res. | Res. | Res. | APC | ENULP | RRS | Res. | EWUP 7 | Res. | EWUP 5 | EWUP 4 | EWUP 3 | EWUP 2 | EWUP 1 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | VBR | VBE | Res. | WP7 | Res. | WP5 | WP4 | WP3 | WP2 | WP1 |
| rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:10 Reserved, must be kept at reset value.
Bit 9 VBR : V BAT battery charging resistor selection
- 0: Charge V BAT through a 5 kOhms resistor
- 1: Charge V BAT through a 1.5 kOhms resistor
Bit 8 VBE : V BAT battery charging enable
- 0: V BAT battery charging disable
- 1: 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
- 0: Detection on high level (rising edge)
- 1: Detection on low level (falling edge)
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
- 0: Detection on high level (rising edge)
- 1: Detection on low level (falling edge)
Bit 3 WP4 : Wake-up pin WKUP4 polarity
This bit defines the polarity used for an event detection on external wake-up pin, WKUP4
- 0: Detection on high level (rising edge)
- 1: Detection on low level (falling edge)
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.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| WUFI | Res. | Res. | Res. | STOPF[2:0] | SBF | Res. | WUF7 | Res. | WUF5 | WUF4 | WUF3 | WUF2 | WUF1 | ||
| r | r | r | r | r | r | r | r | r | r | r | |||||
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)
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PVMO4 | PVMO3 | Res. | PVMO1 | PVDO | VOSF | REGLP F | REGLP S | FLASH _RDY | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| r | r | r | r | r | r | r | r |
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.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | CSBF | Res. | CWUF 7 | Res. | CWUF 5 | CWUF 4 | CWUF 3 | CWUF 2 | CWUF 1 |
| w | w | w | w | w | w | w |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | Res. | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | Res. | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | PU9 | PU8 | PU7 | Res. | Res. | Res. | PU3 | Res. | Res. | Res. |
| rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | PD9 | PD8 | PD7 | Res. | Res. | Res. | PD3 | Res. | Res. | Res. |
| rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PU3 | PU2 | PU1 | PU0 |
| rw | rw | rw | rw |
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).
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PD3 | PD2 | PD1 | PD0 |
| rw | rw | rw | rw |
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
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x000 | PWR_CR1 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LPR | Res. | Res. | Res. | VOS [1:0] | DBP | Res. | Res. | Res. | Res. | FPD_LPSLP | FPD_LPRUN | FPD_STOP | LPMS [2:0] | ||
| Reset value | 0 | 0 | 1 | 0 | 0 | 0 | 1 | |||||||||||||||||||||||||||
| 0x004 | PWR_CR2 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | USV | Res. | Res. | Res. | Res. | PVME4 | PVME3 | PVME1 | PLS [2:0] | |||
| Reset value | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||||||
| 0x008 | PWR_CR3 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | EIWIUL | Res. | Res. | Res. | Res. | APC | ENULP | RRS | Res. | Res. | EWUP7 | Res. | EWUP5 | EWUP4 | EWUP3 | EWUP2 | EWUP1 |
| Reset value | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||
| 0x00C | PWR_CR4 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | VBRS | VBE | Res. | WP7 | Res. | WP5 | WP4 | WP3 | WP2 | WP1 | ||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||
| 0x010 | PWR_SR1 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | WUFI | Res. | Res. | Res. | STOPF[2:0] | SBF | Res. | Res. | Res. | WUF7 | Res. | WUF5 | WUF4 | WUF3 | WUF2 | WUF1 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||
| 0x014 | PWR_SR2 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PVM04 | PVM03 | Res. | Res. | PVM01 | PVDO | VOSF | REGLPF | REGLPS | FLASH_RDY | Res. | Res. | Res. | Res. | Res. | Res. | |
| Reset value | X | X | X | X | X | X | X | |||||||||||||||||||||||||||
| 0x018 | PWR_SCR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CSBF | Res. | Res. | CWUF7 | Res. | CWUF5 | CWUF4 | CWUF3 | CWUF2 | CWUF1 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
| 0x020 | PWR_PUCRA | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x024 | PWR_PDCRA | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x028 | PWR_PUCRB | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x02C | PWR_PDCRB | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x030 | PWR_PUCRC | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PU15 | PU14 | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | PU7 | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x034 | PWR_PDCRC | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PD15 | PD14 | PD13 | PD12 | PD11 | PD10 | PD9 | PD8 | PD7 | PD6 | PD5 | PD4 | PD3 | PD2 | PD1 | PD0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x038 | PWR_PUCRD | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PU13 | PU12 | PU11 | PU10 | PU9 | PU8 | Res. | Res. | PU6 | PU5 | PU4 | PU3 | PU2 | PU1 | PU0 | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Table 31. PWR register map and reset values (continued)
| Offset | Register | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x03C | PWR_PDCRD | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||
| 0x040 | PWR_PUCRE | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x044 | PWR_PDCRE | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x048 | PWR_PUCRF | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | 0 | 0 | 0 |
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x04C | PWR_PDCRF | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | 0 | 0 | 0 | 0 |
| Reset value | 0 | 0 | 0 | 0 |