6. Power control (PWR)

6.1 Power supplies

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

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

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

Figure 7. Power supply overview

Figure 7: Power supply overview diagram showing internal components like BORH, POR, SMPS, LP REG, RFLDO, MLDO, and a battery switch connected to V_BAT and various voltage rails (V_LP, V_RF, V_MAIN, V_DDO, V_DDI).

This block diagram illustrates the internal power supply architecture. At the top, a battery switch connects \( V_{BAT} \) to \( V_{DDSMPS}/V_{DD} \) . Below this, the \( V_{DDSMPS}/V_{DD} \) rail connects to a BORH block, a POR block, and an SMPS block. The SMPS block has 'en' and 'mode' inputs and outputs \( V_{LXSMPS} \) and \( V_{FBSMPS} \) . A feedback loop with an inductor and capacitor connects \( V_{FBSMPS} \) back to the SMPS. The SMPS also connects to a block labeled "> 1.4V and SMPS/Bypass OK". Below the SMPS are three LDO blocks: LP REG, RFLDO, and MLDO. The LP REG outputs \( V_{LP} \) , the RFLDO outputs \( V_{RF} \) , and the MLDO outputs \( V_{MAIN} \) . The MLDO has an 'en' input from the "> 1.4V and SMPS/Bypass OK" block. A 'FW mode' signal is shown between BORH and the SMPS. At the bottom, a switch matrix connects \( V_{LP} \) , \( V_{RF} \) , and \( V_{MAIN} \) to \( V_{DDO} \) and \( V_{DDI} \) rails, with a \( V_{BKP} \) input. The diagram is labeled MS44477V2.

Figure 7: Power supply overview diagram showing internal components like BORH, POR, SMPS, LP REG, RFLDO, MLDO, and a battery switch connected to V_BAT and various voltage rails (V_LP, V_RF, V_MAIN, V_DDO, V_DDI).

As shown in Figure 8, different supply configurations are supported, controlled according to the scheme of Table 21.

Figure 8. Supply configurations

Figure 8: Supply configurations diagram showing two options: SMPS supply and LDO supply, both featuring an SMPS step-down converter feeding into Main LDO, RF LDO, and LP Reg blocks.

This diagram shows two supply configuration options. The left side, labeled 'SMPS supply', shows an SMPS step-down converter connected to \( V_{DD} \) and \( V_{DDSMPS} \) . Its output \( V_{LXSMPS} \) is connected through an external inductor to the Main LDO, RF LDO, and LP Reg blocks. The feedback pin \( V_{FBSMPS} \) is connected to this same node, which is also decoupled by a capacitor to ground. The right side, labeled 'LDO supply', shows the same SMPS step-down converter connected to \( V_{DD} \) and \( V_{DDSMPS} \) . In this configuration, the \( V_{LXSMPS} \) and \( V_{FBSMPS} \) pins are not connected to an external inductor/capacitor network. The Main LDO, RF LDO, and LP Reg blocks are powered directly from \( V_{DD} \) . Both diagrams are labeled MS44478V3.

Figure 8: Supply configurations diagram showing two options: SMPS supply and LDO supply, both featuring an SMPS step-down converter feeding into Main LDO, RF LDO, and LP Reg blocks.

The SMPS step-down converter operating mode depends upon the SMPSEN setting in PWR control register 5 (PWR_CR5) and upon the system operating modes Run, Stop0, Stop1, Stop2, Standby, and Shutdown.

Table 21. Supply configuration control

Supply configurationSMPSENSystem operating modeDescription
Default0NASMPS in Bypass mode
SMPS supply1 (1)RunSMPS in SMPS mode
Stop0
Stop1SMPS in Open mode
Standby and Shutdown
LDO supply0 (2)AnySMPS in Bypass mode
  1. 1. When SMPS step-down converter SMPS mode is enabled, it is good practice to enable the BORH to monitor the supply.
  2. 2. In LDO supply the SMPS must not be enabled, or the product can be permanently damaged.

Two specific features have been added to this step-down SMPS in association with the supported low power modes:

The internal state machine manages these states automatically when entering and exiting the low power modes.

After a POR reset the SMPS step-down converter is in Bypass mode.

During Stop1, and Standby the SMPS step-down converter is put in the Open mode by hardware (see Table 21 ). When exiting from low-power modes (except Shutdown) the SMPS step-down converter is set by hardware to the mode selected by the SMPSEN bit (SMPS mode or Bypass). The SMPSEN bit in PWR control register 5 (PWR_CR5) is retained in Standby mode.

When the SMPS step-down converter is in SMPS mode the BORH can be configured, with BORHC in PWR control register 5 (PWR_CR5) , to enable switching on the fly when the supply drops below the SMPS step-down converter SMPS mode operating supply level. When the \( V_{DD} \) supply drops below the selected BORH threshold level the SMPS step-down converter is forced in Bypass mode, register bit SMPSEN is cleared. A SMPSFBF interrupt is generated when enabled. When the \( V_{DD} \) supply rises above the BORH threshold level, a BORHF interrupt is generated when enabled. It is up to the software to switch the SMPS step-down converter back to SMPS mode.

When the SMPS step-down converter is disabled SMPSEN is 0, the SMPS step-down converter is in Bypass mode and the application LDO mode can be used.

6.1.1 Independent analog peripherals supply

To improve 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 \( 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 one threshold (1.65 V for PVM3), refer to Section 6.2.3 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.

The noise performance of analog signals may be impacted by the integrated SMPS switching. To prevent this the SMPS may be switched off on the fly when measuring analog signals.

6.1.2 Battery backup domain

To retain the content of the Backup registers and supply the RTC function when \( V_{DD} \) is turned off, the \( V_{BAT} \) pin can be connected to an optional backup voltage supplied by a battery or by another source.

The \( V_{BAT} \) pin powers the RTC unit, the LSE oscillator and the PC14 to PC15 I/Os, allowing the RTC to operate even when the main power supply is turned off. The switch to the \( V_{BAT} \) supply is controlled by the power-down reset embedded in the Reset block.


Warning: During \( t_{RSTTEMPO} \) (temporization at \( V_{DD} \) startup) or after a PDR has been detected, the power switch between \( V_{BAT} \) and \( V_{DD} \) remains connected to \( V_{BAT} \) .
During the startup phase, if \( V_{DD} \) is established in less than \( t_{RSTTEMPO} \) (refer to the datasheet for its value) and \( V_{DD} > V_{BAT} + 0.6 \) V, a current may be injected into \( V_{BAT} \) through an internal diode connected between \( V_{DD} \) and the power switch ( \( V_{BAT} \) ).
If the power supply / battery connected to the \( V_{BAT} \) pin cannot support this current injection, it is 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} \) to \( V_{DD} \) supply, and add a 100 nF external ceramic decoupling capacitor on \( V_{BAT} \) pin.

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

Note: As the analog switch can transfer only a limited amount of current (3 mA), the use of GPIO PC14 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 cannot be used as current sources (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 registers and backup registers) is protected against possible unwanted write accesses. To enable access to the backup domain, set the DBP bit in the PWR control register 1 (PWR_CR1) 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 upon 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.

6.1.3 Voltage regulator

Two embedded linear voltage regulators supply all the digital circuitries, except for the Standby circuitry and the backup domain.

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

off.

6.2 Power supply supervisor

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

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

Five BOR thresholds can be selected through option bytes.

The BOR can be used in two operating modes, configured by the BORHC bit in PWR control register 5 (PWR_CR5) :

