5. Power control (PWR)

5.1 Power supplies

The STM32WLEx devices require a V DD operating voltage supply between 1.71 V and 3.6 V. Several independent supplies (V DDSMPS , V FBSMPS , V DDA , V DDRF ) can be provided for specific peripherals:

V DD is the external power supply for the I/Os, the system analog blocks such as reset, power management, internal clocks and low-power regulator. It is provided externally through VDD pins.

V DDSMPS is the external power supply for the SMPS step-down converter. It is provided externally through VDDSMPS supply pin and must be connected to the same supply as V DD .

V FBSMPS is the external power supply for the main system regulator. It is provided externally through VFBSMPS pin and is supplied through the SMPS step-down converter.

V DDA is the external analog power supply for A/D converters, D/A converters, voltage reference buffer, and comparators. The V DDA voltage level is independent from the V DD voltage (see power-up and power-down limitations below) and must preferably be connected to V DD when these peripherals are not used.

V DDRF is the external power supply for the radio. It is provided externally through the VDDRF pin and must be connected to the same supply as V DD .

V DDRF1V5 is the external power supply for the radio. It is provided externally through the VDDRF1V5 pin.

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

V REF+ is the input reference voltage for ADC. It is also the output of the internal voltage reference buffer when enabled.

V REF+ can be grounded when ADC is not active. The internal voltage reference buffer supports the following output voltages, configured with VRS bit in the VREFBUF_CSR register:

VREF+ pin is not available on all packages. When not available, this pin is internally bonded to \( V_{DDA} \) . When VREF+ is double-bonded with \( V_{DDA} \) in a package, the internal voltage reference buffer is not available and must be kept disabled (refer to the datasheet for pinout descriptions).

During power up and power down, the following power sequence is required:

  1. 1. When \( V_{DD} < 1 \) V other power supplies ( \( V_{DDA} \) ) must remain below \( V_{DD} + 300 \) mV.

During power down, \( V_{DD} \) can temporarily become lower than other supplies only if the energy provided to the device remains below 1 mJ. This allows external decoupling capacitors to be discharged with different time constants during this transient phase.

  1. 2. When \( V_{DD} > 1 \) V, all other power supplies ( \( V_{DDA} \) ) become independent.

An embedded linear voltage regulator is used to supply the internal digital power \( V_{CORE} \) . \( V_{CORE} \) is the power supply for digital peripherals, SRAM1 and SRAM2. The flash memory is supplied by \( V_{CORE} \) and \( V_{DD} \) . \( V_{CORE} \) is split in two parts: \( V_{DDO} \) part and an interruptible part \( V_{DDI} \) .

Figure 14. Power supply overview

Figure 14. Power supply overview diagram showing the internal power management architecture. It includes blocks for POR, LDO/SMPS, MR, LPR, and RFLDO. External pins include VBAT, VDD, VDDSMPS, VLXSMPS, VFBSMPS, and VDDRF1V5. Internal voltage nodes shown are VSW, VLP, VBKP, VMAIN, VRF, VDDO, and VDDI. A switch matrix connects various internal nodes. An inductor and capacitor are shown connected to the SMPS outputs.

MSv50973V2

Figure 14. Power supply overview diagram showing the internal power management architecture. It includes blocks for POR, LDO/SMPS, MR, LPR, and RFLDO. External pins include VBAT, VDD, VDDSMPS, VLXSMPS, VFBSMPS, and VDDRF1V5. Internal voltage nodes shown are VSW, VLP, VBKP, VMAIN, VRF, VDDO, and VDDI. A switch matrix connects various internal nodes. An inductor and capacitor are shown connected to the SMPS outputs.

The different supply configurations are shown in the figure below.

Figure 15. Supply configurations

Figure 15. Supply configurations. The diagram shows two supply configurations for an MCU. The left side, labeled 'LDO/SMPS supply', shows a block diagram where the VDD pin is connected to an LDO/SMPS block. The LDO/SMPS block has inputs VDD, VDDSMPS, and VLXSMPS, and an output VFBSMPS. The VFBSMPS output is connected to a feedback network consisting of a resistor and a capacitor to ground. The VFBSMPS output is also connected to the VDDRF1V5 pin of the MCU. The MCU has blocks for RF LDO, MR, and LPR. The right side, labeled 'LDO supply', shows a similar block diagram, but the VDD pin is connected to an LDO block instead of an LDO/SMPS block. The LDO block has inputs VDD, VDDSMPS, and VLXSMPS, and an output VFBSMPS. The VFBSMPS output is connected to a feedback network consisting of a resistor and a capacitor to ground. The VFBSMPS output is also connected to the VDDRF1V5 pin of the MCU. The MCU has blocks for RF LDO, MR, and LPR. The diagram is labeled MSv50974V1 in the bottom right corner.
Figure 15. Supply configurations. The diagram shows two supply configurations for an MCU. The left side, labeled 'LDO/SMPS supply', shows a block diagram where the VDD pin is connected to an LDO/SMPS block. The LDO/SMPS block has inputs VDD, VDDSMPS, and VLXSMPS, and an output VFBSMPS. The VFBSMPS output is connected to a feedback network consisting of a resistor and a capacitor to ground. The VFBSMPS output is also connected to the VDDRF1V5 pin of the MCU. The MCU has blocks for RF LDO, MR, and LPR. The right side, labeled 'LDO supply', shows a similar block diagram, but the VDD pin is connected to an LDO block instead of an LDO/SMPS block. The LDO block has inputs VDD, VDDSMPS, and VLXSMPS, and an output VFBSMPS. The VFBSMPS output is connected to a feedback network consisting of a resistor and a capacitor to ground. The VFBSMPS output is also connected to the VDDRF1V5 pin of the MCU. The MCU has blocks for RF LDO, MR, and LPR. The diagram is labeled MSv50974V1 in the bottom right corner.

The LDO or SMPS step-down converter operating mode can be configured by one of the following:

After any POR and NRST reset, the LDO mode is selected. The SMPS selection has priority over LDO selection.

While the sub-GHz radio is in Standby with HSE32 or in Active mode, the supply mode is not altered until the sub-GHz radio enters Standby or Sleep mode. The sub-GHz radio activity may add a delay for entering the MCU software requested supply mode.

The LDO or SMPS supply mode can be checked with the SMPSRDY flag in Power status register 2 (PWR_SR2) .

Note: When the radio is active, the supply mode is not changed until after the radio activity is finished.

During Stop 1, Stop 2 and Standby modes, when the sub-GHz radio is not active, the LDO or SMPS step-down converter is switched off. When exiting low-power modes (except Shutdown), the SMPS step-down converter is set by hardware to the mode selected by the SMPSEN bit in PWR control register 5 (PWR_CR5) . SMPSEN is retained in Stop and Standby modes.

Independently from the MCU software selected supply operating mode, the sub-GHz radio allows the supply mode selection while the sub-GHz radio is active (thanks to the sub-GHz radio Set_RegulatorMode() command). For more details, see Relation between MCU and sub-GHz radio operating modes .

The maximum load current delivered by the SMPS can be selected by the sub-GHz radio SUBGHZ_SMPSC2R register. For more details see Section 4: Sub-GHz radio (SUBGHZ) .

The inrush current of the LDO and SMPS step-down converter can be controlled via the sub-GHz radio SUBGHZ_PCR register. This information is retained in all but the sub-GHz radio Deep-Sleep mode. For more details see Section 4: Sub-GHz radio (SUBGHZ) .

The SMPS needs a clock to be functional. If for any reason this clock stops, the device may be destroyed. It can be the case if the HSE is provided by an external clock source ( Figure 22: HSE32 clock sources ), with the risk that this clock disappears while the SMPS is enabled. To avoid this situation, a clock detection is used to, in case of a clock failure, switch off the SMPS and enable the LDO. The SMPS clock detection is enabled by the sub-GHz radio SUBGHZ_SMPS0R.CLKDE. By default, the SMPS clock detection is disabled and must be enabled before enabling the SMPS. For more details, see Section 4: Sub-GHz radio (SUBGHZ) .

5.1.1 Independent analog peripherals supply

To improve the ADC conversion accuracy and to extend the supply flexibility, the analog peripherals have an independent power supply that 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 VSSA 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, comparators, voltage reference buffer).

The V DDA supply can be monitored by the peripheral voltage monitoring, and compared with a threshold (1.65 V for PVM3). See Section 5.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 reference voltage

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

V REF+ can be provided either by an external reference or by an internal buffered voltage reference (VREFBUF).

The internal voltage reference is enabled by setting the ENVR bit in the 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 Voltage reference buffer (VREFBUF) for further information.

5.1.2 Battery backup domain

To retain the content of the backup registers and supply the RTC and TAMP functions 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.

