5. Power controller (PWR)

The power controller block controls the analog supplies block and manages the startup, active and low power phase of the device including the transition from one state to another.

5.1 Features

The power controller block supports the following features:

5.2 Power supply domains

STM32WL3Rxx devices embed three power domains:

The digital power supplied are provided by different regulators:

An embedded SMPS step down converter is available (inserted between the external power and the LDOs), but can be bypassed statically or dynamically (see Control register 5 (PWR_CR5)).

Figure 4 shows an overview of the different regulators and connections between the power supply domains.

Figure 4. Power supply domain overview

Block diagram of the power supply domain overview showing regulators (LP-Reg, SMPS, MLDO, RFLDOs) and their connections to various domains (V33, AlwaysOn, Interruptible, Analog RF).

The diagram illustrates the power supply architecture of the RM0551. At the top, three main power lines are shown: \(V_{DDIO}\), \(V_{DDSD}\), and \(V_{FBSO}\). The \(V_{DDSD}\) line feeds into an SMPS (Switched Mode Power Supply) block. The SMPS output connects to an RFLDOs (Radio Frequency Low Dropout Regulator) block, which in turn provides \(V_{RF}\) to the Analog RF block. The SMPS also provides power to the VREG PAD block. The VREG PAD block contains two switches, CMDNO and CMDNI, controlled by gate signals VGATEN and VGATEP respectively. The output of the VREG PAD is \(V_{DD12O}\), which feeds into the AlwaysOn domain. The VREG PAD also connects to an LP-Reg (Low Power Regulator) block, which provides power to the V33 domain. The VREG PAD also connects to the Interruptible domain via \(V_{DD12I}\). The V33 domain (VDDIO) includes components: LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain (VDD12O) includes: MR_SUBGHz_wakeup, LPUART, RTC, IWDG, PWRCO, and RCCO. The Interruptible domain (VDD12I) includes: HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCI. The diagram is labeled MSv58743V1 in the bottom right corner.

Block diagram of the power supply domain overview showing regulators (LP-Reg, SMPS, MLDO, RFLDOs) and their connections to various domains (V33, AlwaysOn, Interruptible, Analog RF).

5.3 Power voltage supervisor

STM32WL3Rxx devices embed several power voltage monitoring:

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

During power on, the device remains in reset mode as long as \(V_{DDIO}\) is below a \(V_{POR}\) threshold (typically 1.65V).

During power down, the PDR puts the device under reset when the supply voltage (VDD) drops below the \(V_{PDR}\) threshold (around 20mV below \(V_{POR}\)). The PDR feature is always enabled.

Figure 5. Power on reset/power down reset waveform

Figure 5: Power on reset/power down reset waveform. The graph shows the relationship between VDDIO voltage (Y-axis) and time (T, X-axis). The VDDIO voltage ramps up and then down. The POR threshold is a horizontal dashed line. The PDR / BOR threshold is a lower horizontal dashed line. The hysteresis is the vertical distance between these two thresholds. The PORESETn signal is low during the reset period, which starts when VDDIO crosses the POR threshold and ends when it crosses the PDR / BOR threshold. The duration of the reset is labeled T_TEMPO.
Figure 5: Power on reset/power down reset waveform. The graph shows the relationship between VDDIO voltage (Y-axis) and time (T, X-axis). The VDDIO voltage ramps up and then down. The POR threshold is a horizontal dashed line. The PDR / BOR threshold is a lower horizontal dashed line. The hysteresis is the vertical distance between these two thresholds. The PORESETn signal is low during the reset period, which starts when VDDIO crosses the POR threshold and ends when it crosses the PDR / BOR threshold. The duration of the reset is labeled T_TEMPO.

With typical values as follow:

The Brown-Out reset (BOR) generates a device reset when the power supply (VDD) drops under \(V_{PDR}\).

This feature is always active except during the Shutdown mode where the software can decide to enable it or not (through the PWR_CR1.ENSDNBOR bit).

5.3.2 BORH

The BORH is a VDDIO monitoring that raised an associated signal when the monitored voltage drops under a specified threshold.

However, the goal of this device feature is to monitor the VDDIO versus 2.0 V. Indeed, when the VDDIO goes below 2.0 V, the SMPS should be stopped.

It is recommended to use the PVD feature at application level to monitor the VDDIO with freedom to program dynamic threshold without any impact nor relationship with the hardware.

This feature can be enabled/disabled through PWR_CR1.ENBORH bit.

This feature is disabled during Shutdown mode.

When the feature is enabled and the BORH detect a VDDIO below the threshold, a status flag is raised in the SYSCFG block that can generate an interrupt to the CPU if unmasked (see I/O interrupt status and clear register (IO_ISCR)).

Caution: The BORH is associated to a flash write protection: if a programming is on-going, the flash controller stops it before the end but through a proper sequence to avoid any flash corruption.

5.3.3 Power voltage detection (PVD)

The PVD can be used to monitor:

The PVD can be enabled or disabled through PWR_CR2.PVDE bit.

When the feature is enabled and the PVD measure a voltage below the comparator, a status flag is raised in the SYSCFG block that can generate an interrupt to the CPU if unmasked (see I/O interrupt status and clear register (IO_ISCR)).

5.4 Operating modes

STM32WL3Rxx devices support 3 main operating modes:

The transition from one mode to another is managed through a PMU state machine.

5.4.1 Run mode

In Run mode:

The power consumption may be reduced by gating the clock of the unused peripherals through the RCC clock enable registers (see Section 6.7: RCC register map).

The Figure 6 shows the regulators and SMPS configuration in Run mode with a product with 32 Kbytes of RAM.

Figure 6. Power regulators and SMPS configuration in Run mode

Block diagram of power regulators and SMPS configuration in Run mode. The diagram shows the power distribution from Vss and external supplies (VDDIO, VDDSD) through regulators (LP-Reg, MLDO) and an SMPS to three main domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). It details the components within each domain and the control signals (CMDNO, CMDNI) from the VREG PAD.

The diagram illustrates the power management architecture in Run mode. Key components and connections include:

MSv58744V1