The BOR is active in all power modes except Shutdown mode, and cannot be disabled. The BOR mechanism needs to be enabled, and can be disabled at any time if needed.

Reset mode

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

Force SMPS step-down converter Bypass mode

During power-on, the BOR keeps the device under reset until the supply voltage \( V_{DD} \) reaches the specified \( V_{BORx} \) threshold. When \( V_{DD} \) drops below \( V_{BOR0} \) , 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.

To enter and during the SMPS step-down converter in SMPS mode the selected \( BORx \) ( \( x = 1, 2, 3, 4 \) ) threshold is used to determine if SMPS mode is used or if the SMPS step-down converter is forced in Bypass mode. When \( V_{DD} \) drops below the selected threshold, the SMPS step-down converter when entering or in SMPS mode, is forced in Bypass mode. An SMPS step-down converter force Bypass interrupt (SMPSFBF) may be generated when enabled. When \( V_{DD} \) rises above the selected BOR upper limit, a BOR interrupt (BORHF) may be generated when enabled. It is up to software to set the SMPS step-down converter in SMPS mode.

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

Figure 9. Brown-out reset waveform

Figure 9. Brown-out reset waveform. The graph shows the VDD supply voltage (y-axis) versus time (t, x-axis). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the BORHrise (rising threshold) and BORHfall (falling threshold) levels. The vertical distance between these two lines is labeled 'hysteresis'. Below the graph, the nPwr signal is shown as a horizontal line that goes low (active) when VDD falls below the BORHfall threshold and returns high when VDD rises above the BORHrise threshold. The identifier MS44480V1 is in the bottom right corner.
Figure 9. Brown-out reset waveform. The graph shows the VDD supply voltage (y-axis) versus time (t, x-axis). The voltage rises to a peak and then falls. Two horizontal dashed lines represent the BORHrise (rising threshold) and BORHfall (falling threshold) levels. The vertical distance between these two lines is labeled 'hysteresis'. Below the graph, the nPwr signal is shown as a horizontal line that goes low (active) when VDD falls below the BORHfall threshold and returns high when VDD rises above the BORHrise threshold. The identifier MS44480V1 is in the bottom right corner.

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

6.2.2 Programmable voltage detector (PVD)

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

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

The PVD is enabled by setting the PVDE bit.

A PVDO flag is available, in the PWR 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 Line16 and can generate an interrupt if enabled through the EXTI registers.

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

Figure 10. PVD thresholds

Figure 10. PVD thresholds. A timing diagram showing the relationship between supply voltage (VDD or PVD_IN), PVDO output, and PVDE input over 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 thresholds is labeled 'hysteresis'. The PVDO output is shown as a square wave that toggles when the voltage crosses the thresholds. The PVDE input is shown as a signal that is enabled by 'SW enable' and reset by 'PDR reset'. The diagram is labeled MS44481V1.
Figure 10. PVD thresholds. A timing diagram showing the relationship between supply voltage (VDD or PVD_IN), PVDO output, and PVDE input over 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 thresholds is labeled 'hysteresis'. The PVDO output is shown as a square wave that toggles when the voltage crosses the thresholds. The PVDE input is shown as a signal that is enabled by 'SW enable' and reset by 'PDR reset'. The diagram is labeled MS44481V1.

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

Each PVM 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: 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 Stop0 and Stop1 modes, and the PVM interrupt can wake up from the Stop mode.

Table 22. PVM features

PVMPower supplyPVM thresholdEXTI line
PVM1Not used--
PVM2Not used--
PVM3\( V_{DDA} \)\( V_{PVM3} \) (~ 1.65 V)33
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 this dedicated source.

The following sequence must be applied before using analog to digital converters, digital to analog converters, comparators, operational amplifiers, voltage reference buffer:

  1. 1. If \( V_{DDA} \) is independent from \( V_{DD} \) :
    1. a) Enable the PVM3 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 bit is cleared in the PWR status register 2 (PWR_SR2)
    4. d) Optional: disable the PVM3 for consumption saving
  2. 2. Enable the analog peripheral, which automatically removes the \( V_{DDA} \) isolation.

6.3 CPU2 boot

Booting of the CPU2 is controlled by the C2BOOT bit in PWR control register 4 (PWR_CR4) register. This allows the CPU1 to initialize the system after a reset or wake-up from system Low-power mode, before booting the CPU2.

Figure 11. CPU2 boot options

A state transition diagram for CPU2 boot options. It shows transitions between RUN/LP-RUN, STOP0/STOP1/LP_STOP, and STANDBY modes. Transitions are triggered by Reset, CPU1 CSTOP, wake-up events (CPU1, CPU2, C2HF), and the C2BOOT bit status. The diagram includes states for CPU1 and CPU2 (e.g., CRUN, CSLEEP, CSTOP) and their interactions during boot sequences.

The diagram illustrates the boot options for CPU2 based on the state of CPU1 and the C2BOOT bit. It is divided into three main power modes: RUN/LP-RUN, STOP0/STOP1/LP_STOP, and STANDBY.

MS53134V1

A state transition diagram for CPU2 boot options. It shows transitions between RUN/LP-RUN, STOP0/STOP1/LP_STOP, and STANDBY modes. Transitions are triggered by Reset, CPU1 CSTOP, wake-up events (CPU1, CPU2, C2HF), and the C2BOOT bit status. The diagram includes states for CPU1 and CPU2 (e.g., CRUN, CSLEEP, CSTOP) and their interactions during boot sequences.

When the CPU2 is prevented from booting, the wake-up from Low-power mode boot procedure is the following:

When the system remains in Run mode (due to the Radio system) the CPU2 wakes up from CSTOP mode independently from the C2BOOT setting.

6.4 Low-power modes

By default, the microcontroller is in Run mode after a system or a power Reset and at least one CPU is in CRun mode executing code. 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 has to select the mode that gives the best compromise between consumption, startup time and available wake-up sources.

The individual CPUs feature two low power modes, entered by the CPU when executing WFI, WFE or on return from an exception handler when SLEEPONEXIT is enabled.

The device features several low-power modes:

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

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

In Stop0 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 Stop1 mode.

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

In this case the main regulator and the low-power regulator are powered off.

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

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

The system clock, when exiting Standby modes, is HSI16.

Note: Stop, Standby, and Shutdown modes are only entered when both CPUs are in CStop mode.

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 depend on the CPU1, the CPU2 and the Radio sub-system operating mode. The system enters a low power mode only when all three sub-systems allow it to do so.

After a system reset the CPU1 is in CRUN mode. The CPU2 boots only if enabled by the CPU1 via the C2BOOT register bit. As long as the CPU1 does not boot the CPU2, the device operates as a single CPU system. The CPU1 can enter and wake up from system low power modes on its own.

When CPU2 has boot, the CPU1, CPU2 and Radio sub-systems can enter and wake up from system low power modes on their own. The different wake-up sources for the different sub-systems are detailed in Table 23 .

Table 23. Sub-system low power wake-up sources

Wake-up sourceCPU1CPU2Radio
EXTIFrom Stop modesFrom Stop modesNot available
RTCFrom Stop and Standby modesFrom Stop and Standby modesNot available
WKUPFrom Stop and Standby modesFrom Stop and Standby modesNot available
SMPSFrom StopFrom StopNot available
RADIOFrom StopFrom StopNot available
RFWAKEUPNot availableFrom Stop and Standby modesFrom Stop and Standby modes