The V BAT pin powers RTC, TAMP, the LSE oscillator and the PC13 to PC15 I/Os, allowing RTC and TAMP 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 is detected, the power switch between \( V_{BAT} \) and \( V_{DD} \) remains connected to \( V_{BAT} \) .
During the startup phase, if \( V_{DD} \) is established in less than \( t_{RSTTEMPO} \) (refer to the datasheet for the value of \( t_{RSTTEMPO} \) ) and \( V_{DD} > V_{BAT} + 0.6 \) V, a current can be injected into \( V_{BAT} \) through an internal diode connected between \( V_{DD} \) and the power switch ( \( V_{BAT} \) ).
If the power supply/battery connected to the V BAT pin cannot support this current injection, it is strongly recommended to connect an external low-drop diode between this power supply and the V BAT pin.


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

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

Note: Due to the fact that the analog switch can transfer only a limited amount of current (3 mA), the use of GPIO PC13 to PC15 in output mode is restricted: the speed must be limited to 2 MHz with a maximum load of 30 pF and these I/Os must not be used as 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:

Backup domain access

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

VBAT battery charging

When \( V_{DD} \) 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 k \( \Omega \) resistor or through a 1.5 k \( \Omega \) resistor, depending on the VBRS bit value in the PWR control register 4 (PWR_CR4) .

The battery charging is enabled by setting VBE bit in the PWR control register 4 (PWR_CR4) , and automatically disabled in VBAT mode.

5.1.3 Voltage regulator

Two embedded linear voltage regulators supply all the digital circuitries, except for the Standby circuitry and the backup domain. The main regulator (MR) output voltage ( \( V_{CORE} \) ) can be programmed by software to two different power ranges (range 1 and range 2) to optimize the consumption depending on the system maximum operating frequency (refer to Section 6.2.9: Clock source frequency versus voltage scaling and to Section 3.3.4: 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 or by the low-power regulator (LPR), as detailed below:

5.1.4 Dynamic voltage scaling management

The dynamic voltage scaling is a power management technique that 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 “overvolting”. It is used to improve the device performance.

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

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

The main regulator provides a typical output voltage at 1.0 V. The system clock frequency can be up to 16 MHz. The flash memory 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 control register 1 (PWR_CR1) .

The sequence to go from range 1 to range 2 is the following:

  1. 1. Reduce the system frequency to a value lower or equal to 16 MHz.
  2. 2. Adjust number of wait states according to new frequency target in range 2 (LATENCY bits in the FLASH_ACR).
  3. 3. Select range 2 with the VOS bits in the PWR control register 1 (PWR_CR1) .

The sequence to go from range 2 to range 1 is detailed below:

  1. 1. Select range 1 in the VOS bits in the PWR control register 1 (PWR_CR1) .
  2. 2. Wait until the VOSF flag is cleared in the Power status register 2 (PWR_SR2) .
  3. 3. Adjust number of wait states according new frequency target in range 1 (LATENCY bits in the FLASH_ACR).
  4. 4. Increase the system frequency.

5.2 Power supply supervisor

5.2.1 Power-on reset (POR)/power-down reset (PDR)
/Brownout reset (BOR)

The device has an integrated power-on reset/power-down reset, coupled with a Brownout reset circuitry.

Five BOR thresholds can be selected through option bytes.

BOR0 level cannot be disabled. Other BOR levels can be enabled by user option. When enabled, BOR is active in all power modes except in Shutdown.

Reset mode

During power-on, 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 Brownout reset thresholds, refer to the electrical characteristics section in the datasheet.

Figure 16. Brownout reset waveform

Figure 16. Brownout reset waveform. The graph shows the supply voltage VDD over time (t). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the BORHrise and BORHfall thresholds. The hysteresis between these two levels is indicated. Below the graph, the nPwr signal is shown as a horizontal line that goes low when VDD falls below the BORHfall threshold and returns high when VDD rises above the BORHrise threshold. The diagram is labeled MS44480V1.
Figure 16. Brownout reset waveform. The graph shows the supply voltage VDD over time (t). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the BORHrise and BORHfall thresholds. The hysteresis between these two levels is indicated. Below the graph, the nPwr signal is shown as a horizontal line that goes low when VDD falls below the BORHfall threshold and returns high when VDD rises above the BORHrise threshold. The diagram is labeled MS44480V1.

1. The reset temporization \( t_{RSTTEMPO} \) is present only for the BOR lowest threshold ( \( V_{BOR0} \) ).

5.2.2 Programmable voltage detector (PVD)

The PVD can be used to monitor \( V_{DD} \) by comparing it to a threshold selected by the PLS[2:0] bits in the PWR control register 2 (PWR_CR2) .

PVD can also be used to monitor a voltage level on the PVD_IN pin. In this case the voltage level on PVD_IN is compared to the internal VREFINT level.

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} \) or the voltage level on PVD_IN is higher or lower than the PVD threshold. This event is internally connected to the EXTI line 16 and can generate an interrupt if enabled through the EXTI registers.

The PVD output interrupt can be generated when \( V_{DD} \) or voltage level on PVD_IN drops below the PVD threshold and/or when \( V_{DD} \) or voltage level on PVD_IN rises above the PVD threshold depending on EXTI line 16 rising/falling edge configuration. As an example, the service routine can perform emergency shutdown tasks.

The PVD can be configured to monitor the \( V_{DD} \) supply level needed for the sub-GHz radio operation. For this, the PVD must select its lowest level and PVD and the wake-up must be enabled in EWPVD. Only a voltage drop below the PVD level generates a wake-up event.

BOR0 level cannot be disabled. The other BOR levels can be enabled by user option. When enabled, BOR is active in all power modes except in Shutdown.

Figure 17. PVD thresholds

Figure 17. PVD thresholds. A graph showing the relationship between supply voltage (VDD or PVD_IN) and time (t). The voltage rises to a peak and then falls. The rising threshold is labeled PVDrise and the falling threshold is labeled PVDfall. The difference between these two thresholds is labeled 'hysteresis'. Below the graph, two digital signals are shown: PVDO (Power Voltage Detector Output) and PVDE (Power Voltage Detector Enable). PVDO is high when the voltage is below PVDfall and low when it is above PVDrise. PVDE is high when the system is enabled (SW enable) and low when it is disabled (PDR reset).
Figure 17. PVD thresholds. A graph showing the relationship between supply voltage (VDD or PVD_IN) and time (t). The voltage rises to a peak and then falls. The rising threshold is labeled PVDrise and the falling threshold is labeled PVDfall. The difference between these two thresholds is labeled 'hysteresis'. Below the graph, two digital signals are shown: PVDO (Power Voltage Detector Output) and PVDE (Power Voltage Detector Enable). PVDO is high when the voltage is below PVDfall and low when it is above PVDrise. PVDE is high when the system is enabled (SW enable) and low when it is disabled (PDR reset).

5.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 (such as \( V_{DDA} \) ) can be independent from \( V_{DD} \) and can be monitored by the peripheral voltage monitoring (PVM).

Each PVMx is a comparator between a fixed threshold \( V_{PVMx} \) and the selected power supply. PVMOx flags indicate if the independent power supply is higher or lower than the PVMx threshold. The PVMOx flag is cleared when the supply voltage is above the PVMx threshold and is set when the supply voltage is below the PVMx threshold.

Each PVM output is connected to an EXTI line and can generate an interrupt if enabled through the EXTI registers. The PVMx output interrupt is generated when the independent power supply drops below the PVMx threshold and/or when it rises above the PVMx 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 modes.

Table 35. PVM features

PVMPower supplyPVM thresholdEXTI line
PVM1Not used--
PVM2Not used--
PVM3\( V_{DDA} \)\( V_{PVM3} \) (around 1.65 V)34
PVM4Not used--

The independent supply \( V_{DDA} \) is 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:

The following sequence must be applied before using any of these analog peripherals: ADC, DAC, comparators or voltage reference buffer:

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

5.2.4 Radio end of life (EOL)

The radio end-of-life monitor provides information on the \( V_{DD} \) supply when it is too low to operate the sub-GHz radio. When reaching the EOL level, the software must stop all radio activities in a safe way.

The EOL is enabled by setting the RFEOLEN bit.

The RFEOLF flag is available in Power status register 2 (PWR_SR2) to indicate if \( V_{DD} \) voltage level is below the EOL threshold.

The EOL is only generated when the sub-GHz radio is in Calibrate, Standby or Active mode.

Figure 18. EOL thresholds

Figure 18. EOL thresholds. A graph showing the VDD supply voltage over time (t) and the corresponding RFEOLF flag status. The voltage rises to a peak and then falls. Two horizontal dashed lines represent the EOL thresholds: VEOLH (higher) and VEOLL (lower). The RFEOLF flag is shown as a digital signal that goes low when the voltage falls below VEOLL and returns high when it rises above VEOLH. The hysteresis is the voltage difference between VEOLH and VEOLL.