Block diagram of power regulators and SMPS configuration in Run mode. The diagram shows the power distribution from Vss and external supplies (VDDIO, VDDSD) through regulators (LP-Reg, MLDO) and an SMPS to three main domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). It details the components within each domain and the control signals (CMDNO, CMDNI) from the VREG PAD.

5.4.2 Deepstop mode

Deepstop is the only low-power mode of STM32WL3Rxx devices, allowing to restart from a saved context environment and go on running the application at wakeup.

The conditions to enter the Deepstop mode are:

In Deepstop mode:

The current regulation status of the LPREG is reported by the PWR_CR2.LPREG_VH_STATUS bit

Possible wakeup sources:

After wakeup from Deepstop, all the I/Os (except PA2 and PA3) are in retention mode; if DBGRET bit is set (in this case also PA2 and PA3 are in retention mode), retaining the configuration they had before entering Deepstop. To change their configuration, when exiting Deepstop, it is necessary to reset GPIORET bit after having re-configured GPIO registers through Section 7.4: GPIO registers (this GPIO configuration, can be the same before entering DEESPTOP, or a new one). If DBGRET bit was reset before entering Deepstop, PA2 and PA3 take their GPIO reset configuration after wakeup from Deepstop, until a new GPIO configuration is set.

At wakeup, the hardware resources located in the VDD12i power domain are reset, the CPU reboots. The wakeup reason is visible in a PWR register (see Internal source wakeup status register (PWR_IWUF), Port A wakeup status register (PWR_WUFA) and Port B wakeup status register (PWR_WUFB) for details).

Figure 7 shows the regulators and SMPS configuration in Deepstop mode, with a configuration requesting retention on the SRAM0 bank.

Figure 7. Power regulators and SMPS configuration in Deepstop mode

Block diagram of power regulators and SMPS configuration in Deepstop mode. The diagram shows three main power domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). The V33 domain includes LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain includes MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain includes HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCi. Power regulators include LP-Reg, SMPS, and MLDO. Control signals include CMDNO, CMDNI, VGATEN, and VGATEP. Memory blocks include RAM0 and FLASH. Other components include PU/PD, IOs, and LS IO management. External pins shown are Vss, VDDIO, VDDSD, PAD reset, and VDD12I.

The diagram illustrates the power management architecture in Deepstop mode. It features three primary power domains: the V33 domain (VDDIO), the AlwaysOn domain (VDD12O), and the Interruptible domain (VDD12I). The V33 domain contains low-power peripherals like LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain maintains essential functions including MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain supports the main system components: HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCi. Power is supplied by an LP-Regulator to the V33 domain and a SMPS to the Interruptible domain. A VREG PAD with CMDNO and CMDNI control signals and transistors VGATEN and VGATEP manages the power flow between domains. The MLDO regulator provides VDD12I. Memory is split into RAM0 (AlwaysOn) and FLASH (Interruptible). The PU/PD and IOs blocks manage power-up/down and I/O states, while LS IO management coordinates between domains. External pins Vss, VDDIO, VDDSD, PAD reset, and VDD12I are also indicated.

Block diagram of power regulators and SMPS configuration in Deepstop mode. The diagram shows three main power domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). The V33 domain includes LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain includes MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain includes HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCi. Power regulators include LP-Reg, SMPS, and MLDO. Control signals include CMDNO, CMDNI, VGATEN, and VGATEP. Memory blocks include RAM0 and FLASH. Other components include PU/PD, IOs, and LS IO management. External pins shown are Vss, VDDIO, VDDSD, PAD reset, and VDD12I.

MSv58745V1

5.4.3 Ultra Deepstop mode

Ultra DeepStop mode is the least power consuming mode that can retain crucial information in RAM.

The conditions to enter the Ultra Deepstop mode are the same as those required to enter Shutdown mode, except that the PWR_PDCRA.UDS bit must be equal to 1 (PWR_DBGR.DEEPSTOP2 bit must be maintained equal to 0).

In Ultra Deepstop mode:

An Ultra Deepstop exit is similar to a POR board startup, but the content of the RAM0 is kept throughout the low-power period. The associated reset reason is the PORRSTF flag or EWUF flag (see V33 reset status register (RCC_CSR) for the reset reason flag details, or Shutdown I/O Wakeup Flag register (PWR_SDWN_WUF) for the PB0/PA0/PA7/PA8/PA9/PA11 wakeup flag).

The BOR feature can be enabled or disabled during Ultra Deepstop mode through the PWR_CR1.ENSDNBOR bit.

The following figure shows the regulators and SMPS configuration in Ultra Deepstop mode, configured with the BOR reset disabled.

Figure 8. Power regulators and SMPS configuration in Ultra Deepstop mode

Block diagram of power regulators and SMPS configuration in Ultra Deepstop mode. The diagram shows three main power domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). The V33 domain includes LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain includes MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain includes HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCI. Power regulators include LP-Reg, SMPS, and MLDO. A VREG PAD contains CMDNO and CMDNI switches. Memory blocks RAM0 and FLASH are shown. Control signals include Vss, VDDIO, VDDSD, PAD reset, PU/PD, and IOs. Gate signals VGATEN and VGATEP control the regulators.

The diagram illustrates the power management architecture in Ultra Deepstop mode. It features three primary power domains: the V33 domain (VDDIO), the AlwaysOn domain (VDD12O), and the Interruptible domain (VDD12I). The V33 domain contains low-power peripherals like LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain maintains essential functions including MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain houses the main system components: HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCI. Power is supplied through an LP-Regulator (LP-Reg) and a Switched-Mode Power Supply (SMPS). A VREG PAD with CMDNO and CMDNI switches controls the regulators via VGATEN and VGATEP signals. Memory is provided by RAM0 and FLASH. The system includes a PAD reset block, PU/PD control, and IOs. External power inputs are Vss, VDDIO, and VDDSD.

MSv58746V1

Block diagram of power regulators and SMPS configuration in Ultra Deepstop mode. The diagram shows three main power domains: V33 domain (VDDIO), AlwaysOn domain (VDD12O), and Interruptible domain (VDD12I). The V33 domain includes LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn domain includes MR_SUBGHz_wakeup, RTC, WDOG, PWRCO, and RCCO. The Interruptible domain includes HSI, HSE, CPU, RF_FSM, MR_SUBGHz, Peripherals, and RCCI. Power regulators include LP-Reg, SMPS, and MLDO. A VREG PAD contains CMDNO and CMDNI switches. Memory blocks RAM0 and FLASH are shown. Control signals include Vss, VDDIO, VDDSD, PAD reset, PU/PD, and IOs. Gate signals VGATEN and VGATEP control the regulators.