The system low power mode to enter depends on the allowed mode selected by both CPUs in the LPMS bits of PWR control register 1 (PWR_CR1) and PWR CPU2 control register 1 (PWR_C2CR1) . This is also valid when CPU2 is kept in hold by C2BOOT.

Figure 12 shows the operating modes state diagram. The CPU1, CPU2 and Radio sub-systems operate interdependently, according to their own sub-system states. Each sub-system has its own wake-up sources, to wake up from Stop and Standby modes. For the device to be in Stop, Standby or Shutdown mode, all three sub-systems need to be in CStop. When one sub-system enters CRun mode, the device enters Run mode.

Figure 12. Low-power modes possible transitions

A complex state transition diagram for low-power modes. It shows transitions between RUN/LP-RUN, STOP0/STOP1/LP-STOP, STANDBY, and SHUTDOWN modes. It details sub-system modes (CPU1, CPU2, Radio), bus modes (HCLK1, HCLK4), and system modes. Transitions are triggered by events like reset, wakeup from STOP, C1STOP, C2STOP, HCLK1 peripheral allocation/delocation, and specific wakeup sources like STM32-WKUP or BLE-WKUP.

Legend:

System Modes:

Sub-system and Bus Mode Transitions:

A complex state transition diagram for low-power modes. It shows transitions between RUN/LP-RUN, STOP0/STOP1/LP-STOP, STANDBY, and SHUTDOWN modes. It details sub-system modes (CPU1, CPU2, Radio), bus modes (HCLK1, HCLK4), and system modes. Transitions are triggered by events like reset, wakeup from STOP, C1STOP, C2STOP, HCLK1 peripheral allocation/delocation, and specific wakeup sources like STM32-WKUP or BLE-WKUP.

Table 24. Low-power mode summary

Mode nameEntryWakeup source (1)Wakeup system clockEffect on clocksVoltage regulator
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
ON
WFEWakeup event
Low-power
run
Set LPR bitClear LPR bitSame as Low-power
run clock
NoneOFFON
Low-power
sleep
Set LPR bit +
WFI or Return
from ISR
Any interruptSame as before
entering Low-power
sleep mode
CPU clock OFF
No effect on other clocks
or analog clock sources
Set LPR bit +
WFE
Wakeup eventON
Stop0LPMS="000" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
Any EXTI line
(configured in the
EXTI registers).
HSI16 when
STOPWUCK=1 in
RCC_CFGR.
MSI with the
frequency before
entering the Stop
mode when
STOPWUCK=0.
Stop1LPMS="001" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
ON
Standby with
SRAM2a
LPMS="011"+
Set RRS bit +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
LSECSS,
external reset in
NRST pin,
IWDG reset
HSI16All clocks OFF
except LSI and LSE
OFF
StandbyLPMS="011" +
Clear RRS bit +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
LSECSS,
external reset in
NRST pin,
IWDG reset
ShutdownLPMS = "1--" +
SLEEPDEEP bit
+ WFI or Return
from ISR or WFE
WKUP pin edge,
RTC event,
external reset in
NRST pin
MSI 4 MHzAll clocks OFF
except LSE
OFFOFF
1. Refer to Table 25 .Table 25. Functionalities depending on system operating mode (1)
PeripheralRunSleepLow-power runLow-power sleepStop0Stop1StandbyShutdownVBAT
-Wakeup capability-Wakeup capability-Wakeup capability-Wakeup capability
CPU1Y-Y----------
CPU2Y-Y----------
Radio-system (BLE)YY---Y-Y-Y (2)---
Flash memoryYYOOR-R-R-R-R
SRAM1YO (3)YO (3)R-R-O (4)----
SRAM2aYO (3)YO (3)R-R-O (4)----
SRAM2bYO (3)YO (3)R-R-O (4)----
Backup registersYYYYR-R-R-R-R
Brown-out reset (BOR)YYYYYYYYYY---
Brown-out SMPS force bypass (BOR)YYYYYY-------
Programmable voltage detector (PVD)OOOOOOOO-----
Peripheral voltage monitor (PVMx; x = 3)OOOOOOOO-----
DMAx (x = 1)OOOO---------
High speed internal (HSI16)OOOOO (5)-O (5)------
High speed external (HSE)OOOO---------
Low speed internal (LSI)OOOOO-O-O----
Low speed external (LSE)OOOOO-O-O-O-O
Multi-speed internal (MSI)OOOO---------
Clock security system (CSS)OOOO---------
Clock security system on LSEOOOOOOOOOO---
RTC / Auto wake-upOOOOOOOOOOOOO
Number of RTC tamper pins11111O1O1O1O1
USART1OOOOO (6)O (6)O (6)O (6)-----
Low-power UART (LPUART)OOOOO (6)O (6)O (6)O (6)-----
I2C1OOOOO (7)O (7)O (7)O (7)-----
SPIx (x = 1)OOOO---------
ADC1OOOO---------
COMPx (x = 1)OOOOOOOO-----

Table 25. Functionalities depending on system operating mode (1) (continued)

PeripheralRunSleepLow-power runLow-power sleepStop0Stop1StandbyShutdownVBAT
-Wakeup capability-Wakeup capability-Wakeup capability-Wakeup capability
Temperature sensorOOOO---------
Timers (TIMx, x = 1, 2)OOOO---------
Low-power timer 1 (LPTIM1)OOOOOOOO-----
Low-power timer 2 (LPTIM2)OOOOOOOO-----
Independent watchdog (IWDG)OOOOOOOOOO---
Window watchdog (WWDG)OOOO---------
SysTick timerOOOO---------
Touch sensing controller (TSC)OOOO---------
True random number generator (RNG)OO-----------
AES hardware acceleratorOOOO---------
CRC calculation unitOOOO---------
IPCCO-O----------
HSEMO-O----------
PKAOOOO---------
GPIOsOOOOOOOO(8) 2 pins (9)(10) 2 pins (9)---
  1. Legend: Y = Yes (enabled). O = Optional (disabled by default, can be enabled by software). R = data retained. - = Not available. Gray cells indicate Wakeup capability.
  2. The content of SRAM1, SRAM2a and SRAM2b needs to be retained via the PWR_CR3.RRS bit.
  3. The SRAM clock can be gated on or off.
  4. The SRAM1, SRAM2a and SRAM2b content can optionally be retained when the PWR_CR3.RRS bit is set.
  5. Some peripherals with wake-up from Stop capability can request HSI16 to be enabled. In this case, HSI16 is woken up by the peripheral, and only feeds the peripheral which requested it. HSI16 is automatically put off when the peripheral does not need it anymore.
  6. UART and LPUART reception is functional in Stop mode, and generates a wake-up interrupt on Start, address match or received frame event.
  7. I2C address detection is functional in Stop mode, and generates a wake-up interrupt in case of address match.
  8. I/Os can be configured with internal pull-up, pull-down or floating in Standby mode.
  9. The I/Os with wake-up from Standby/Shutdown capability are PA0 and PA2.
  10. 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.

Debug mode

By default, the debug connection is lost if the application puts the MCU in Stop0, Stop1, Standby or Shutdown mode while the debug features are used. This is because the CPU1 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 33.3.5: Debug and low power modes .

6.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 Sleep mode.

For more details, refer to Section 8.4.3: RCC clock configuration register (RCC_CFGR) .

Peripheral clock gating

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

To further reduce the power consumption in Sleep mode, the peripheral clocks can be disabled prior to executing 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 bit in the RCC_AHBxSMENR and RCC_APBxSMENR registers.

6.4.2 Low-power run mode (LP run)