The figure is a graph showing the relationship between the \( V_{DD} \) supply voltage and the RFEOLF flag status over time ( \( t \) ). The \( V_{DD} \) voltage is plotted on the y-axis, and time is on the x-axis. The voltage rises from a low level to a peak and then falls. Two horizontal dashed lines represent the EOL thresholds: \( V_{EOLH} \) (higher threshold) and \( V_{EOLL} \) (lower threshold). The RFEOLF flag is shown as a digital signal below the graph. When the voltage falls below \( V_{EOLL} \) , the RFEOLF flag goes low. When the voltage rises above \( V_{EOLH} \) , the RFEOLF flag goes high. The hysteresis is the voltage difference between \( V_{EOLH} \) and \( V_{EOLL} \) . The graph is labeled with \( V_{DD} \) on the y-axis, \( t \) on the x-axis, and MSV62619V1 in the bottom right corner.

Figure 18. EOL thresholds. A graph showing the VDD supply voltage over time (t) and the corresponding RFEOLF flag status. The voltage rises to a peak and then falls. Two horizontal dashed lines represent the EOL thresholds: VEOLH (higher) and VEOLL (lower). The RFEOLF flag is shown as a digital signal that goes low when the voltage falls below VEOLL and returns high when it rises above VEOLH. The hysteresis is the voltage difference between VEOLH and VEOLL.

5.3 Radio busy management

For correct software handling of the radio busy signal RFBUSY, additional busy control are included in the PWR controller. This generates a busy mask RFBUSYMS status based on

the SUBGHZSPI_NSS activity, and masks the RFBUSYS status low time (not busy) after an SPI command transfer (see the figure below).

Figure 19. Radio busy management

Timing diagram for radio busy management showing signal transitions for POR, SUBGHZSPI_DATA, SUBGHZSPI_NSS, RFBUSY/RFBUSYS, RFBUSYMS, EXTI RFBUSY interrupt, and WRFBUSYF wakeup.

The diagram illustrates the timing relationship between several signals during radio busy management. The signals shown are:

Key timing points include:The diagram is labeled MSV50975V1 in the bottom right corner.

Timing diagram for radio busy management showing signal transitions for POR, SUBGHZSPI_DATA, SUBGHZSPI_NSS, RFBUSY/RFBUSYS, RFBUSYMS, EXTI RFBUSY interrupt, and WRFBUSYF wakeup.

At reset, the radio is busy (as signaled by the RFBUSY signal). At this time, the RFBUSYMS signal provides the same information. Subsequently the radio is woken up by a falling edge on SUBGHZSPI_NSS . Once the radio is ready to receive a command, RFBUSYS and RFBUSYMS go low. After reset, the RFBUSYS or RFBUSYMS status can be used to check that the radio is ready.

For any subsequent command, as soon as the SUBGHZSPI_NSS goes low, the RFBUSYMS status is set to signal busy radio. RFBUSYMS remains high for at least the minimum RFBUSYMS delay after the SUBGHZSPI_NSS is set high, or as long as the RFBUSY signal remains high:

When the SUBGHZSPI_NSS is selected to be driven by the LPTIM3_OUT in PWR_CR1.SUBGHZSPINSSSEL , the RFBUSYMS status is disabled and must not be used by software.

When in Standby mode, the CPU can be woken up through a WRFBUSYF wake-up flag when enabled by EWRFBUSY in Section 5.5.3: PWR control register 3 (PWR_CR3) .

When in Stop or Run mode, a CPU can be woken up and interrupted by the EXTI configurable event on the RFBUSY signal, see Section 14.3.1: EXTI wake-up interrupt list .

5.4 Low-power modes

By default, the microcontroller is in Run mode after a system or a power reset. Low-power modes are available to save power when the CPU does not need to be kept running, for example when it is waiting for an external event. The user must select the mode giving the best compromise between consumption, startup time and available wake-up sources.

These low-power modes are detailed below:

RTC can remain active (Stop mode with RTC, Stop mode without RTC). The sub-GHz radio may remain active independently from the CPU.

Some peripherals with the wake-up capability can enable HSI16 RC during the Stop mode to detect their wake-up condition.

Stop 1 offers the largest number of active peripherals and wake-up sources, a smaller wake-up time but a higher consumption compared with Stop 2.

In Stop 0 mode, the main regulator remains on, resulting in 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 that uses the low-power regulator.

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

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

RTC can remain active (Stop 2 mode with RTC, Stop 2 mode without RTC). The sub-GHz radio may also remain active independent from the CPU.

Some peripherals with the wake-up capability can enable HSI16 RC during the Stop 2 mode to detect their wake-up condition (see Table 37: Functionalities depending on system operating mode ).

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

powered off.

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

The RTC can remain active (Standby mode with RTC, Standby mode without RTC). The sub-GHz radio and the PVD may also remain active when enabled independent from the CPU. In Standby mode, the PVD selects its lowest level.

The system clock, when exiting Standby modes, is MSI at 4 MHz.

In addition, the power consumption in Run mode can be reduced by slowing down the system clocks, and/or by gating the clocks to the APB and AHB peripherals when they are unused.

The system operation mode depends on the CPU sub-system operating mode. The system only enters a low-power mode when the CPU allows it to do so.

The system low-power mode to enter depends on the allowed mode selected by the CPU in LPMS[2:0] bits in PWR control register 1 (PWR_CR1) .

Table 36. Low-power mode summary

Mode nameEntryWake-up source (1)Wake-up system clockEffect on clocksVoltage regulators
MRLPR
Sleep
(Sleep-now or
Sleep-on-exit)
WFI or return
from ISR
Any interruptSame as before
entering Sleep mode
CPU clock OFF
No effect on other clocks
or analog clock sources
ONON
WFEWake-up event
LPRunSet LPR bitClear LPR bitSame as LPRun
clock
NoneOFFON
LPSleepSet LPR bit +
WFI or return
from ISR
Any interruptSame as before
entering LPSleep
mode
CPU clock OFF
No effect on other clocks
or analog clock sources
OFFON
Set LPR bit +
WFE
Wake-up event

Table 36. Low-power mode summary (continued)

Mode nameEntryWake-up source (1)Wake-up system clockEffect on clocksVoltage regulators
MRLPR
Stop 0LPMS = 0b000 + SLEEPDEEP bit + WFI or return from ISR or WFEAny EXTI line (configured in the EXTI registers). Specific peripherals eventsHSI16 when STOPWUCK = 1 in RCC_CFGR.
MSI with the frequency before entering the Stop mode when STOPWUCK = 0.
All clocks OFF except HSI16, LSI and LSEONON
Stop 1LPMS = 0b001 + SLEEPDEEP bit + WFI or return from ISR or WFEOFF
Stop 2 (with I2C3, LPUART1, LPTIM1, SRAM1, SRAM2)LPMS = 0b010 + SLEEPDEEP bit + WFI or return from ISR or WFE
Standby (with SRAM2)LPMS = 0b011 + Set RRS bit + SLEEPDEEP bit + WFI or return from ISR or WFEWake-up PVD, RFIRQ, wake-up RFBUSY, WKUP pin edge, RTC and TAMP event, LSECSS, external reset in NRST pin, IWDG resetMSI 4 MHzAll clocks OFF except LSI and LSEOFFOFF
StandbyLPMS = 0b011 + Clear RRS bit + SLEEPDEEP bit + WFI or return from ISR or WFE
ShutdownLPMS = 0b1xx + SLEEPDEEP bit + WFI or return from ISR or WFEWKUP pin edge, RTC and TAMP event, external reset in NRST pinMSI 4 MHzAll clocks OFF except LSEOFFOFF

1. Refer to Table 37: Functionalities depending on system operating mode .

Table 37. Functionalities depending on system operating mode (1)