5.4.4 Shutdown mode

The Shutdown mode is the least power consuming mode.

The conditions to enter the Shutdown mode are the same conditions needed to enter in Deepstop mode except that the PWR_CR1.LPMS bit must be equal to 1 (PWR_DBGR.DEEPSTOP2 bit must be maintained equal to 0). In Shutdown mode:

A Shutdown exit is similar to a POR startup of the board. The associated reset reason is the PORRSTF flag or EWUF flag (see V33 reset status register (RCC_CSR) for reset reason flags detail or Shutdown I/O Wakeup flag register (PWR_SDWN_WUF) for PB0 wakeup flag).

The BOR feature may be enabled or disabled during Shutdown through the PWR_CR1.ENSDNBOR bit).

The Figure 9 shows the regulators and SMPS configuration in Shutdown mode, configured with the BOR reset disabled.

Figure 9. Power regulators and SMPS configuration in Shutdown mode

Figure 9: Power regulators and SMPS configuration in Shutdown mode block diagram.

Diagram of power regulators and SMPS configuration in Shutdown mode:

Figure 9: Power regulators and SMPS configuration in Shutdown mode block diagram.

MSv58747V1

STMicroelectronics logo
STMicroelectronics logo

5.4.5 Operating modes transition management

The PWR block manages the switches from an operating mode to another through a state machine.

Figure 10. PWR state machine for operating mode transitions

State machine diagram for PWR operating mode transitions. It shows five states: START (reset), RUN, SHUTDOWN, ULTRA DEEPSTOP, and DEEPSTOP. Transitions are triggered by events like RESETn, DEEPSTOP & RF OFF & CR1.LPMS=SHUTDOWN, wakeup, and DEEPSTOP & RF OFF & CR1.LPMS=DEEPSTOP. Each state has a list of register settings.
stateDiagram-v2
    [*] --> START
    START --> RUN : RESETn
    RUN --> SHUTDOWN : DEEPSTOP & RF OFF & CR1.LPMS=SHUTDOWN
    RUN --> ULTRA_DEEPSTOP : DEEPSTOP & RF OFF & CR1.LPMS=DEEPSTOP
    RUN --> DEEPSTOP : DEEPSTOP & RF OFF & CR1.LPMS=DEEPSTOP
    ULTRA_DEEPSTOP --> RUN : wakeup
    DEEPSTOP --> RUN : wakeup
    SHUTDOWN --> START : RESETn
    DEEPSTOP --> SHUTDOWN : DEEPSTOP & RF OFF & CR1.LPMS=SHUTDOWN
    

START (reset)
LPREG: OFF
MLDO: OFF
SMPS: PRECHARGE
RFLDO: OFF
LSI/LSE: OFF
HSI: OFF
HSE: OFF
POR

RUN
LPREG: ON/OFF
MLDO: ON (1.2V)
SMPS: ON/BYP
RFLDO: ON/OFF
LSI: ON/OFF
LSE: ON/OFF
HSI: ON
HSE: ON/OFF
CCPU: STOP => DEEPSLEEP
RF: OFF => Ready2Sleep

SHUTDOWN
LPREG: OFF
MLDO: OFF
SMPS: OFF
RFLDO: OFF
LSI/LSE: OFF
HSI: OFF
HSE: OFF
POR,
EXT reset pin, WKUP pins

ULTRA DEEPSTOP
LPREG: ON
MLDO: OFF
SMPS: OFF
RFLDO: OFF
LSI/LSE: OFF
HSI: OFF
HSE: OFF
POR,
EXT reset pin, WKUP pins

DEEPSTOP
LPREG: ON (0.95V)
MLDO: OFF
SMPS: PRECHARGE/(OPEN?)
RFLDO: OFF
LSI: ON/OFF
LSE: ON/OFF
HSI: OFF
HSE: OFF

State machine diagram for PWR operating mode transitions. It shows five states: START (reset), RUN, SHUTDOWN, ULTRA DEEPSTOP, and DEEPSTOP. Transitions are triggered by events like RESETn, DEEPSTOP & RF OFF & CR1.LPMS=SHUTDOWN, wakeup, and DEEPSTOP & RF OFF & CR1.LPMS=DEEPSTOP. Each state has a list of register settings.

5.5 SMPS step down regulator

The STM32WL3Rxx SMPS is a 120 mA output step down SMPS (switch mode power supply)

The SMPS output voltage can be programmed from 1.2 V to 2.4 V. Its internal clock frequency is 4 MHz or 8 MHz when RCC_KRMR.KRMEN=0 (see SMPS clock variable rate multiplier register (RCC_KRMR)) or a programmable frequency clock SMPS_CLK_KRM when RCC_KRMR.KRMEN=1. In this latter case the SMPS can be clocked at System Clock divided by 8 to 16 with unitary steps (CLK_SMPS_KRM). This feature can be useful in case the channel to be received is at a frequency that is an integer multiple of the SMPS clock.

The SMPS can be in different configurations:

Except for the configuration SMPS OFF, a L/C BOM must be present on the board and connected to the \(V_{FBSD}\) pad (see Figure 11).

Figure 11. Power supply configuration

Figure 11 shows two power supply configurations: SMPS supply configuration and NOSMPS supply configuration. Both diagrams show a block diagram of the power supply system. The SMPS supply configuration includes an inductor (L) and a capacitor (C) connected to the SMPS Step Down converter. The NOSMPS supply configuration does not include the inductor and capacitor. Both configurations show the SMPS Step Down converter connected to the Main LDO, RF LDO, and LP Reg. The SMPS supply configuration also shows a connection to VDDSD and VFBSD, while the NOSMPS supply configuration shows a connection to VDDSD and VCAP.
Figure 11 shows two power supply configurations: SMPS supply configuration and NOSMPS supply configuration. Both diagrams show a block diagram of the power supply system. The SMPS supply configuration includes an inductor (L) and a capacitor (C) connected to the SMPS Step Down converter. The NOSMPS supply configuration does not include the inductor and capacitor. Both configurations show the SMPS Step Down converter connected to the Main LDO, RF LDO, and LP Reg. The SMPS supply configuration also shows a connection to VDDSD and VFBSD, while the NOSMPS supply configuration shows a connection to VDDSD and VCAP.