To further reduce the consumption when the system is in Run mode, the regulator can be configured in low-power mode. In this mode, the system frequency must not exceed 2 MHz. The Radio sub-system cannot be used in low-power Run mode.

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

I/O states in Low-power run mode

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

Entering Low-power run mode

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

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

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

Exiting Low-power run mode

To exit the Low-power run mode, proceed as follows (refer to Table 26 ):

  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 PWR status register 2 (PWR_SR2) .
  3. 3. Increase the system clock frequency.

Table 26. Low-power run

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

6.4.3 Entering Low-power mode

Low power modes are entered by the MCU by executing WFI (Wait for Interrupt), or WFE (Wait for Event) instructions, or when the SLEEPONEXIT bit in the CPU1 System control register is set on Return from ISR.

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

6.4.4 Exiting Low-power mode

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

When SEVONPEND = 1 in the CPU System control register, enabling an interrupt in the peripheral control register and optionally in the NVIC. When the MCU resumes from WFE, the peripheral interrupt pending bit and when enabled the NVIC peripheral IRQ channel pending bit (in the NVIC interrupt clear pending register) have to be cleared. All NVIC interrupts wake up the MCU, even the disabled ones. Only enabled NVIC interrupts with sufficient priority wake up and

interrupt the MCU.

From Standby and Shutdown modes the MCU exits Low-power mode through an external reset (NRST pin), an IWDG reset, a rising/falling edge on one of the enabled WKUPx pins, or an RTC event (see Section 24: Real-time clock (RTC) ), or a Radio event (for Standby only).

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

The system mode when the CPU wakes up from CStop mode can be determined from the CnSTOPF and CnSBF in PWR extended status and status clear register (PWR_EXTSCR) .

Table 27. CPU CSTOP wake-up vs. system operating mode

System modeCPU1CPU2CPU1 wake-upCPU2 wake-up
C1SBFC1STOPFC2SBFC2STOPF
Run0000Wakeup from RunWakeup from Run
0100Wakeup from STOP, but system is already in Run due to CPU2Wakeup from Run
0001Wakeup from RunWakeup from STOP, but system is already in Run due to CPU1
1000Wakeup from STANDBY, but system is already in Run due to CPU2Wakeup from Run
0010Wakeup from RunWakeup from STANDBY, but system is already in Run due to CPU1
1100Wakeup from STANDBY followed by STOP, but system is already in Run due to CPU2Wakeup from Run
0011Wakeup from RunWakeup from STANDBY followed by STOP, but system is already in Run due to CPU1
Stop0101Wakeup from STOP (CPU2 still in CSTOP)Wakeup from STOP (CPU1 still in CSTOP)
1101Wakeup from STOP after the system has been in STANDBY (CPU2 still in CSTOP)Wakeup from STOP (CPU1 still in CSTOP)
0111Wakeup from STOP (CPU2 is still in CSTOP)Wakeup from STOP after the system having been in STANDBY (CPU1 still in CSTOP)

Table 27. CPU CSTOP wake-up vs. system operating mode (continued)

System modeCPU1CPU2CPU1 wake-upCPU2 wake-up
C1SBFC1STOPFC2SBFC2STOPF
Standby1010Wakeup from STANDBY (CPU2 still in CSTOP)Wakeup from STANDBY (CPU1 still in CSTOP)
N.A.OthersNot valid, does not occur

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

Entering Sleep mode

Sleep mode is entered according to Entering Low-power mode , when the SLEEPDEEP bit in the CPU System control register is cleared (see Table 28 ).

Exiting Sleep mode

The MCU exits from Sleep mode (see Table 28 ) as indicated in Exiting Low-power mode .

Table 28. Sleep mode

Sleep-now modeDescription
Mode entry

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

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

Refer to the Cortex® 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 57: CPU1 vector table and Table 58: CPU2 vector table

If WFE was used for entry and SEVONPEND = 0:

Wakeup event: refer to Section 13.4: Interrupt list

If WFE was used for entry and SEVONPEND = 1:

Interrupt even when disabled in NVIC: refer to Table 57: CPU1 vector table and Table 58: CPU2 vector table or Wakeup event: refer to Section 13.4: Interrupt list

Wakeup latencyNone

6.4.6 Low-power sleep mode (LP sleep)

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

I/O states in Low-power sleep mode

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

Entering Low-power sleep mode

Low-power sleep mode is entered from Low-power run mode as described in Section 6.4.3 , when the SLEEPDEEP bit in the Cortex® System control register is cleared.

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

Exiting Low-power sleep mode

The low-power Sleep mode is exited as described in Section 6.4.4 . When exiting Low-power sleep mode by issuing an interrupt or an event, the MCU is in Low-power run mode.

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

Table 29. Low-power sleep

Low-power sleep-now modeDescription
Mode entry

Low-power sleep mode is entered from the Low-power run mode.
WFI (Wait for Interrupt) or WFE (Wait for Event) while:

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

Refer to the Cortex® System control register.

Low-power sleep mode is entered from the Low-power run mode.
On return from ISR while:

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

Refer to the Cortex® System control register.

Mode exit

If WFI or Return from ISR was used for entry:
Interrupt: refer to Table 57: CPU1 vector table and Table 58: CPU2 vector table
If WFE was used for entry and SEVONPEND = 0:
Wakeup event: refer to Section 13.4: Interrupt list
If WFE was used for entry and SEVONPEND = 1:
Interrupt even when disabled in NVIC: refer to Table 57: CPU1 vector table and Table 58: CPU2 vector table
Wakeup event: refer to Section 13.4: Interrupt list
After exiting the Low-power sleep mode, the MCU is in Low-power run mode.

Wakeup latencyNone

6.4.7 Stop0 mode

The Stop0 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 Stop0 mode, all clocks in the \( V_{CORE} \) domain are stopped; the PLL, the MSI, the HSI16 and the HSE oscillators are disabled. Some peripherals with wake-up capability (I2Cx (x=1), USART1 and LPUART) can switch on the HSI16 to receive a frame, and switch off the HSI16 after receiving the frame if it is not a wake-up frame. In this case, the HSI16 clock is propagated only to the peripheral requesting it.

SRAM1, SRAM2 and register contents are preserved.

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

I/O states in Stop0 mode

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

Entering Stop0 mode

The Stop0 mode is entered according to Section 6.4.3 , when the SLEEPDEEP bit in the Cortex System control register is set (see Table 30 ). Before entering the mode, the system clock must be set to HSI16 clock.

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

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

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

Some peripherals can be used in Stop0 mode and add consumption if they are enabled and clocked by LSI or LSE, or when they request the HSI16 clock, namely LPTIM1, LPTIM2, I2Cx (x=1), USART1, LPUART.

The comparators as well as the PWMx (x=3) and the PVD can be used in Stop0 mode. If not needed, they must be disabled by software to reduce power consumption.

The ADC and the temperature sensor can consume power during the Stop0 mode, unless they are disabled before entering this mode.

Exiting Stop0 mode

The Stop0 mode is exited according to what indicated in Section 6.4.4 .

Refer to Table 30 for details on how to exit Stop0 mode.

When exiting Stop0 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 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 Stop0 mode with HSI16. By keeping the internal regulator ON during Stop0 mode, the consumption is higher but the startup time is reduced.

When exiting Stop0 mode, the MCU is either in Run mode or in Low-power run mode if the bit LPR is set in the same register.

Table 30. Stop0 mode

Stop0 modeDescription
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 = “000” in PWR_CR1 and/or PWR_C2CR1 or higher