PeripheralRunSleepLPRunLPSleepStop 0Stop 1Stop 2StandbyShutdoVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
CPUY-Y-R-R-R------
Radio-system (sub-GHz)OOOOOOOOOOOO---
Table 37. Functionalities depending on system operating mode (1) (continued)
PeripheralRunSleepLPRunLPSleepStop 0Stop 1Stop 2StandbyShutdoVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
Flash memory (up to 256 Kbytes)YO (2)O (3)O (2)
(3)
R-R-R-R-R-R
Flash memory interfaceYYYYR-R-R------
SRAM1YO (2)YO (2)R-R-R------
SRAM2YO (2)YO (2)R-R-R-O (4)----
Backup registersYYYYR-R-R-R-R-R
Brownout reset (BOR)YYYYYYYYYYYY---
Programmable voltage detector (PVD)OOOOOOOOOOO (5)O (5)---
Peripheral voltage monitor (PVM3)OOOOOOOOOO-----
DMAx (x = 1, 2)OOOOR-R--------
DMAMUX1OOOOR-R--------
High-speed internal (HSI16)OOOOO (6)-O (6)-O (6)------
High-speed external (HSE32)OOO (7)O (7)O (7)-O (7)-O (7)-O (7)----
Low-speed internal (LSI)OOOOO-O-O-O----
Low-speed external (LSE)OOOOO-O-O-O-O-O
Multi-speed internal (MSI)OOOOO-O-O------
Clock security system (CSS)OOOOR-R--------
Clock security system on LSEOOOOOOOOOOOO---
RTC/auto wake-upOOOOOOOOOOOOOOO
Number of TAMP tamper pins33333O3O3O3O3O3
USARTx (x= 1, 2)OOOOO (8)O (8)O (8)O (8)-------
Low-power UART (LPUART1)OOOOO (8)O (8)O (8)O (8)O (8)O (8)-----
I2Cx (x = 1, 2)OOOOO (9)O (9)O (9)O (9)-------
I2C3OOOOO (9)O (9)O (9)O (9)O (9)O (9)-----
SPI1OOOOR-R--------
SUBGHZSPIOOOOR-R--------
SPI2S2OOOOR-R--------
ADCOOOOR-R--------
Table 37. Functionalities depending on system operating mode (1) (continued)
PeripheralRunSleepLPRunLPSleepStop 0Stop 1Stop 2StandbyShutdoVBAT
-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability-Wake-up capability
DACOOOOR-R--------
VREFBUFOOOOO-O-R------
COMPx (x = 1, 2)OOOOOOOOOO-----
Temperature sensorOOOOR-R--------
Timers (TIMx) x = 1, 2, 16, 17)OOOOR-R--------
LPTIM1OOOOOOOOOO-----
LPTIMx (x = 2, 3)OOOOOOOO-------
Independent watchdog (IWDG)OOOOOOOOOOOO---
Window watchdog (WWDG)OOOOR-R-R------
SysTick timerOOOOR-R-R------
True random number generator (RNG)O (10)O (1, 0)RRR-R--------
AES hardware acceleratorOOOOR-R--------
PKA hardware acceleratorOOOOR-R--------
CRC calculation unitOOOOR-R-R------
HSEMORORR-R--------
EXTIOOOORORORO-----
GPIOsOOOOOOOOOOR (11)3 pins (12)(13)3 pins (1, 2)-

1. Legend: Y = Yes (enable). O = Optional (disable by default and can be enabled by software). R = data retained. - = Not available. Gray cells indicate wake-up capability.

2. The SRAM clock can be gated on or off.

3. Flash memory can be placed in power-down mode.

4. The SRAM2 content can optionally be retained when the PWR_CR3.RRS bit is set.

5. Only when the sub-GHz radio is active.

6. 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 that requested it. HSI16 is automatically put off when the peripheral does not need it anymore.

7. HSE32 can be used by sub-GHz radio system.

8. UART reception is functional in Stop 0 and 1 modes. LPUART1 reception is functional in Stop 0, 1, and 2 modes. LPUART1 generates a wake-up interrupt on Start address match or received frame event.

9. I2Cx (x = 1, 2) address detection is functional in Stop 0 and 1 modes. I2C3 address detection is functional in Stop 0, 1, and 2 modes. I2C3 generates a wake-up interrupt in case of address match.

  1. 10. Voltage scaling range 1 only.
  2. 11. I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.
  3. 12. The I/Os with wake-up from Standby/Shutdown capability are PA0, PC13 and PB3.
  4. 13. 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.

Relation between MCU and sub-GHz radio operating modes

The CPU and sub-GHz radio have their own operating modes, as defined in the table below.

Table 38. MCU and sub-GHz radio operating modes

CPU operating modeSub-GHz radio operating mode (1)Description
Run, SleepSleep, Calibration, Standby, Active (FS, TX, RX) (2)LDO or SMPS regulator active, MCU running in main regulator (MR) mode.
LPRun, LPSleepDeep-SleepLDO and SMPS regulator off, MCU running in low power regulator (LPR) mode.
Sleep, Calibration, Standby, Active (FS, TX, RX)LDO or SMPS regulator active, MCU running in low power regulator (LPR) mode.
Stop 0Sleep, Calibration, Standby, Active (FS, TX, RX) (2)LDO or SMPS regulator active, MCU running in main regulator (MR) mode.
Stop 1 and Stop 2Deep-SleepLDO and SMPS regulator off, MCU using low power regulator (LPR) mode.
Sleep, Calibration, Standby, Active (FS, TX, RX)LDO or SMPS regulator active, MCU using low power regulator (LPR) mode.
StandbyDeep-SleepLDO and SMPS regulator off, MCU regulator off or on in low power (LPR) mode (3) .
Sleep, Calibration, Standby, Active (FS, TX, RX)LDO or SMPS regulator active, MCU regulator off or on in low power (LPR) mode (3) .
ShutdownDeep-Sleep (4)LDO and SMPS regulator off, MCU regulator off
  1. 1. For more details on sub-GHz radio operating modes, see Section 4: Sub-GHz radio (SUBGHZ) .
  2. 2. In the MCU Run, Sleep and Stop 0 modes, the sub-GHz radio is prevented from entering Deep-Sleep mode.
  3. 3. When retaining SRAM2 in Standby mode, the MCU uses the low-power regulator (LPR) mode.
  4. 4. When the CPU is in Shutdown mode, the sub-GHz radio cannot be activated and is forced in Deep-Sleep mode.

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 because the CPU 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 36.3.6: Serial-wire and JTAG debug port .

In Stop 0 and 1 modes, the EXTI CDBGPWRUPREQ wake-up event can be used to restart the CPU clock by the debugger. For more details, refer to Section 14.3.1: EXTI wake-up interrupt list .

5.4.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 RCC clock configuration register (RCC_CFGR) .

Peripheral clock gating

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

In Sleep mode, to further reduce the power consumption, 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 mode can be performed automatically by resetting the corresponding bits in the RCC_AHBxSMENR and RCC_APBxSMENR registers.

5.4.2 Low-power run mode (LPRun)

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 HCLK bus frequency must not exceed 2 MHz. HPRE and SHDHPRE must be used to divide the SYSCLK frequency (or MSI not exceeding 2 MHz must be used) before entering LPRun mode.


Warning: In LPRun mode, HSE32 cannot be used and must be disabled before entering LPRun mode.


In LPRun mode HSI16 can be used as kernel clock for peripherals and PLL must be disabled.

The device only enters LPRun mode once the low-power regulator is ready. The REGLPS bit can be used to check that the low-power regulator is ready. The REGLPF bit must be used to know if the device is in LPRun mode.

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

I/O states in LPRun mode

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

Enter LPRun mode

To enter the LPRun mode, proceed as follows (refer to Table 39 ):

  1. 1. Jump into the SRAM and power down the flash memory by setting the FPDR bit in the Section 5.5.1: PWR control register 1 (PWR_CR1) (optional).
  2. 2. Disable HSE32 clock.
  3. 3. Decrease the HCLK clock frequencies below 2 MHz.
  4. 4. Force the regulator in low-power mode by setting the LPR bit in the PWR control register 1 (PWR_CR1) .

Exit LPRun mode

To exit the LPRun mode, proceed as follows (refer to Table 39 ):

  1. 1. Force the regulator in main mode by clearing the LPR bit in the PWR control register 1 (PWR_CR1) .
  2. 2. Wait until REGLPF bit is cleared in the Power status register 2 (PWR_SR2) .
  3. 3. Increase the HCLK clock frequency (enable HSE32 clock when needed).

Table 39. LPRun

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

5.4.3 Enter low-power mode

The MCU enters low-power mode following one of these events:

Low-power mode is only be entered if no interrupt or event is pending.

5.4.4 Exit low-power mode

From Sleep and Stop modes, the CPU exits low-power mode depending on the way the mode was entered, as detailed below:

register) must be cleared. Only NVIC interrupts with sufficient priority wake up and interrupt the CPU.

When the CPU 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) must be cleared. All NVIC interrupts wake up the CPU, even the disabled ones. Only enabled NVIC interrupts with sufficient priority wake up and interrupt the CPU.

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.

From Standby and Shutdown modes, the CPU exits low-power mode through an external reset (NRST pin), an IWDG reset, a sub-GHz radio IRQ, a PVD event, an edge on the sub-GHz radio busy signal, an edge on one of the enabled WKUPx pins, an RTC and TAMP event, or a radio event (for Standby only).

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