The user must configure the field PWR_CR5.SMPSBOMSEL[1:0] according to the BOM implemented on his board. The value to program is indicated in Table 12.

Table 12. SMPS BOM information

BOMInductor (L)Output capacitor (C)SMPSBOMSEL[1:0]
BOM11.5 μH2.2 μF00
BOM22.2 μH4.7 μF01
BOM310 μH4.7 μF10

The SMPS is managed by the PWR through a state machine shown in Figure 12.

Figure 12. PWR SMPS state machine overview Figure 12. PWR SMPS state machine overview
stateDiagram-v2
    [*] --> STARTUP : RESETn
    STARTUP --> SMPS_REQ
    STARTUP : smps_req=0
    STARTUP : smps_precharge=1
    SMPS_REQ --> RUN : smps_rdy OR CR5.SMPSFRDY
    SMPS_REQ : smps_req=1
    SMPS_REQ : smps_precharge=1
    RUN --> STOP : ds_entry
    STOP --> RUN : ds_exit
    RUN --> NOSMPS : -CR5.NOSMPS-
    RUN --> PRECHARGE : -CR5.SMPSFBYP & !CR5.NOSMPS-
    RUN : smps_req=1
    RUN : smps_precharge=1
    STOP : smps_req=0
    STOP : smps_precharge=~CR5.SMPSLPOPEN
    NOSMPS --> RUN : !CR5.NOSMPS
    NOSMPS : smps_req=0
    NOSMPS : smps_precharge=0
    PRECHARGE --> RUN : !CR5.SMPSFBYP
    PRECHARGE : smps_req=0
    PRECHARGE : smps_precharge=1
Figure 12. PWR SMPS state machine overview

After a Power On reset sequence, the SMPS FSM always goes up to RUN state.

From there, the SMPS FSM can stay in three states (others are transition states):

When the device enters in Deepstop mode, the PWR automatically switches the SMPS from Run to STOP mode, which can be:

5.5.1 SMPS bypass on-the-fly (BOF)

Bypass on-the-fly (BOF) is a feature that permits to bypass the SMPS. This can be done directly with a power switch (static bypass mode) or via an LDO (dynamic bypass mode).

In case radio extra sensitivity is needed, the user can switch on the fly on LDO (dynamic bypass mode) before entering radio receiver mode. In this way the SMPS is OFF.

This can be handled by software through an interrupt handler on RX request. The interrupt that may control is MR_SUBG TX/RX Sequence interrupt.

When BOF is done in static bypass mode, the SMPS is disabled and the SMPS output is connected to the battery via an internal switch. In this case both Deepstop and Run mode operations can be chosen.

The static mode connects the SMPS output to the battery after the first start-up of STM32WL3Rxx devices and the connection is done until a reset occurs.

When BOF is done in dynamic bypass mode, the SMPS is disabled and the LDO is enabled. The LDO is connected between the battery and the SMPS output. LDO voltage is programmable through register PWR_BOF_TUNE.BOFO_TUNE. It is recommended to use the same output voltage than the one chosen for the SMPS through PWR_CR5.SMPSLVL register. If it's not the case, only BOF LDO output voltage less than SMPS output voltage must be chosen. In this case only Run mode operation is possible.

A current limitation is implemented in both static and dynamic bypass modes. It is set via PWR_DBGSMPS.BOFO_CUR_SEL bits. Always use a bigger current limitation than the current expected to flow through the BOF. For example, for +14dBm transmission, a current consumption from the battery of 40mA is expected. In this case 60mA current limitation has to be set.

5.5.1.1 How to program a static bypass mode:

  1. 1. Program PWR_DBGSMPS.BOFO_CUR_SEL
  2. 2. Program PWR_CR5.SMPS_BOFO_STATIC=1
  3. 3. PROGRAM PWR_CR5.NOSMPS_BOFO=1

5.5.1.2 Program a dynamic bypass mode:

  1. 1. Program PWR_DBGSMPS.BOFO_CUR_SEL, PWR_CR5.SMPSLVL if not already done in the sequence, PWR_BOFO_TUNE.BOFO_TUNE
  2. 2. Program PWR_CR5.SMPS_BOFO_DYN=1
  3. 3. Program PWR_CR5.NOSMPS_BOFO=1

5.6 PWR register descriptions

Note: All the PWR APB registers are only 16-bit registers. The 16 MSBs are always stuck at 0.

5.6.1 Control register 1 (PWR_CR1)

This register control the BOR in Shutdown, the BORH feature, the low power mode selection and the IO control owner.

Address offset: 0x00

Reset value: 0x0000 0114

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.ENBORLRes.Res.ENBORHAPCIBIAS_RUN_STATEIBIAS_RUN_AUTOENSDNBORLPMS
rwrwrwrwrwrwrw

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

Bit 8 ENBORL: Enable BORL reset supervising during Run mode

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

Bit 5 ENBORH: Enable the BORH software configuration.

Bit 4 APC: Apply pull-up/-down configuration from PWR or GPIO register.

Bit 3 IBIAS_RUN_STATE: Enable/Disable IBIAS during Run mode when automatic mode is disabled

Bit 2 IBIAS_RUN_AUTO: Enable automatic IBIAS control during Run/Deepstop mode.

Bit 1 ENSDNBOR: Enable BOR reset supervising during Ultra Deepstop/Shutdown mode.

Note: Enabling this feature prevents blocking the device if VDDIO goes below supported voltages during Ultra Deepstop/Shutdown mode. However, it adds an overconsumption.

Bit 0 LPMS: Low Power Mode Selection.

This bit defines if the device enters Deepstop or Shutdown mode when both CPU and MR_SUBG requests a low power mode entry.