On Return from ISR while:

  • – SLEEPDEEP bit is set in Cortex System control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “000” in PWR_CR1 and/or PWR_C2CR1 or higher

Note: To enter Stop0 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 Stop0 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 57: CPU1 vector table and Table 58: CPU2 vector table .

If WFE was used for entry and SEVONPEND = 0:

Any EXTI line configured in event mode. Refer to Section 13.4: Interrupt list .

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 57: CPU1 vector table and Table 58: CPU2 vector table .

Wakeup event: refer to Section 13.4: Interrupt list

Wakeup latencyLongest wake-up time between: MSI or HSI16 wake-up time and flash memory wake-up time from Stop0 mode.

6.4.8 Stop1 mode

The Stop1 mode is the same as Stop0 mode except that the main regulator is OFF, and only the low-power regulator is ON. Stop1 mode can be entered from Run mode and from

Low-power run mode. Before entering the mode, the system clock must be set to HSI16 clock.

Refer to Table 31 for details on how to enter and exit Stop1 mode.

Table 31. Stop1 mode

Stop1 modeDescription
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 = “001” in PWR_CR1 and/or PWR_C2CR1 or higher

On Return from ISR while:

  • – SLEEPDEEP bit is set in Cortex System control register
  • – SLEEPONEXIT = 1
  • – No interrupt is pending
  • – LPMS = “001” in PWR_CR1 and/or PWR_C2CR1 or higher

Note: To enter Stop1 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 Stop1 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 57: CPU1 vector table and Table 58: CPU2 vector table .

If WFE was used for entry and SEVONPEND = 0:
Any EXTI line configured in event mode. Refer to Section 13.4: Interrupt list .

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 57: CPU1 vector table and Table 58: CPU2 vector table .
Wakeup event: refer to Section 13.4: Interrupt list .

Wakeup 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 Stop1 mode.

6.4.9 Standby mode

Standby mode makes it possible to achieve the lowest power consumption with BOR. It is based on the CPU deepsleep mode, with the voltage regulators disabled (except when SRAM2 content is preserved). The PLL, the HSI16, the MSI and the HSE oscillators are also switched off.

Register contents are lost except for registers in the Backup domain and Standby circuitry (see Figure 7 ). SRAM1 and 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 ON and provides the supply to SRAM1 and SRAM2.

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

I/O states in Standby mode

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

The RTC outputs on PC14 and PC15 used for LSE are functional. Two wake-up pins (WKUPx, \( x=1,4 \) ) and the RTC tamper are available.

Entering Standby mode

Standby mode is entered according to Section 6.4.3 , when the SLEEPDEEP bit in the Cortex System control register is set.

Refer to Table 32 for details on how to enter Standby mode.

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

Exiting Standby mode

Standby mode is exited according to Section 6.4.4 . The SBF status flag in the PWR extended status and status clear register (PWR_EXTSCR) indicates that the MCU was in Standby mode. All registers are reset after wake-up from Standby except for PWR control register 3 (PWR_CR3) .

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

Table 32. Standby mode
Standby 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 = 011 in PWR_CR1 and/or PWR_C2CR1 or higher
  • – 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 = 011 in PWR_CR1 and/or PWR_C2CR1 or higher
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)
The RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, tamper or timestamp flags) is cleared.
Mode exitWKUPx pin edge, RTC event, external Reset in NRST pin, IWDG Reset, BOR reset
Wakeup latencyReset phase

6.4.10 Shutdown mode

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

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

I/O states in Shutdown mode

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

However this configuration is lost when exiting Shutdown mode due to the power-on reset.

PC14 and PC15 used for LSE are also functional. Two wake-up pins (WKUPx, x=1,4) and the RTC tamper are available.

Entering Shutdown mode

The Shutdown mode is entered according to Entering Low-power mode , when the SLEEPDEEP bit in the Cortex System control register is set.

Refer to Table 33 for details on how to enter Shutdown mode.

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

control register (RCC_BDCR) . Caution: in case of \( V_{DD} \) power-down the RTC content is lost.

Exiting Shutdown mode

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

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

Table 33. Shutdown mode

Shutdown modeDescription
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 = “1XX” in PWR_CR1 and PWR_C2CR1
  • – 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 = “1XX” in PWR_CR1 and PWR_C2CR1
  • – WUFX bits are cleared in power status register 1 (PWR_SR1)

The RTC flag corresponding to the chosen wake-up source (RTC Alarm A, RTC Alarm B, RTC wake-up, tamper or timestamp flags) is cleared.

Mode exitWKUPx pin edge, RTC event, external Reset in NRST pin
Wakeup latencyReset phase

6.4.11 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, two of the three 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 17.

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

6.5 Real-time radio information

The PWR provides flags indicating the real time operation on the radio:

These flags may be used by the CPU1 to determine the radio activity.

The basic timing relation for the different flags is shown in Figure 12 .

Figure 13. Real-time radio activity flags

Timing diagram showing the relationship between radio activity phases and various flags (BLEAF, CBLEAF, CRPEF, CCRPEF, CRPF, CCRPF) for Cortex-M4 and Cortex-M0+ processors. The diagram is divided into three phases: Radio stop, Radio activity, and Radio stop. BLEAF and CBLEAF are high during the Radio activity phase. CRPEF and CCRPEF are high during the Radio activity phase, with CRPEF being a subset of CCRPEF. CRPF and CCRPF are high during the Radio activity phase, with CCRPF being a subset of CRPF. The diagram also shows the relationship between the Cortex-M4 and Cortex-M0+ processors and the flags.

The figure is a timing diagram illustrating the relationship between radio activity phases and various flags. The diagram is divided into three phases: Radio stop, Radio activity, and Radio stop. The flags shown are BLEAF, CBLEAF, CRPEF, CCRPEF, CRPF, and CCRPF. The flags are grouped by processor: Cortex®-M4 (BLEAF, CBLEAF, CRPEF, CCRPEF) and Cortex®-M0+ (CRPF, CCRPF). The flags are shown as digital signals over time. The Radio activity phase is highlighted in the center. The flags BLEAF and CBLEAF are high during the Radio activity phase. The flags CRPEF and CCRPEF are high during the Radio activity phase, with CRPEF being a subset of CCRPEF. The flags CRPF and CCRPF are high during the Radio activity phase, with CCRPF being a subset of CRPF. The flags are generated by the radio and are used by the CPU to determine the radio activity.

Timing diagram showing the relationship between radio activity phases and various flags (BLEAF, CBLEAF, CRPEF, CCRPEF, CRPF, CCRPF) for Cortex-M4 and Cortex-M0+ processors. The diagram is divided into three phases: Radio stop, Radio activity, and Radio stop. BLEAF and CBLEAF are high during the Radio activity phase. CRPEF and CCRPEF are high during the Radio activity phase, with CRPEF being a subset of CCRPEF. CRPF and CCRPF are high during the Radio activity phase, with CCRPF being a subset of CRPF. The diagram also shows the relationship between the Cortex-M4 and Cortex-M0+ processors and the flags.

When enabled, the radio activity end interrupt flag BLEAF indicates the end of a BLE radio activity period, and is generated when the radio enters Cstop mode.

The critical radio phase flag indicates the critical real time phase of the radio, where access to the flash memory must not be blocked by erase or program operations (all erase and program operations are suspended by the CPU2 in the flash memory interface). The end of the critical radio phase may be triggered by the CPU2 clearing the critical radio phase flag CRPF, and is eventually cleared at the end of the BLE radio activity.