The system mode when it wakes up from low-power mode can be determined from the C1STOPF, C1STOP2F and C1SBF bits in the PWR extended status and status clear register (PWR_EXTSCR) .

Table 40. CPU wakeup versus system operating mode

System modeCPUCPU wakeup
C1SBFC1STOPFC1STOP2F
Run000Kept running
Stop010Wakeup from Stop 0 or 1
001Wakeup from Stop 2
Standby100Wakeup from Standby
N/AOthersNot valid, does not occur

5.4.5 Sleep mode

I/O states in Sleep mode

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

Enter Sleep mode

The Sleep mode is entered from Run mode according to Enter low-power mode , when the SLEEPDEEP bit in the CPU system control register is cleared (see Table 41 ).

Exit Sleep mode

The MCU exits the Sleep mode (see Table 41 ) as indicated in Exit low-power mode .

Table 41. Sleep mode

Sleep modeDescription
Mode entry

WFI (wait for interrupt) or WFE (wait for event) while:

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

Refer to the Cortex system control register.

On return from ISR while:

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

Refer to the Cortex system control register.

Mode exit

If WFI or return from ISR was used for entry

Interrupt: refer to Table 78: Vector table

If WFE was used for entry and SEVONPEND = 0:

Wake-up event: refer to Table 81: Wake-up interrupts

If WFE was used for entry and SEVONPEND = 1:

Interrupt even when disabled in NVIC: refer to Table 78: Vector table or wake-up event: refer to Table 81: Wake-up interrupts

Wake-up latencyNone

5.4.6 Low-power sleep mode (LPSleep)

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

I/O states in LPSleep mode

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

Enter LPSleep mode

The LPSleep mode is entered from LPRun mode as described in Section 5.4.3: Enter low-power mode , when the SLEEPDEEP bit in the Cortex system control register is clear.

Refer to Table 42 for details on how to enter the LPSleep mode.

Exit LPSleep mode

The LPSleep mode is exited as described in Section 5.4.4: Exit low-power mode . When exiting the LPSleep mode by issuing an interrupt or an event, the MCU is in LPRun mode.

The table below details how to exit the LPSleep mode.

Table 42. LPSleep

LPSleep modeDescription
Mode entry

LPSleep mode is entered from the LPRun 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 system control register.

LPSleep mode is entered from the LPRun mode.
On return from ISR while:

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

Refer to the Cortex system control register.

Mode exit

If WFI or return from ISR was used for entry
Interrupt: refer to Table 78: Vector table

If WFE was used for entry and SEVONPEND = 0:
Wake-up event: refer to Table 81: Wake-up interrupts

If WFE was used for entry and SEVONPEND = 1:
Interrupt even when disabled in NVIC: refer to Table 78: Vector table
Wake-up event: refer to Table 81: Wake-up interrupts

After exiting the LPSleep mode, the MCU is in LPRun mode.

Wake-up latencyNone

5.4.7 Stop 0 mode

The Stop 0 mode is based on the CPU Deep-Sleep 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. PLL, MSI, HSI16 and HSE32 oscillators are disabled. Some peripherals with the wake-up capability (I2Cx (x = 1, 3), USARTx (x = 1, 2) and LPUART1) can switch on HSI16 to receive a frame, and switch off 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.

The BOR and PDR can be activated to sample periodically the supply voltage. This option enabled by setting the ULPEN bit of the PWR_CR3 register allows decreasing the current consumption in this mode, but any drop of the voltage below the operating conditions between two active periods of the supply detector results in a non-generation of PDR reset.

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.

Enter Stop 0 mode

The Stop 0 mode is entered according to Section 5.4.3 , when the SLEEPDEEP bit in the Cortex system control register is set (see Table 43 ).

If flash memory programming is ongoing, the Stop 0 mode entry is delayed until the operation is completed.

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

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

Several peripherals can be used in Stop 0 mode and can add consumption if they are enabled and clocked by LSI or LSE: LPTIMx (x = 1, 2, 3), I2Cx (x = 1, 2, 3), USARTx (x = 1, 2), LPUART1.

In Stop 0 mode, when HSIKERON is enabled, the wake-up capabilities of some peripherals are also available when clocked by HSI16: I2Cx (x = 1, 2, 3), USARTx (x = 1, 2) or LPUART1.

The comparators can be used in Stop 0 mode, PWM3 and PVD as well. If they are not needed, they must be disabled by software to save their power consumption.

ADC, temperature sensor and VREFBUF buffer can consume power during the Stop 0 mode, unless they are disabled before entering this mode.

Exit Stop 0 mode

The Stop 0 mode is exited according to what is indicated in Section 5.4.4 (see Table 43 for details).

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 RCC 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 enables a wake-up at higher frequency, up to 48 MHz.

When the voltage regulator operates in low-power mode, an additional startup delay is incurred when waking up from Stop 0 mode with HSI16. By keeping the internal regulator on during Stop 0 mode, the consumption is higher but the startup time is reduced.

When exiting the Stop 0 mode, the MCU is either in Run mode (range 1 or range 2 depending on VOS bit in PWR control register 1 (PWR_CR1) ) or in LPRun mode if the bit LPR is set in the same register.

Table 43. Stop 0 mode

Stop 0Description
Mode entry

WFI (wait for interrupt) or WFE (wait for event) while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = 0b000 in PWR_CR1

On return from ISR while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = 0b000 in PWR_CR1

Note: To enter Stop 0 mode, all EXTI line pending bits (in EXTI pending register (EXTI_PR1)), 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 78: Vector table .

If WFE was used for entry and SEVONPEND = 0:

Any EXTI line configured in event mode. Refer to Table 81: Wake-up interrupts .

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 78: Vector table .

Wake-up event: refer to Table 81: Wake-up interrupts .

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

5.4.8 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 LPRun mode. The device only enters Stop 1 mode once the low-power regulator is ready. The

REGLPS bit can be used to check that the low-power regulator is ready (see the table below).

Table 44. Stop 1 mode

Stop 1Description
Mode entry

WFI (wait for interrupt) or WFE (wait for event) while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = 0b001 in PWR_CR1

On return from ISR while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = 0b001 in PWR_CR1

Note: To enter Stop 1 mode, all EXTI line pending bits (in EXTI pending register (EXTI_PR1)), 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 78: Vector table .

If WFE was used for entry and SEVONPEND = 0:

Any EXTI line configured in event mode. Refer to Section 14.4.1: EXTI configurable 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 78: Vector table .

Wake-up event: refer to Table 81: Wake-up interrupts

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

5.4.9 Stop 2 mode

The Stop 2 mode is based on the CPU Deep-Sleep mode combined with peripheral clock gating and partial power down of the V CORE domain. In Stop 2 mode, all clocks in the V CORE domain are stopped. PLL, MSI, HSI16 and HSE32 oscillators are disabled. Some of the logic is powered down except for the CPU and some peripherals with wake-up capability (I2C3, LPTIM1 and LPUART1), that can switch on the HSI16 to receive a frame, and switch off 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. The Stop 2 mode uses the low-power regulator, hence the device only enters Stop 2 mode once the low-power regulator is ready. The REGLPS bit can be used to check that the low-power regulator is ready.

SRAM1, SRAM2, PWR, flash memory interface, RCC, EXTI, IWDG, WWDG, GPIO, CRC, SYSCFG, RTC and TAMP contents and registers in the backup domain are also preserved. The content of all other peripherals is reset and must be reprogrammed.

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

The BOR and PDR can be activated to sample periodically the supply voltage. This option enabled by setting the ULPEN bit of the PWR_CR3 register allows the current consumption to be decreased in this mode, but any drop of the voltage below the operating conditions between two active periods of the supply detector, results in a non-generation of PDR reset.

Note: The comparators, LPUART1 and LPTIM1 outputs are forced to low speed (OSPEEDy = 0b00) during the Standby mode.

I/O states in Stop 2 mode

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

Enter Stop 2 mode

The Stop 2 mode is entered as described in Section 5.4.3 , when the SLEEPDEEP bit in the Cortex system control register is set (see Table 45 ).

Stop 2 mode can only be entered from Run mode. It is not possible to enter Stop 2 mode from the LPRun 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.

Several peripherals can be used in Stop 2 mode and can add consumption if they are enabled and clocked by LSI or LSE: LPTIM1, I2C3 and LPUART1.

In Stop 2 mode, when HSIKERON is enabled, the wake-up capabilities of some peripherals are also available when clocked by HSI16: I2C3 or LPUART1.

The comparators can be used in Stop 2 mode, PWM3 and PVD as well. If they are not needed, they must be disabled by software to save their power consumption.

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

All the peripherals that cannot be used in Stop 2 mode are powered down.

Exit Stop 2 mode