5.6.2 Control register 2 (PWR_CR2)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.RFREG
ON_ST
ATUS
RFREG
RDY
RFREG
BYP
RFREG
CEXT
RFREG
EN
Res.GPIOR
ET
LPREG
_VH_S
TATUS
LPREG
_FORC
E_VH
Res.DBG
R
ET
PVDLS[2:0]PVDE
rrrwrwrwrwrrwrwrwrwrwrw

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

Bit 14 RFREGON_STATUS: RF Regulator On Status.

Bit 13 RFREGRDY: RF Regulator Ready flag

Bit 12 RFREGBYP: RF Regulator Bypass Enable

Bit 11 RFREGCEXT: RF Regulator External Supply Bypass

Bit 10 RFREGEN: RF Regulator enable

Note: it is mandatory to ensure GPIORET bit is set before entering Deepstop in order GPIOs retain their configuration.

5.6.3 Internal source wakeup enable register (PWR_IEWU)

This register manages the selection of the internal wakeup sources to get out of Deepstop mode.

Note: All wakeup sources are disabled by default after reset.

Address offset: 0x08

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.EWMR
SUBG
HCPU
EWMR
SUBG
Res.Res.Res.Res.Res.Res.EIWL1EIWL0
rwrwrwrw

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

Bit 9 EWMRSUBGHCPU: Enable wakeup on MRSUBG Host CPU event.

Bit 8 EWMRSUBG: Enable wakeup on MRSUBG RFIP event.

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

Bit 1 EIWL1: Enable wakeup on Internal event (RTC).

Bit 0 EIWL0: Enable wakeup on Internal event (LPUART).

5.6.4 Internal source wakeup polarity register (PWR_IWUP)

This register manages the polarity for the internal wakeup sources to get out of Deepstop mode.

Note: The wakeup event are only edge detection, not level detection.

Address offset: 0x0C

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.WMRS
UBGH
CPUP
WMRS
UBGP
Res.Res.Res.Res.Res.Res.IWUP1IWUP0
rwrwrwrw

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

Bit 9 WMRSUBGHCPUP: Wakeup polarity for MRSUBG Host CPU event.

Bit 8 WMRSUBGP: Wakeup polarity for MRSUBG event.

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

Bit 1 IWUP1: Wakeup polarity for internal wakeup line 1 event (RTC).

Bit 0 IWUP0: Wakeup polarity for internal wakeup line 0 event (LPUART).

5.6.5 Internal source wakeup status register (PWR_IWUF)

This register provides the information concerning which internal source woke up the device after a Deepstop.

Address offset: 0x10

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.WMRS
UBGH
CPUF
WMRS
UBGF
Res.Res.Res.Res.Res.Res.IWUF1IWUF0
rc_w1rc_w1rc_w1rc_w1

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

Bit 9 WMRSUBGHCPUF: MRSUBG Host CPU wakeup flag.

Cleared by writing 1 in this bit.

Bit 8 WMRSUBGF: MRSUBG wakeup flag.

Cleared by writing 1 in this bit.

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

Bit 1 IWUF1: Internal wakeup flag (RTC).

Cleared by writing 1 in this bit.

Bit 0 IWUF0: Internal wakeup flag (LPUART).

Cleared by writing 1 in this bit.

5.6.6 Status register 2 (PWR_SR2)

This register provides some status flags related to the Power Voltage Detector and the SMPS blocks.

Address offset: 0x14

Reset value: 0x0000 X3X6

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
IOBOOTVAL[3:0]PVDORes.REGM
S
REGLP
S
IOBOOTVAL2[3:0]Res.SMPS
RDY
SMPSEN
R
SMPSB
YPR
rrrrrrrrrrrrrr

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

Bits 15:12 IOBOOTVAL: I/Os value latched at POR.

Note: This information may be used by the boot loader to manage boot on serial interfaces for instance.

Bit 11 PVDO: Power voltage Detector Output.

When the Power voltage Detector is enabled (PWR_CR2.PVDE=1), this bit indicates when the VDDIO is lower than the selected threshold (through PWR_CR2.PVDLS bit field).

Bit 10 Reserved, must be kept at reset value.

Bit 9 REGMS: Main regulator ready status.

Bit 8 REGLPS: Low Power regulator ready status.

Bits 7:4 IOBOOTVAL2: I/Os value latched at POR.

Note: This information may be used by the boot loader to manage boot on serial interfaces for instance.

Bit 3 Reserved, must be kept at reset value.

5.6.7 Control register 5 (PWR_CR5)

This register is used to configure the SMPS.

Address offset: 0x1C