When enabled, the critical radio phase end interrupt flag CRPEF indicates the end of a radio critical phase, and is generated when the radio critical phase ends.

6.6 PWR registers

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

6.6.1 PWR control register 1 (PWR_CR1)

Address offset: 0x000

Reset value: 0x0000 0200. This register is reset after wake-up from Standby mode, except for bits [2:0].

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.LPRRes.Res.Res.Res.Res.DBPRes.Res.FPDSFPDRRes.LPMS[2:0]
rwrwrwrwrwrwrw

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

Bit 14 LPR : Low-power run

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

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

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 for CPU1

This bit selects whether the flash memory is in power down mode or idle mode when both CPUs are in Sleep mode. flash memory is set in power down mode only when the system is in LPSleep mode and the PWR_C2CR1.FPDS bit from CPU2 also allows this.

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 for CPU1

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 set in power down mode only when the system is in LPRun mode, and the PWR_C2CR1.FPDR bit from CPU2 too allows so.

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 Reserved, must be kept at reset value.

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

These bits are not reset when exiting Standby mode.

These bits select the low-power mode allowed when CPU1 enters the deepsleep mode. The entered system low-power mode depends also upon the PWR_C2CR1.LPMS allowed low-power mode from CPU2.

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

6.6.2 PWR control register 2 (PWR_CR2)

Address offset: 0x004

Reset value: 0x0000 0000. This register is reset when exiting Standby mode.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.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} \) vs. 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, they are reset only by a system reset.

Bit 0 PVDE : Programmable voltage detector enable

Note: This bit is write-protected when bit PVDL (PVD lock) is set in the SYSCFG_CBR register. This bit is reset only by a system reset.

6.6.3 PWR control register 3 (PWR_CR3)

Address offset: 0x008

Reset value: 0x0000 8000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
EIWULEC2HRes.EBLEAECRPEAPCRRSEBORH
SMPSFB
Res.Res.Res.Res.EWUP4Res.Res.EWUP1
rwrwrwrwrwrwrwrwrw

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

Bit 15 EIWUL : Enable internal wake-up line for CPU1

0: Internal wake-up line interrupt to CPU1 disabled

1: Internal wake-up line interrupt to CPU1 enabled

Bit 14 EC2H : Enable CPU2 Hold interrupt for CPU1

Enable CPU2 kept in hold, due to C2BOOT, interrupt to CPU1.

0: Interrupt to CPU1 disabled

1: interrupt to CPU1 enabled

Bit 13 Reserved, must be kept at reset value.

Bit 12 EBLEA : Enable BLE end of activity interrupt for CPU1

0: Interrupt to CPU1 disabled

1: interrupt to CPU1 enabled

Bit 11 ECRPE : Enable critical radio phase end of activity interrupt for CPU1

0: Interrupt to CPU1 disabled

1: interrupt to CPU1 enabled

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

When this bit for CPU1 or the PWR_C2CR3.APC bit for CPU2 is set, the I/O pull-up and pull-down configurations defined in the PWR_PUCRx and PWR_PDCRx registers are applied.

When both bits are cleared, the PWR_PUCRx and PWR_PDCRx registers are not applied to the I/Os.

Bit 9 RRS : SRAM1, SRAM2a and SRAM2b retention in Standby mode

0: SRAM1, SRAM2a and SRAM2b powered off in Standby mode (content is lost).

1: SRAM1, SRAM2a and SRAM2b powered by the low-power regulator in Standby mode (content is kept).

Bit 8 EBORHSMPSFB : Enable BORH and SMPS step-down converter forced in Bypass interrupts for CPU1

0: Interrupts BORHF and SMPSFBF to CPU1 disabled

1: interrupts BORHF and SMPSFBF to CPU1 enabled

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

Bit 3 EWUP4 : Enable wake-up pin WKUP4 for CPU1

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

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

Bit 0 EWUP1 : Enable wake-up pin WKUP1 for CPU1

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 CPU1. The active edge is configured via the WP1 bit in the PWR control register 4 (PWR_CR4) .

6.6.4 PWR control register 4 (PWR_CR4)

Address offset: 0x00C

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
C2BOOTRes.Res.Res.Res.Res.VBRVBERes.Res.Res.Res.WP4Res.Res.WP1
rwrwrwrwrw

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

Bit 15 C2BOOT : Boot CPU2 after reset or wake-up from Stop or Standby modes.

0: CPU2 does not boot after reset or wake-up from Stop or Standby modes.

1: CPU2 boots after wake-up from Stop or Standby modes.

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

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

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

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

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

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

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

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

Bit 3 WP4 : Wakeup pin WKUP4 polarity

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

0: Detection on high level (rising edge)

1: Detection on low level (falling edge)

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

Bit 0 WP1 : Wakeup 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)

6.6.5 PWR status register 1 (PWR_SR1)

Address offset: 0x010

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
WUFIC2HFRes.BLEAFCRPEFRes.BLEWUFBORHFSMPS FBFRes.Res.Res.WUF4Res.Res.WUF1
rrrrrrrrr

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.

Bit 14 C2HF : CPU2 Hold interrupt flag

This bit is set when a CPU2 wake-up is detected when C2BOOT = 0. It is cleared by PWR_SCR.CC2HF.

Bit 13 Reserved, must be kept at reset value.

Bit 12 BLEAF : BLE end of activity interrupt flag

This bit is set when a BLE activity ends. It is cleared by PWR_SCR.CBLEAF.

Bit 11 CRPEF : Enable critical radio phase end of activity interrupt flag

This bit is set when Radio phase activity ends. It is cleared by PWR_SCR.CCRPEF.

Bit 10 Reserved, must be kept at reset value.

Bit 9 BLEWUF : BLE wake-up interrupt flag

This bit is set when a wake-up is detected on the BLE line. It is cleared by PWR_SCR.CBLEWUF.

Bit 8 BORHF : BORH interrupt flag

This bit is set when the V DD rises above the BORH threshold. It is cleared by PWR_SCR.CBORHF.

Bit 7 SMPSFBF : SMPS step-down converter forced in Bypass interrupt flag

This bit is set when the SMPS step-down converter is enabled in SMPS mode and forced in Bypass mode due to the BORH threshold. BORH configuration by BORHC bit in PWR control register 5 (PWR_CR5) must select BORH force SMPS step-down converter in Bypass mode.

This bit is cleared by PWR_SCR.CSMPSFBF.

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

Bit 3 WUF4 : Wakeup flag 4

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

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

Bit 0 WUF1 : Wakeup 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) .

6.6.6 PWR status register 2 (PWR_SR2)

Address offset: 0x014

Reset value: 0x0000 0002. This register is partially reset when exiting Standby/Shutdown modes.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.PVMO3Res.Res.PVDORes.REGLPFREGLPSRes.Res.Res.Res.Res.Res.SMPSFSMPSBF
rrrrrr

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

Bit 14 PVMO3 : Peripheral voltage monitoring output: \( V_{DDA} \) vs. 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

Bit 10 Reserved, must be kept at reset value.

Bit 9 REGLPF : Low-power regulator flag

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

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

Bit 8 REGLPS : Low-power regulator started

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

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

Bit 1 SMPSF : SMPS step-down converter SMPS mode flag

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

0: The SMPS step-down converter is not ready

1: The SMPS step-down converter is ready

Bit 0 SMPSBF : SMPS step-down converter Bypass mode flag

This bit indicates that the SMPS step-down converter is in Bypass mode.