The Stop 2 mode is exited according to Section 5.4.4 (see Table 45 ).

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 RCC 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 a wake-up at higher frequency, up to 48 MHz,

The STOP2F status flag in the PWR control register 3 (PWR_CR3) indicates that the MCU was in Stop 2 mode. All non retained registers are reset after wake-up from Stop 2. 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 45. Stop 2 mode

Stop 2Description
Mode entry

WFI (wait for interrupt) or WFE (wait for event) while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = 0b010 in PWR_CR1

On return from ISR while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = 0b010 in PWR_CR1

Note: To enter Stop 2 mode, all EXTI line pending bits in EXTI pending register (EXTI_PR1), and EXTI pending register (EXTI_PR2), and the peripheral flags generating wake-up interrupts must be cleared. Otherwise, the Standby mode entry procedure is ignored and program execution continues.

Mode exit

Any EXTI line configured in Interrupt mode or event mode (regardless if the corresponding EXTI interrupt vector is enabled in the NVIC). The interrupt source can be external interrupts or peripherals with wake-up capability. Refer to Table 78: Vector table .

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.

5.4.10 Standby mode

The Standby mode allows the lowest power consumption to be achieved with BOR. It is based on the CPU Deep-Sleep mode, with the voltage regulators disabled (except when SRAM2 content is preserved). PLL, HSI16, MSI and HSE32 oscillators are also switched off.

SRAM1 and register contents are lost except for registers in the backup domain and Standby circuitry (see Figure 14 ). SRAM2 content can be preserved if the bit RRS is set in the PWR control register 3 (PWR_CR3) . In this case the low-power regulator is enabled and provides the supply to SRAM2 only. When the SRAM2 retention is enabled the device only enters Standby mode once the low-power regulator is ready. The REGLPS bit can be used to check that the low-power regulator is ready. Immediately exiting from Standby mode with SRAM2 retention may be delayed until the low-power regulator is ready.

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

BOR and PDR can be activated to sample periodically the supply voltage. This option enabled by setting the ULPEN bit of the PWR_CR3 register allows the current consumption to be decreased in this mode, but any drop of the voltage below the operating conditions between two active periods of the supply detector results in a non-generation of PDR reset.

I/O states in Standby mode

In Standby mode, the I/Os can be configured either with a pull-up (refer to PWR_PUCRx registers (x = A, B, C, H)), or with a pull-down (refer to PWR_PDCRx registers (x = A, B, C, H)), or can be kept in analog state.

The RTC output on PC13 only is functional in Standby mode. PC14 and PC15 used for LSE are also functional. Three wake-up pins (WKUPx, x = 1, 2, 3) and the three TAMP tampers are available.

The sub-GHz radio is functional and PVD can be enabled.

Enter Standby mode

The Standby mode is entered according to Section 5.4.3 , when the SLEEPDEEP bit in the Cortex system control register is set (see Table 46 for details).

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

Exit Standby mode

The Standby mode is exited according to Section 5.4.4 . The SBF status flags (CnSBF) in the PWR extended status and status clear register (PWR_EXTSCR) indicate that the MCU was in Standby mode. All registers are reset after wake-up from Standby except for PWR extended status and status clear register (PWR_EXTSCR) .

Refer to the table below for more details on how to exit Standby mode.

Table 46. Standby mode

StandbyDescription
Mode entry

WFI (wait for interrupt) or WFE (wait for event) while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = 0b011 in PWR_CR1
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)

On return from ISR while:

  • – SLEEPDEEP bit is set in Cortex system control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = 0b011 in PWR_CR1
  • – Radio IRQ is cleared in the sub-GHz radio.
  • – WPVDF, WRFBUSY and WUFX bits are cleared in power status register 1 (PWR_SR1)
  • – RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, synchronous binary counter or timestamp flags) is cleared
  • – TAMP flags ITAMPxF and TAMPxF are cleared.
Mode exitPVD event, RFIRQ interrupt, RFBUSY wake-up event, WKUPx pin edge, RTC and TAMP event, external reset in NRST pin, IWDG reset, BOR reset
Wake-up latencyReset phase

5.4.11 Shutdown mode

The lowest power consumption can be reached in Shutdown mode. It is based on the Deep-Sleep mode, with the voltage regulator disabled. The V CORE domain is consequently powered off. PLL, HSI16, MSI, LSI and HSE32 oscillators are also switched off.

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

I/O states in Shutdown mode

In Shutdown mode, the I/Os can be configured either with a pull-up (refer to PWR_PUCRx registers (x = A, B, C, H), or with a pull-down (refer to PWR_PDCRx registers (x = A, B, C, H)), or can be kept in analog state. However this configuration is lost when exiting the Shutdown mode due to the power-on reset.

The RTC output on PC13 only is functional in Shutdown mode. PC14 and PC15 used for LSE are also functional. Three wake-up pins (WKUPx, x = 1, 2, 3) and the three TAMP tampers are available.

Enter Shutdown mode

The Shutdown mode is entered according Section 5.4.3 , when the SLEEPDEEP bit in the Cortex system control register is set (see Table 47 for details).

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

Caution: In case of \( V_{DD} \) power-down, the RTC content is lost.

Exit Shutdown mode

The Shutdown mode is exited according Section 5.4.4 . 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 the table below for more details on how to exit Shutdown mode.

Table 47. Shutdown mode

Shutdown modeDescription
Mode entryWFI (wait for interrupt) or WFE (wait for event) while:
  • – SLEEPDEEP bit is set in Cortex system control register
  • – No interrupt (for WFI) or event (for WFE) is pending
  • – LPMS = 0b1xx in PWR_CR1
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
On return from ISR while:
  • – SLEEPDEEP bit is set in Cortex system control register
  • – SLEEPONEXT = 1
  • – No interrupt is pending
  • – LPMS = 0b1xx in PWR_CR1
  • – Radio IRQ is cleared in the sub-GHz radio.
  • – WPVDF, WRFBUSY and WUFX bits are cleared in power status register 1 (PWR_SR1)
  • – The RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, synchronous binary counter or timestamp flags) is cleared
  • – TAMP flags ITAMPxF and TAMPxF are cleared.
Mode exitWKUPx pin edge, RTC and TAMP event, external reset in NRST pin
Wake-up latencyReset phase

5.4.12 Auto-wake-up 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-wake-up 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, the

following alternative RTC clock sources can be selected by programming the RTCSEL[1:0] bits in the RCC backup domain control register (RCC_BDCR) :

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

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

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

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

5.5 PWR registers

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

5.5.1 PWR control register 1 (PWR_CR1)

This register is reset after wake-up from Standby mode, except for bit field LPMS[2:0].

Access: additional APB cycles are used to access this register versus those used for a standard APB access (three for a write and two for a read).

Address offset: 0x000

Reset value: 0x0000 0200

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.LPRRes.Res.Res.VOS[1:0]DBPRes.Res.FPDSFPDRSUBGHZPINSENSELLPMS[2:0]
rwrwrwrwrwrw

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

Bit 14 LPR: LPRun

When this bit is set, the supply mode is switched from main regulator mode (MR) to low-power regulator 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

Previous voltage range change must be completed before chaining voltage range again.

0b00: Cannot be written (forbidden by hardware)

0b01: Range 1

0b10: Range 2

0b11: 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 FPDS: Flash memory power-down mode during LPSleep

This bit selects whether the flash memory is in Power-down mode or Idle mode when the CPU is in Sleep mode. flash memory is only set in power-down mode when the system is in LPSleep mode.

0: Flash memory in Idle mode when system is in LPSleep mode

1: Flash memory in Power-down mode when system is in LPSleep mode

Bit 4 FPDR: Flash memory power-down mode during LPRun

This bit can only be written to 1 after unlocking this register bit, by first writing (code 0xC1B0) into this register (when writing the code, the register bits are not updated). Selects whether the flash memory is in power-down mode or Idle mode when in LPRun mode. (flash memory can only be in power-down mode when code is executed from SRAM). Flash memory is only set in power-down mode when the system is in LPRun mode.

0: Flash memory in Idle mode when system is in LPRun mode

1: Flash memory in Power-down mode when system is in LPRun mode

Bit 3 SUBGHZSPINSSSEL: sub-GHz SPI NSS source select

This bit is set and cleared by software.

0: sub-GHz SPI NSS signal driven from PWR_SUBGHZSPICR.NSS (RFBUSYMS functionality enabled)

1: sub-GHz SPI NSS signal driven from LPTIM3_OUT (RFBUSYMS functionality disabled)

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

These bits are not reset when exiting Standby mode.

These bits select the low-power mode allowed when CPU enters the Deep -Sleep 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 must be entered instead of Stop 2.