Reset value: 0x0000 6024

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
SMPS_
BOF_D
YN
SMPS_PRECH_
CUR_SEL[1:0]
CLKDE
TR_DI
SABLE
SMPS_
ENA_D
CM
NOSM
PS
SMPSF
BYP
SMPSL
POPEN
NOSM
PS_BO
F
SMPS_
BOF_S
TATIC
SMPSBOMSEL[
1:0]
SMPSLVL[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bit 10 NOSMPS: No SMPS mode.

Note: this configuration (SMPS disabled) should be used only when the SMPS_FB pad is directly connected to the VBATT (external voltage), without L/C BOM.

Bit 9 SMPSFBYP: Force the SMPS in PRECHARGE mode.

Note: when this bit is set, the VSMPS output is connected to the VDDIO. The actual state of the SMPS is visible in the SMPS mode status bits in PWR_SR2 register.

Bit 8 SMPSLPOPEN: Select OPEN mode instead of PRECHARGE mode for the SMPS during Deepstop.

Bit 7 NOSMPS_BOF: No SMPS Mode in the case of BOF usage

When this bit is set, the SMPS regulator is disabled.

Note: this configuration should be used only when SMPS_BOF_STATIC=1 or SMPS_BOF_DYN=1 and permits both Run and Deepstop operating modes.

Bits 5:4 SMPSBOMSEL[1:0]: Select the SMPS BOM.

Note: BOM correspondence/details is available in Table 12: SMPS BOM information.

Bits 3:0 SMPSLVL[3:0]: Select the SMPS output voltage level.

This bit field selects the SMPS voltage output level with a granularity of 100 mV.

– Warning: The SMPS output voltage must not be changed while the SMPS is in use. The sequence to reprogram a new SMPS output voltage is described in Section 5.8.2: SMPS output level re-programming.

5.6.8 I/O Port A pull-up control register (PWR_PUCRA)

This register is used to control the pull-up for the PA0 to PA15 I/O when the PWR_CR1.APC bit is set.

Caution: If both pull-up and pull-down are enabled in the PWR_PUCRA and PWR_PDCRA registers for an I/O, then pull-down is applied.

The user must take care to disable the pull on I/O programmed in Analog mode.

Address offset: 0x20

Reset value: 0x0000 FFF7

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.PUA11PUA10PUA9PUA8PUA7Res.Res.Res.PUA3PUA2PUA1PUA0
rwrwrwrwrwrwrwrwrw

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

Bits 11:7 PUAx (x=11 to 7): pull-up enable for PAx I/O.

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

Bits 3:0 PUAx (x=3 to 0): pull-up enable for PAx I/O.

5.6.9 I/O Port A pull-down control register (PWR_PDCRA)

This register is used to control the pull-down for the PA0 to PA15 I/O when the PWR_CR1.APC bit is set.

Caution: If both pull-up and pull-down are enabled in the PWR_PUCRA and PWR_PDCRA registers for an I/O, then pull-down is applied.

The user must take care to disable the pull on I/O programmed in Analog mode.

Address offset: 0x24

Reset value: 0x0000 0008

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.PDA11PDA10PDA9PDA8PDA7UDSRes.Res.PDA3PDA2PDA1PDA0
rwrwrwrwrwrwrwrwrwrw

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

Bits 11:7 PDAx (x=11 to 7): pull-down enable for PAx I/O.

Bit 6 UDS: set Ultra Deepstop mode (it is reset only by a POR reset).

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

Bits 3:0 PDAx (x=3 to 0): pull-down enable for PAx I/O.

5.6.10 I/O Port B pull-up control register (PWR_PUCRB)

This register is used to control the pull-up for the PB0 to PB15 I/O when the PWR_CR1.APC bit is set.

Caution: If both pull-up and pull-down are enabled in the PWR_PUCRA and PWR_PDCRA registers for an I/O, then pull-down is applied.

The user must take care to disable the pull on I/O programmed in Analog mode.

Address offset: 0x28

Reset value: 0x0000 FFFF

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PUB15PUB14PUB13PUB12Res.Res.Res.Res.PUB7PUB6Res.Res.Res.PUB2PUB1PUB0
rwrwrwrwrwrwrwrwrw

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

Bits 15:12 PUBx (x=15 to 12): Pull-up enable for PBx I/O.

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

Bits 7:6 PUBx (x=8 to 6): Pull-up enable for PBx I/O.

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

Bits 2:0 PUBx (x=2 to 0): Pull-up enable for PBx I/O.

5.6.11 I/O Port B pull-down control register (PWR_PDCRB)

This register is used to control the pull-down for the PB0 to PB15 I/O when the PWR_CR1.APC bit is set.

Caution: If both pull-up and pull-down are enabled in the PWR_PUCRA and PWR_PDCRA registers for an I/O, then pull-down is applied.

The user must take care to disable the pull on I/O programmed in Analog mode.

Address offset: 0x2C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PDB15PDB14PDB13PDB12Res.Res.Res.Res.PDB7PDB6Res.Res.Res.PDB2PDB1PDB0
rwrwrwrwrwrwrwrwrw

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

Bits 15:12 PDBx (x=15 to 12): pull-down enable for PBx I/O.

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

Bits 7:6 PDBx (x=7 to 6): pull-down enable for PBx I/O.

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

Bits 2:0 PDBx (x=2 to 0): pull-down enable for PBx I/O.

5.6.12 Port A wakeup enable register (PWR_EWUA)

This register manages the selection of the wakeup sources related to IO port A to get out of Deepstop mode.

Note: All wakeup sources are disabled by default after reset.

Address offset: 0x30

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.EWU11EWU10EWU9EWU8EWU7Res.Res.Res.EWU3EWU2EWU1EWU0
rwrwrwrwrwrwrwrwrw

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

Bits 11:7 EWUx (x = 11 to 7): Enable wakeup on PAx I/O event.

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

Bits 3:0 EWUx (x = 3 to 0): Enable wakeup on PAx I/O event.

5.6.13 Port A wakeup polarity register (PWR_WUPA)

This register manages the polarity for the port A I/Os wakeup sources to get out of Deepstop mode.

Note: The wakeup event are only edge detection, not level detection.

Address offset: 0x34

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.WUP11WUP10WUP9WUP8WUP7Res.Res.Res.WUP3WUP2WUP1WUP0
rwrwrwrwrwrwrwrwrw

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

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

5.6.14 Port A wakeup status register (PWR_WUFA)

This register provides the information concerning which port A I/O source woke up the device after a Deepstop.

Address offset: 0x38

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.WUF11WUF10WUF9WUF8WUF7Res.Res.Res.WUF3WUF2WUF1WUF0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

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

Bits 11:7 WUFx (x = 11 to 7): PAx I/O wakeup flag.

Cleared by writing 1 in this bit.

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

Bits 3:0 WUFx (x = 3 to 0): PAx I/O wakeup flag.

Cleared by writing 1 in this bit.

5.6.15 Port B wakeup enable register (PWR_EWUB)

This register manages the selection of the wakeup sources related to IO port B to get out of Deepstop mode.

Note: All wakeup sources are disabled by default after reset.

Address offset: 0x40

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
EWU14EWU14EWU13EWU12Res.Res.Res.Res.EWU7EWU6Res.Res.Res.EWU2EWU1EWU0
rwrwrwrwrwrwrwrwrw

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

Bits 15:12 EWUx (x = 14 to 12): Enable wakeup on PBx I/O event.

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

Bits 7:6 EWUx (x = 7 to 6): Enable wakeup on PBx I/O event.

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

Bits 2:0 EWUx (x = 2 to 0): Enable wakeup on PBx I/O event.

5.6.16 Port B wakeup polarity register (PWR_WUPB)

This register manages the polarity for the port B I/Os wakeup sources to get out of Deepstop mode.

Note: The wakeup event are only edge detection, not level detection.

Address offset: 0x44

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
WUP15WUP14WUP13WUP12Res.Res.Res.Res.WUP7WUP6Res.Res.Res.WUP2WUP1WUP0
rwrwrwrwrwrwrwrwrw

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

Bits 15:12 WUPx (x = 15 to 12): Wakeup polarity for PBx IO event.

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

Bits 7:6 WUPx (x = 7 to 6): Wakeup polarity for PBx IO event.

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

Bits 2:0 WUPx (x = 2 to 0): Wakeup polarity for PBx IO event.

5.6.17 Port B wakeup status register (PWR_WUFB)

This register provides the information concerning which port B I/O woke up the device after a Deepstop.

Address offset: 0x48

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
WUF15WUF14WUF13WUF12Res.Res.Res.Res.WUF7WUF6Res.Res.Res.WUF2WUF1WUF0
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

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

Bits 15:12 WUFx (x = 15 to 12): PBx I/O wakeup flag.

– 0: no wakeup from PBx I/O occurred since last clear.

– 1: a wakeup from PBx I/O occurred since last clear.

Cleared by writing 1 in this bit.

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

Bits 7:6 WUFx (x = 7 to 6): PBx I/O wakeup flag.

– 0: no wakeup from PBx I/O occurred since last clear.

– 1: a wakeup from PBx I/O occurred since last clear.

Cleared by writing 1 in this bit.

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

Bits 2:0 WUFx (x = 2 to 0): PBx I/O wakeup flag.

– 0: no wakeup from PBx I/O occurred since last clear.

– 1: a wakeup from PBx I/O occurred since last clear.

Cleared by writing 1 in this bit.

5.6.18 Shutdown I/O wakeup enable register (PWR_SDWN_WUEN)

Address offset: 0x4C

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.Res.Res.Res.WUEN
rw

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

5.6.19 Shutdown I/O wakeup polarity register (PWR_SDWN_WUPOL)

Address offset: 0x50

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.Res.Res.Res.WUPO
L
rw

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

5.6.20 Shutdown I/O Wakeup flag register (PWR_SDWN_WUF)

This register is reset on PORESETn.

Address offset: 0x54

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.Res.Res.Res.WUF
rc_w0

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

Bit 0 WUF: PB0, PA0, PA7, PA8, PA9, PA11 pin I/O wakeup from Ultra Deepstop/Shutdown mode flags.

5.6.21 Bypass on-the-fly tuning register (PWR_BOF_TUNE)

Address offset: 0x58

Reset value: 0x0000 0004

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.BOF_TUNE[3:0]
rwrwrwrw

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

Bits 3:0 BOF_TUNE[3:0]: SMPS Bypass on the fly (BOF) tuning bits.

ST logo
ST logo

5.6.22 Debug register (PWR_DBGR)

This register is used for debug features.

This register is reset on PORESETn.

Address offset: 0x84

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.Res.Res.Res.DEEPSTOP2
rw

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

ST logo
ST logo

5.6.23 Extended status and reset register (PWR_EXTSRR)

This register provides flags about RF SUBGHz radio activity start and Deepstop sequence occurrence or not.

Address offset: 0x88

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.RFPHASEFDEEPSTOPFRes.Res.Res.Res.Res.Res.Res.Res.Res.
rc_w1rc_w1

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

Bit 10 RFPHASEF: RFPHASE Flag.

– 0: the RF SUBGHz IP does not require any attention.

– 1: the RF SUBGHz IP is awake and may require a system attention.

This bit is set by hardware when a radio wakeup event occurs.

This bit is reset by hardware when the RF SUBGHz IP raises the “ready to sleep” information.

The software can reset this bit by writing 1 in it.

Bit 9 DEEPSTOPF: System DEEPTSTOP Flag.

– 0: the device did not enter Deepstop mode.

– 1: the device entered a Deepstop mode.

This bit is set by hardware when a Deepstop sequence occurred.

The software can reset this bit by writing 1 in it.

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

5.6.24 Debug SMPS register (PWR_DBGSMPS)

This register drives some control signals for the SMPS.

Address offset: 0x8C

Reset value: 0x0000 8000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
BOF_CUR_SEL[1:0]ILIM_BOOSTDIS_ILIMRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
rwrwrw

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

Bit 12 DIS_ILIM: DIS_ILIM_3V3 SMPS control signal.

Bit 11:0 Reserved, must be kept at reset value.

ST logo
ST logo

5.6.25 Trimming values from engineering register (PWR_TRIMR)

This register provides the trimming values applied by hardware according to the trimming done at EWS.

Address offset: 0x90

Reset value: 0x----- (0x0000 2304 when device is not trimmed)

Note: A Hardware default value is defined after reset. It is be overload by the information stored in Flash on trimmed devices and kept as is for devices without trimming information.

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.SMPS_TRIMTRIM_MRRes.RFD_REG_TRIM
rrrrrrrrrr

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

Bits 10:8 SMPS_TRIM[2:0]: SMPS output voltage trimming.
Note: the default value is the centered value ("011").

Bits 7:4 TRIM_MR[3:0]: Main regulator voltage trimming.
Default value when no trimming is "0000".

Bit 3 Reserved, must be kept at reset value.

Bits 2:0 RFD_REG_TRIM[2:0]: RF LDO trimming.
Default value when no trimming is "100".

5.6.26 Software trimming values register (PWR_ENGTRIM)

This register allows the software overloading the hardware trimming flashed at EWS.

Address offset: 0x94

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.SMPS_TRIM[2:0]SMPSTRIMENTRIM_MR[3:0]TRIMMRENRes.TRIM_RFDREG[2:0]TRIMRFDREGEN
rwrwrwrwrwrwrwrwrwrwrwrwrw

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

Bits 13:11 SMPS_TRIM[2:0]: SMPS output voltage trimming chosen by the software.

Bit 10 SMPSTRIMEN: SMPS_TRIM software overload enable.

Bits 9:6 TRIM_MR[3:0]: Main regulator voltage trimming chosen by the software.

Bit 5 TRIMMREN: TRIM_MR software overload enable.

Bit 4 Reserved, must be kept at reset value.

Bits 3:1 TRIM_RFDREG[2:0]: RF LDO trimming chosen by the software.

Bit 0 TRIMRFDREGEN: RFD_REG_TRIM software overload enable.

5.7 PWR register map

Refer to Table 3: Memory map and peripheral register boundary addresses for the PWR base address location in STM32WL3Rxx devices.

Note: All the PWR registers are retained during Deepstop mode.

Table 13. PWR register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00PWR_CR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ENBORLRes.ENBORHAPCIBIAS_RUN_STATEIBIAS_RUN_AUTOENSDNBRLPMS
Reset value10101000
0x04PWR_CR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RFREGON_STATUSRFREGRDYRFREGBYPRFREGCEXTRFREGENRes.GPIO_RETLPREG_VH_STATUSLPREG_VORCE_VHRes.DBGRETPVDLSPVDE
Reset value000000000000
0x08PWR_IEWURes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EWMRSUBGHCPUEWMRSUBGRes.Res.Res.Res.Res.EIWL1EIWL0
Reset value00000
0x0CPWR_IWUPRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WMRSUBGHCPUPWMRSUBGPRes.Res.Res.Res.Res.IWUP1IWUP0
Reset value00000
0x10PWR_IWUFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WMRSUBGHCPUFWMRSUBGFRes.Res.Res.Res.Res.IWUF1IWUF0
Reset value00000
0x14PWR_SR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IOBOOTVAL[3:0]PVDORes.Res.Res.WMRSUBGHCPUPWMRSUBGFIOBOOTVAL2[3:0]Res.Res.SMPSENSMPSEN1SMPSEN0SMPSEN0R
Reset valueXXXX01XXXX10
0x18Reserved

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

OffsetRegister313029282726252423222120191817161514131211109876543210
0x1CPWR_CR5Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SMPS_BOF_DYNSMPS_PRECH_CUR_SEL[1:0]CLKDETR_DISABLESMPS_ENA_DCMNOSMPSSMPSFBYPSMPSLPOENNOSMPS_BOFSMPS_BOF_STATICSMPSBOMSEL[1:0]SMPSLV[3:0]
Reset value0110000001000100
0x20PWR_PUCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PUA11PUA10PUA9PUA8PUA7Res.Res.Res.Res.PUA3PUA2PUA1PUA0
Reset value111110111
0x24PWR_PDCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDA11PDA10PDA9PDA8UDSRes.Res.Res.Res.PDA3PDA2PDA1PDA0
Reset value000001000
0x28PWR_PUCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PUB15PUB14PUB13PUB12Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value1111
0x2CPWR_PDCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDB15PDB14PDB13PDB12Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000000000000000
0x30PWR_EWUARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EWU11EWU10EWU9EWU8EWU7EWU6Res.Res.Res.Res.EWU3EWU2EWU1EWU0
Reset value0000000000
0x34PWR_WUPARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUP11WUP10WUP9WUP8WUP7Res.Res.Res.Res.WUP3WUP2WUP1WUP0
Reset value000000000
0x38PWR_WUFARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUF11WUF10WUF9WUF8WUF7Res.Res.Res.Res.WUF3WUF2WUF1WUF0
Reset value000000000
0x3CReserved
0x40PWR_EWUBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EWU15EWU14EWU13Res.WUP15WUP14Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000
0x44PWR_WUPBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUP13WUP12Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00000
0x48PWR_WUFBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUF15WUF14WUF13WUF12Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value0000
0x4CPWR_SDWN_WUENRes.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
0x50PWR_SDWN_WUPOLRes.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
ST logo
ST logo

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

OffsetRegister313029282726252423222120191817161514131211109876543210
0x54PWR_SDWN_WUFRes.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.WUF
Reset value0
0x58PWR_BOF_TUNERes.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 value0100
0x5C - 0x80Reserved
0x84PWR_DBGRRes.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.DEEPSTOP2
Reset value0
0x88PWR_EXTSRRRes.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 value0RFPHASEF0DEEPSTOPF
0x8CPWR_DBGSMPSRes.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 value1BOF_CUR_SEL[1:0]0ILIM_BOOST0DIS_ILIM0
0x90PWR_TRIMRRes.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 value0110000100
0x94PWR_ENGTRIMRes.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

5.8 Programmer's model

5.8.1 Reset reason management

The CPU has many reasons to be reset and executes its reset handler. Table 14 provides an overview of the flags that can help the embedded software to get the root cause of the CPU restart.

Table 14. Flags versus CPU reboot reason

CPU reboot reasonRCC_CSRPWR_ISCR
(in SYSCFG)
PWR_EXTS RR
LOCKUPRSTFWDGRSTFSFTRSTFPORRSTFPADRSTFWAKEUP_ISCDEEPSTOPF
POR/BOR reset---11--
NRSTn pad reset----1--
Watchdog reset-1--1--
System reset (CPU request)--1-1--
LOCKUP reset1---1--
Deepstop exit on wakeup event-----11
Deepstop exit on watchdog reset-1--1--
Deepstop exit on NRSTn pad reset----1--
Deepstop exit on POR/BOR---11--
Shutdown exit---11--
Ultra DeepStop exit---11--

If the reboot reason is a wakeup from Deepstop, then the wakeup source(s) can be read in the PWR_IWUF/WUFA/WUFB register as shown in Table 15.

Table 15. Wakeup reason flags

Wakeup reasonPWR_IWUFPWR_SRW UFA/B
IWUFxWLPWURWMRSUB GHCPUFWMRSUB GFWUFx
Wakeup on MR_SUBG event---1-
Wakeup on Host timer in MR_SUBG event--1--
Wakeup on RTC event1----
Wakeup on LPUART event1----
Wakeup on I/Os----1

Note: If several (enabled) wakeup events occur, several bits are high in the PWR_IWUF/WUFA/WUFB.

The wakeup flags are set as soon as a wakeup event (enabled in the corresponding PWR_xEWUx register) occurs, the associated flag is set in the related PWR_xWUFx register even if the device is in active mode or in the sleep exit sequence (initiated by another wakeup source).

Caution: Those flags have to be cleared by software knowing a Deepstop entry sequence cannot happen if a wakeup flag is already active when the system request a Deepstop mode.

5.8.2 SMPS output level re-programming

The SMPS output voltage cannot be modified on-the-fly when the modification implies to change more than one step (+/-100mV). In this case the following sequence must be respected:

Caution: This sequence must be launched only when no radio activity / RF transfer is on- going.