0: The SMPS step-down converter is not in Bypass mode (either in Open or SMPS mode)

1: The SMPS step-down converter is in Bypass mode

6.6.7 PWR status clear register (PWR_SCR)

Address offset: 0x018

Reset value: 0x0000 0000

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.CC2HFRes.CFBLEAFCCRP EFRes.CBLEWUFCBORHFCSMPS FBFRes.Res.Res.CWUF4Res.Res.CWUF1
wwwwwwwww

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

Bit 14 CC2HF : Clear CPU2 Hold interrupt flag

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

Bit 13 Reserved, must be kept at reset value.

Bit 12 CBLEAF : Clear BLE end of activity interrupt flag

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

Bit 11 CCRPEF : Clear critical radio phase end of activity interrupt flag

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

Bit 10 Reserved, must be kept at reset value.

Bit 9 CBLEWUF : Clear BLE wake-up interrupt flag

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

Bit 8 CBORHF : Clear BORH interrupt flag

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

Bit 7 CSMPSBF : Clear SMPS step-down converter forced in Bypass interrupt flag

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

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

Bit 3 CWUF4 : Clear wake-up flag 4

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

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

Bit 0 CWUF1 : Clear wake-up flag 1

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

6.6.8 PWR control register 5 (PWR_CR5)

Address offset: 0x01C

Reset value: 0x0000 427X, where X is factory-programmed. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
SMPSENRes.Res.Res.Res.Res.Res.BORHCRes..SMPSSC[2:0]SMPSVOS[3:0]
rwrwrwrwrwrwrwrwrw

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

Bit 15 SMPSEN : Enable SMPS step-down converter SMPS mode enabled.

This bit is reset to 0 when SMPS step-down converter switching on the fly is enabled and the \( V_{DD} \) level drops below the BORH threshold.

0: SMPS Step down converter SMPS mode disabled.

1: SMPS Step down converter SMPS mode enabled.

Note: The noise performance of analog signals may be impacted by the integrated SMPS switching. To prevent this the SMPS may be switched off on the fly when measuring analog signals.

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

Bit 8 BORHC : BORH configuration selection

0: BORH generates a system reset.

1: BORH forces SMPS step-down converter Bypass mode (BORL still generates a system reset).

Bit 7 Reserved, must be kept at reset value.

Bits 6:4 SMPSSC : SMPS step-down converter supply startup current selection

Startup current is limited to maximum 80 mA + SMPSSC x 20 mA.

Bit 3:0 SMPSVOS : SMPS step-down converter voltage output scaling

These bits are initialized after Option byte loading with factory trimmed value to reach 1.5 V, and can subsequently be overwritten by firmware.

SMPS step down output voltage step size is 50 mV.

If factory trimmed value - 0x8 gives 1.50 V on \( V_{FB\text{SMPS}} \) , to get 1.40 V 0x2 must be subtracted from this value.

The factory trimmed value can be obtained from address 0x1FFF 7558 bits [11:8].

6.6.9 PWR Port A pull-up control register (PWR_PUCRA)

Address offset: 0x020

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

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

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

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

When set, this bit activates the pull-up on Px[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) . The pull-up is not activated if the corresponding PDy bit is also set.

6.6.10 PWR Port A pull-down control register (PWR_PDCRA)

Address offset: 0x024

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

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

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

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

When set, this bit activates the pull-down on PA[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

6.6.11 PWR Port B pull-up control register (PWR_PUCRB)

Address offset: 0x028

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.PU11Res.PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0
rwrwrwrwrwrwrwrwrwrwrw

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

Bit 11 PU11 : Port B pull-up bit 11

When set, this bit activates the pull-up on Px[11] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) . The pull-up is not activated if the corresponding PD11 bit is also set.

Bit 10 Reserved, must be kept at reset value.

Bits 9:0 PUy : Port B pull-up bit y (y=0...9)

When set, this bit activates the pull-up on Px[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) . The pull-up is not activated if the corresponding PDy bit is also set.

6.6.12 PWR Port B pull-down control register (PWR_PDCRB)

Address offset: 0x02C

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.PD11Res.PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0
rwrwrwrwrwrwrwrwrwrwrw

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

Bit 11 PD11 : Port B pull-down bit 11

When set, this bit activates the pull-down on PB11 when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

Bit 10 Reserved, must be kept at reset value.

Bits 9:0 PDy : Port B pull-down bit y (y=0...9)