In Standby mode, SRAM2 is preserved, depending on RRS bit configuration in PWR_CR3.

5.5.2 PWR control register 2 (PWR_CR2)

This register is reset when exiting the Standby mode.

Address offset: 0x004

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.PVME3Res.Res.PLS[2:0]PVDE
rwrwrwrwrw

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

Bit 6 PVME3 : Peripheral voltage monitoring 3 enable: \( V_{DDA} \) versus 1.62 V

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

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

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

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

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.

5.5.3 PWR control register 3 (PWR_CR3)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x008

Reset value: 0x0000 8000

31302928272625242322212019181716
ResResResResResResResResResResResResResResResRes
1514131211109876543210
EIWULRes.EWRFIRQRes.EWRFBUSYAPCRRSEWVPDULPENRes.Res.Res.Res.EWJP3EWJP2EWJP1
rwrwrwrwrwrwrwrwrwrw

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

Bit 15 EIWUL : internal wake-up line for CPU enable

0: Internal wake-up line interrupt to CPU disabled

1: Internal wake-up line interrupt to CPU enabled

Bit 14 Reserved, must be kept at reset value.

Bit 13 EWRFIRQ : radio IRQ[2:0] wake-up for CPU enable

When this bit is set, the radio IRQ[2:0] is enabled and triggers a wake-up from Standby event to CPU.

Bit 12 Reserved, must be kept at reset value.

Bit 11 EWRFBUSY : radio busy wake-up from Standby for CPU enable

When this bit is set, the radio busy is enabled and triggers a wake-up from Standby event to CPU when a rising or a falling edge occurs. The active edge is configured via the WRFBUSYP bit in the PWR control register 4 (PWR_CR4) .

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

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.

Bit 9 RRS : SRAM2 retention in Standby mode

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

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

Bit 8 EWVPD : PVD and wake-up for CPU enable (when sub-GHz radio in active state)

This bit is set and reset by software.

When this bit is set, the PVD is enabled while the sub-GHz radio is active and triggers an interrupt and wake-up from Stop, Standby event to CPU, when the voltage level drops below the PVD threshold level.

0: PVD not enabled by the sub-GHz radio active state

1: PVD enabled while the sub-GHz radio is active

Bit 7 ULPEN : Ultra-low-power enable

Enable/disable periodical sampling of supply voltage in Stop and Standby modes for detecting condition of PDR and BOR reset.

0: Disable (the supply voltage is monitored continuously)

1: Enable, when set, the supply voltage is sampled for PDR/BOR reset condition only periodically and not continuously, in order to save power. The sampling period is typically 12 ms, but is strongly linked to the temperature (the period decreases when the temperature increases).

Caution: When enabled and if the supply voltage drops below the minimum operating condition between two supply voltage samples, the reset condition is missed and no reset is generated.

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

Bit 2 EWUP3 : Wake-up pin WKUP3 for CPUenable

When this bit is set, the external wake-up pin WKUP3 is enabled and triggers an interrupt and wake-up from Stop, Standby or Shutdown event when a rising or a falling edge occurs to CPU. The active edge is configured via the WP3 bit in the PWR control register 4 (PWR_CR4) .

Bit 1 EWUP2 : Wake-up pin WKUP2 for CPUenable

When this bit is set, the external wake-up pin WKUP2 is enabled and triggers an interrupt and wake-up from Stop, Standby or Shutdown event when a rising or a falling edge occurs to CPU. The active edge is configured via the WP2 bit in the PWR control register 4 (PWR_CR4) .

Bit 0 EWUP1 : Wake-up pin WKUP1 for CPU enable

When this bit is set, the external wake-up pin WKUP1 is enabled and triggers an interrupt and wake-up from Stop, Standby or Shutdown event when a rising or a falling edge occurs to CPU. The active edge is configured via the WP1 bit in the PWR control register 4 (PWR_CR4) .

5.5.4 PWR control register 4 (PWR_CR4)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x00C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.WRFBUSYPRes.VBRSVBERes.Res.Res.Res.Res.WP3WP2WP1
rwrwrwrwrwrw

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

Bit 11 WRFBUSYP : Wake-up radio busy polarity

This bit defines the polarity used for an event detection on radio busy signal.

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

Bit 10 Reserved, must be kept at reset value.

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

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

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

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

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

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

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

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)

5.5.5 PWR status register 1 (PWR_SR1)

This register is not reset when exiting Standby modes.

Access: two additional APB cycles are needed to read this register versus a standard APB read.

Address offset: 0x010

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
WUFIRes.Res.Res.WRFBUSYFRes.Res.WPVDFRes.Res.Res.Res.Res.WUF3WUF2WUF1
rrrrrr

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

Bit 15 WUFI : Internal wake-up interrupt flag

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.

Bit 11 WRFBUSYF : Radio busy wake-up flag

This bit is set when a wake-up event is detected on radio busy. It is cleared by writing '1' in the CWRFBUSYF bit of the PWR_SCR register.

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

Bit 8 WPVDF : Wake-up PVD flag

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

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

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 status clear register (PWR_SCR) .

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 status clear register (PWR_SCR) .

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 status clear register (PWR_SCR) .

5.5.6 Power status register 2 (PWR_SR2)

This register is partially reset when exiting Standby/Shutdown modes.

Address offset: 0x014

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.PVMO3Res.Res.PVDOVOSFREGLPFREGLPSFLASHRDYREGMRSRFEOLFLDORDYSMPSRDYRFBUSYMSRFBUSYSRes.
rrrrrrrrrrrr

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

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

0: \( V_{DDA} \) voltage above PVM3 threshold (around 1.62 V)

1: \( V_{DDA} \) voltage below PVM3 threshold (around 1.62 V)

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

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

Bit 11 PVDO : Programmable voltage detector output

0: \( V_{DD} \) or voltage level on PVD_IN above the selected PVD threshold

1: \( V_{DD} \) or voltage level on PVD_IN 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 control register 1 (PWR_CR1) .

0: regulator ready in the selected voltage range

1: regulator output voltage changed to the required voltage level

Bit 9 REGLPF: low-power regulator flag

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

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

0: main regulator (MR) ready and used

1: low-power regulator (LPR) used

Bit 8 REGLPS: low-power regulator started (ready)

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 ("backup" SRAM2 disabled), the wake-up time from Standby mode may be increased.

0: LPR not ready

1: LPR ready

Bit 7 FLASHRDY: Flash memory ready

This bit is set by hardware when the flash memory can be accessed by software after a software controlled flash power down (in LPRun mode). This bit is cleared by hardware when the flash memory is powered down.

0: Flash memory not ready to be accessed

1: Flash memory ready to be accessed

Bit 6 REGMRS: Main regulator status

This bit is set by hardware when the main regulator is supplied by the LDO or SMPS when enabled. When this bit is cleared the main regulator is directly supplied from \( V_{DD} \) .

0: main regulator supplied directly from \( V_{DD} \)

1: main regulator supplied through LDO or SMPS

Bit 5 RFEOLF: Radio end-of-life flag

When enabled by RFEOLEBN, this bit indicates that the supply voltage reached the radio end-of-life operating low level.

0: Supply voltage below radio end-of-life operating low level

1: Supply voltage above radio end-of-life operating low level

Bit 4 LDORDY: LDO ready flag

This bit indicates that the LDO is ready.

0: LDO not ready or off

1: LDO ready

Bit 3 SMPSRDY: SMPS ready flag

This bit indicates that the SMPS step-down converter is ready.

0: SMPS step-down converter not ready or off

1: SMPS step-down converter ready

Bit 2 RFBUSYMS: Radio busy masked signal status

This bit indicates the actual status of the radio busy masked signal.

0: radio busy masked signal low (not busy)

1: radio busy masked signal high (busy)

Bit 1 RFBUSYS: Radio busy signal status

This bit indicates the actual status of the radio busy signal.

0: radio busy signal low (not busy)

1: radio busy signal high (busy)

Bit 0 Reserved, must be kept at reset value.

5.5.7 PWR status clear register (PWR_SCR)

Access: three additional APB cycles are needed to write this register versus a standard APB write.

Address offset: 0x018

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.CWRFBUSYFRes.Res.CWPVDFRes.Res.Res.Res.Res.CWUF3CWUF2CWUF1
wwwww

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

Bit 11 CWRFBUSYF : Clear wake-up radio busy flag

Setting this bit clears the WRFBUSYF flag in the PWR_SR1. This bit is always read 0.

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

Bit 8 CWPVDF : Clear wake-up PVD interrupt flag

Setting this bit clears the WPVDF flag in the PWR_SR1. This bit is always read as 0.

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

Bit 2 CWUF3 : Clear wake-up flag 3

Setting this bit clears the WUF3 flag in the PWR_SR1 register. This bit is always read as 0.