When set, this bit activates the pull-down on PB[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

6.6.13 PWR Port C pull-up control register (PWR_PUCRC)

Address offset: 0x030

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PU15PU14Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw

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

Bits 15:14 PUy : Port C pull-up bit y (y=14,15)

When set, this bit activates the pull-up on Px[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) . The pull-up is not activated if the corresponding PDy bit is also set.

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

6.6.14 PWR Port C pull-down control register (PWR_PDCRC)

Address offset: 0x034

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PD15PD14Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrw

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

Bits 15:14 PDy : Port C pull-down bit y (y=14,15)

When set, this bit activates the pull-down on PC[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

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

6.6.15 PWR Port E pull-up control register (PWR_PUCRE)

Address offset: 0x040

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU4
rw
Res.Res.Res.Res.

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

Bit 4 PU4 : Port E pull-up bit 4

When set, this bit activates the pull-up on Px[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) . The pull-up is not activated if the corresponding PD4 bit is also set.

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

6.6.16 PWR Port E pull-down control register (PWR_PDCRE)

Address offset: 0x044

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD4
rw
Res.Res.Res.Res.

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

Bit 4 PD4 : Port E pull-down bit 4

When set, this bit activates the pull-down on PE4 when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

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

6.6.17 PWR Port H pull-up control register (PWR_PUCRH)

Address offset: 0x058

Reset value: 0x0000 0000. 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 vs. those needed for a standard APB access (three for a write and two for a read).

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

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

Bit 3 PU3 : Port H pull-up bit 3

When set, this bit activates the pull-up on PH[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

The pull-up is not activated if the corresponding PDy bit is also set.

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

6.6.18 PWR Port H pull-down control register (PWR_PDCRH)

Address offset: 0x05C

Reset value: 0x0000 0000. This register is not reset when exiting Standby modes and with PWR_RST bit in the RCC_APB1RSTR1 register.

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

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

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

Bit 3 PD3 : Port H pull-down bit 3

When set, this bit activates the pull-down on PH[y] when one of the APC bits is set in PWR control register 3 (PWR_CR3) and in PWR CPU2 control register 3 (PWR_C2CR3) .

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

6.6.19 PWR CPU2 control register 1 (PWR_C2CR1)

Address offset: 0x080

Reset value: 0x0000 0000. This register is reset after wake-up from Standby mode, except for bits [2:0].

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.BLE
EWKUP
Res.Res.Res.Res.Res.Res.Res.Res.FPDSFPDRRes.LPMS[2:0]
rwrwrwrwrwrw

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

Bit 14 BLEEWKUP : BLE external wake-up

When set this bit forces a wake-up of the BLE controller. It is automatically reset when BLE controller exits its sleep mode.

0: No action

1: Wakeup BLE controller from its sleep mode

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

Bit 5 FPDS : Flash memory power down mode during LPSleep for CPU2

This bit selects whether the flash memory is in power down mode or idle mode when both CPUs are in Sleep mode. flash memory is set in power down mode only when the system is in LPSleep mode and the PWR_CR1.FPDS bit from CPU1 also allows so.

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 for CPU2

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 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 set in power down mode only when the system is in LPRun mode, and the PWR_CR1.FPDR bit from CPU1 also allows so.

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 Reserved, must be kept at reset value.

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

These bits are not reset when exiting Standby mode.

These bits select the low-power mode entered when CPU2 enters the deepsleep mode. The system low-power mode entered depend also on the PWR_CR1.LPMS allowed low-power mode from CPU1.

000: Stop0 mode

001: Stop1 mode

010: Reserved

011: Standby mode

1xx: Shutdown mode

Note: In Standby mode, SRAM2 can be preserved or not, depending on RRS bit configuration in PWR control register 3 (PWR_CR3).

6.6.20 PWR CPU2 control register 3 (PWR_C2CR3)

Address offset: 0x084

Reset value: 0x0000 8000. This register is not reset when exiting Standby modes.

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
EI
WUL
Res.Res.APCRes.Res.EBLE
WUP
Res.Res.Res.Res.Res.EWUP4Res.Res.EWUP1
rwrwrwrwrw

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

Bit 15 EIWUL : Enable internal wake-up line for CPU2

0: Internal wake-up line to CPU2 disabled

1: Internal wake-up line to CPU2 enabled

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

Bit 12 APC : Apply pull-up and pull-down configuration for CPU2

When this bit for CPU2 or the PWR_CR3.APC bit for CPU1 is set, the I/O pull-up and pull-down configurations defined in the PWR_PUCRx and PWR_PDCRx registers are applied.

When both bits are cleared, the PWR_PUCRx and PWR_PDCRx registers are not applied to the I/Os.

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

Bit 9 EBLEWUP Enable BLE host wake-up interrupt for CPU2

0: Interrupt to CPU2 disabled

1: interrupt to CPU2 enabled

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

Bit 3 EWUP4 : Enable wake-up pin WKUP4 for CPU2

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

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

Bit 0 EWUP1 : Enable wake-up pin WKUP1 for CPU2

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 CPU2. The active edge is configured via the WP1 bit in the PWR control register 4 (PWR_CR4) .

6.6.21 PWR extended status and status clear register (PWR_EXTSCR)

Address offset: 0x088

Reset value: 0x0000 0000

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

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
C2DSC1DSCRPFRes.C2STOPFC2SBFC1STOPFC1SBFRes.Res.Res.Res.Res.CCRPFC2CSSFC1CSSF
rrrrrrrwww

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

Bit 15 C2DS : CPU2 deepsleep mode

This bit is set by hardware when CPU2 enters deepsleep mode or is hold by C2BOOT.

0: CPU2 is running or in sleep

1: CPU2 is in deepsleep or hold by C2BOOT

Bit 14 C1DS : CPU1 deepsleep mode

This bit is set by hardware when CPU1 enters deepsleep mode.

0: CPU1 is running or in sleep

1: CPU1 is in deepsleep

Bit 13 CRPF : Critical Radio system phase

This bit is set by hardware when the Radio system wakes up. It is reset either by hardware when the Radio system enters Low-power mode or by software when writing CCRPF.

0: Not a critical Radio system phase

1: Critical Radio system phase ongoing

Bit 12 Reserved, must be kept at reset value.

Bit 11 C2STOPF : System Stop flag for CPU2.

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

0: System has not been in Stop mode

1: System has been in Stop mode

Bit 10 C2SBF : System Standby flag for CPU2.

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

0: System has not been in Standby mode

1: System has been in Standby mode

Bit 9 C1STOPF : System Stop flag for CPU1.

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

0: System has not been in Stop mode

1: System has been in Stop mode

Bit 8 C1SBF : System Standby flag for CPU1.

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:3 Reserved, must be kept at reset value.

Bit 2 CCRPF : Clear critical Radio system phase

Setting this bit clears the CRPF bit.

Bit 1 C2CSSF : Clear CPU2 Stop Standby flags

Setting this bit clears the C2STOPF and C2SBF bits.

Bit 0 C1CSSF : Clear CPU1 Stop Standby flags

Setting this bit clears the C1STOPF and C1SBF bits.

6.6.22 PWR register map and reset value table

Table 34. PWR register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x000PWR_CR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.LPRRes.Res.Res.Res.Res.DBPRes.Res.FPDSFPDRRes.LPMS [2:0]
Reset value0000000
0x004PWR_CR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PVME3Res.Res.Res.PLS [2:0]PVDE
Reset value00000
0x008PWR_CR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EIWULEC2HRes.EBLEAECRPEAPCRRSEBORHSMPSFBRes.Res.Res.Res.EWUP4Res.Res.EWUP1
Reset value100000000
0x00CPWR_CR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.C2BOOTRes.Res.Res.Res.Res.VBRSVBERes.Res.Res.Res.WP4Res.Res.WP1
Reset value00000
0x010PWR_SR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUFIC2HFRes.BLEAFCRPEFRes.BLEWUFBORHFRes.SMPSFBFRes.Res.WUF4Res.Res.WUF1
Reset value000000000
0x014PWR_SR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PVM03Res.PVDOVOSFREGLPFREGLPSRes.Res.Res.Res.Res.Res.SMPSFSMPSBFRes.
Reset value0000000
0x018PWR_SCRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.CC2HFRes.CBLEAFCCRPEFRes.CBLEWUFCBORHFRes.CSMPSFBFRes.Res.CWUF4Res.Res.CWUF1
Reset value00000000
0x01CPWR_CR5Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SMPSENRes.Res.Res.Res.Res.Res.BORHCRes.SMPS SC[2:0]Res.SMPS VOS[3:0]
Reset value00111xxxx
0x020PWR_PUCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU15PU14PU13PU12PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0Res.
Reset value0000000000000000
0x024PWR_PDCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD15PD14PD13PD12PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0Res.
Reset value0000000000000000
0x028PWR_PUCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU11PU10PU9PU8PU7PU6PU5PU4PU3PU2PU1PU0Res.
Reset value000000000000
0x02CPWR_PDCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PD11PD10PD9PD8PD7PD6PD5PD4PD3PD2PD1PD0Res.
Reset value000000000000
0x030PWR_PUCRCRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PU15PU14Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00

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

OffsetRegister313029282726252423222120191817161514131211109876543210
0x034PWR_PDCRCResResResResResResResResResResResResResResResReso PD15o PD14ResResResResResResResResResResResResResRes
Reset value
0x038Reserved
0x03CReserved
0x040PWR_PUCREResResResResResResResResResResResResResResResResResResResResResResResResResResReso PU4ResResResRes
Reset value
0x044PWR_PDCREResResResResResResResResResResResResResResResResResResResResResResResResResResReso PD4ResResResRes
Reset value
0x058PWR_PUCRHResResResResResResResResResResResResResResResResResResResResResResResResResResReso PU3ResResResRes
Reset value
0x05CPWR_PDCRHResResResResResResResResResResResResResResResResResResResResResResResResResResReso PD3ResResResRes
Reset value
0x080PWR_C2CR1ResResResResResResResResResResResResResResResReso BLEEWKUPResResResResResResResResResFPDSFPDRResLPMS [2:0]
Reset value0000
0x084PWR_C2CR3ResResResResResResResResResResResResResResResResEIWULResResAPCResReso EBLEWUPResResResReso EMUP4ResResReso EMUP1
Reset value1
0x088PWR_EXTSCRResResResResResResResResResResResResResResResResC2DSC1DSCRPFReso C2STOPFo C2SFo C1STOPFo C1SFResResResResCCRPFC2CSSFC1CSSFRes
Reset value000000

Refer to Section 2.2 on page 55 for the register boundary addresses.