Bit 1 CWUF2 : Clear wake-up flag 2

Setting this bit clears the WUF2 flag in the PWR_SR1 register. This bit is always read as 0.

Bit 0 CWUF1 : Clear wake-up flag 1

Setting this bit clears the WUF1 flag in the PWR_SR1 register. This bit is always read as 0.

5.5.8 PWR control register 5 (PWR_CR5)

This register is not reset when exiting Standby modes.

Access: three additional APB cycles are needed to write this register versus a standard APB write.

Address offset: 0x01C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
SMPSENRFEOLENRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw

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

Bit 15 SMPSEN : SMPS step-down converter enable

This bit enables the SMPS step-down converter.

0: SMPS step-down converter SMPS mode disabled (LDO mode enabled)

1: SMPS step-down converter SMPS mode enabled

Caution: Before enabling the SMPS, the SMPS clock detection must be enabled in SUBGHZ_SMPCOR.CLKDE, if the application uses an external HSE clock source (not coming from XO or TCXO but from another device).

Bit 14 RFEOLEN : sub-GHz radio end-of-life detector enable

0: Radio end-of-life detector disabled

1: Radio end-of-life detector enabled

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

5.5.9 PWR port A pull-up control register (PWR_PUCRA)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x020

Reset value: 0x0000 0000

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

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

Bits 15:0 PU[15:0] : Port PA[y] pull-up bit y (y = 0 to 15)

When set, each bit activates the pull-up on PA[y] when both APC bits are set in PWR control register 3 (PWR_CR3) . The pull-up is not activated if the corresponding PA[y] bit is also set.

5.5.10 PWR port A pull-down control register (PWR_PDCRA)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x024

Reset value: 0x0000 0000

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

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

Bits 15:0 PD[15:0] : Port PA[y] pull-down (y = 0 to 15)

When set, each bit activates the pull-down on PA[y] when both APC bits are set in PWR control register 3 (PWR_CR3) .

5.5.11 PWR port B pull-up control register (PWR_PUCRB)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x028

Reset value: 0x0000 0000

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

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

Bits 15:0 PU[15:0] : Port PB[y] pull-up (y = 0 to 15)

When set, each bit activates the pull-up on PB[y] when both APC bits are set in PWR control register 3 (PWR_CR3) . The pull-up is not activated if the corresponding PB[y] bit is also set.

5.5.12 PWR port B pull-down control register (PWR_PDCRB)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x02C

Reset value: 0x0000 0000

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

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

Bits 15:0 PD[15:0] : Port PB[y] pull-down (y = 0 to 15)

When set, each bit activates the pull-down on PB[y] when both APC bits are set in PWR control register 3 (PWR_CR3) .

5.5.13 PWR port C pull-up control register (PWR_PUCRC)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x030

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PU15PU14PU13Res.Res.Res.Res.Res.Res.PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrw

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

Bits 15:13 PU[15:13] : Port PC[y] pull-up (y = 13 to 15)

When set, each bit activates the pull-up on PC[y] when both APC bits are set in PWR control register 3 (PWR_CR3) . The pull-up is not activated if the corresponding PC[y] bit is also set.

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

Bits 6:0 PU[6:0] : Port PC[y] pull-up (y = 0 to 6)

When set, each bit activates the pull-up on PC[y] when both APC bits are set in PWR control register 3 (PWR_CR3) . The pull-up is not activated if the corresponding PC[y] bit is also set.

5.5.14 PWR port C pull-down control register (PWR_PDCRC)

This register is not reset when exiting Standby modes.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x034

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PD15PD14PD13Res.Res.Res.Res.Res.Res.PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrw

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

Bits 15:13 PD[15:13] : Port PC[y] pull-down (y = 13 to 15)

When set, each bit activates the pull-down on PC[y] when both APC bits are set in PWR control register 3 (PWR_CR3) .

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

Bits 6:0 PD[6:0] : Port PC[y] pull-down bit y (y = 0 to 6)

When set, each bit activates the pull-down on PC[y] when both APC bits are set in .

5.5.15 PWR port H pull-up control register (PWR_PUCRH)

This register is not reset when exiting Standby modes and with PWRRST bit in the RCC_APB1RSTR1 register.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x058

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU3Res.Res.Res.
rw

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

Bit 3 PU3 : Port PH[3] pull-up

When set, this bit activates the pull-up on PH[3] when both APC bit are set in PWR control register 3 (PWR_CR3) . The pull-up is not activated if the corresponding PH[3] bit is also set.

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

5.5.16 PWR port H pull-down control register (PWR_PDCRH)

This register is not reset when exiting Standby modes and with PWRRST bit in the RCC_APB1RSTR1 register.

Access: additional APB cycles are needed to access this register versus those needed for a standard APB access (three for a write and two for a read).

Address offset: 0x05C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD3Res.Res.Res.
rw

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

Bit 3 PD3 : Port PH[3] pull-down

When set, this bit activates the pull-down on PH[3] when both APC bits are set in PWR control register 3 (PWR_CR3) .

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

5.5.17 PWR extended status and status clear register (PWR_EXTSCR)

Access: three additional APB cycles are needed to write this register versus a standard APB write.

Address offset: 0x088

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.C1DSRes.Res.Res.C1STO
PF
C1STO
P2F
C1SBFRes.Res.Res.Res.Res.Res.Res.C1CSS
F
rrrrw

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

Bit 14 C1DS : CPU Deep-Sleep mode

This bit is set by hardware when CPU enters Deep-Sleep mode.

0: CPU is running or in sleep

1: CPU is in Deep-Sleep

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

Bit 10 C1STOPF : System Stop 0, 1 flag for CPU (all core states retained)

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

0: System has not been in Stop 0 or 1 mode

1: System has been in Stop 0 or 1 mode.

Bit 9 C1STOP2F : System Stop 2 flag for CPU (partial core states retained)

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

0: System has not been in Stop 2 mode

1: System has been in Stop 2 mode.

Bit 8 C1SBF : System Standby flag for CPU (no core states retained)

This bit is set by hardware and cleared only by a POR reset or by setting C1CSSF bit.

0: System has not been in Standby mode

1: System has been in Standby mode.

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

Bit 0 C1CSSF : Clear CPU Stop Standby flags

Setting this bit clears the C1STOPF and C1SBF bits.

5.5.18 PWR sub-GHz SPI control register (PWR_SUBGHZSPICR)

Address offset: 0x090

Reset value: 0x0000 8000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
NSSRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rw

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

Bit 15 NSS : sub-GHz SPI NSS control

This bit is set and cleared by software and is used to control the sub-GHz SPI NSS level from software.

0: sub-GHz SPI NSS signal at level low

1: sub-GHz SPI NSS signal is at level high

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

5.5.19 PWR register map

Table 48. PWR register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x000PWR_CR1Res.LPRRes.VOS [1:0]Res.DBPRes.Res.FPDSFPDRSUBGHZSPINSSSELLPMS [2:0]
Reset value001000000
0x004PWR_CR2Res.PVME3Res.PLS [2:0]PVDE
Reset value00000
0x008PWR_CR3Res.EIWULRes.EWRFIRQRes.EWRFBUSYRes.APCRRSEWPVDULPENRes.EWUP3EWUP2EWUP1
Reset value10000000000
0x00CPWR_CR4Res.WRFBUSYPRes.VBRVBERes.WP3WP2WP1
Reset value000000
0x010PWR_SR1Res.WUFIRes.WRFBUSYFRes.Res.WPVDFRes.WUF3WUF2WUF1
Reset value000000
0x014PWR_SR2Res.Res.PVMO3Res.PVDOVOSFREGLPFREGLPSFLASHRDYREGMRSRFEOLFLDORDYSMPSRDYRFBUSYMSRFBUSYSRes.
Reset value000000000000
0x018PWR_SCRRes.CWRFBUSYFRes.Res.CWPVDFRes.CWUF3CWUF2CWUF1
Reset value00000
0x01CPWR_CR5Res.SMPSENRFEOLE NRes.
Reset value00
0x020PWR_PUCRARes.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
Reset value0000000000000000
0x024PWR_PDCRARes.PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
Reset value0000000000000000
0x028PWR_PUCRBRes.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
Reset value0000000000000000

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

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x02CPWR_PDCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.oooooooooooooooo
Reset value
0x030PWR_PUCRCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.oooooooooooooooo
Reset value
0x034PWR_PDCRCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.oooooooooooooooo
Reset value
0x058PWR_PUCRHRes.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.ooo
Reset value
0x05CPWR_PDCRHRes.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.ooo
Reset value
0x088PWR_EXTSCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value
0x090PWR_SUBGHZSPICRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value
Refer to Section 2.4 for the register boundary addresses.