5. Power controller (PWRC)

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

The STM32WB05xZ embeds three power domains:

The digital power supplies are provided by different regulators:

An embedded SMPS step-down converter is available (inserted between the external power and the LDOs).

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

Figure 4. Power supply domain overview

Figure 4: Power supply domain overview diagram. It shows the power distribution from VDDIO and VFBSD pins through various regulators (LP-Reg, SMPS, MLDO, RFLDOs) to different power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), Interruptible Domain (VDD12I), and Analog RF. Control signals like VGATEN, CMDNO, CMDNI, and VGATEP are shown for the regulators.
Figure 4: Power supply domain overview diagram. It shows the power distribution from VDDIO and VFBSD pins through various regulators (LP-Reg, SMPS, MLDO, RFLDOs) to different power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), Interruptible Domain (VDD12I), and Analog RF. Control signals like VGATEN, CMDNO, CMDNI, and VGATEP are shown for the regulators.

5.3 Power voltage supervisor

The BlueNRG-LPS devices embed several power voltage monitorings:

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

The device has an integrated power-on reset / power-down reset, coupled with a Brownout Reset circuitry. During the power-on, the device remains in reset mode as long as \( V_{DDIO} \) is below a \( V_{POR} \) threshold (typically 1.60 V).

During power-down, the PDR puts the device under reset when the supply voltage ( \( V_{DD} \) ) drops below the \( V_{PDR} \) threshold (around 20 mV 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 top graph shows VDDIO voltage rising and then falling over time (T). The bottom graph shows the PORESETn signal. The PORESETn signal is low (active) when VDDIO is below the POR threshold. It goes high when VDDIO rises above the POR threshold and stays high until VDDIO falls below the PDR/BOR threshold. The time interval between the POR threshold crossing and the PORESETn going high is labeled T_TEMPO. The hysteresis between the POR and PDR/BOR thresholds is also indicated.
Figure 5: Power-on reset/power-down reset waveform. The top graph shows VDDIO voltage rising and then falling over time (T). The bottom graph shows the PORESETn signal. The PORESETn signal is low (active) when VDDIO is below the POR threshold. It goes high when VDDIO rises above the POR threshold and stays high until VDDIO falls below the PDR/BOR threshold. The time interval between the POR threshold crossing and the PORESETn going high is labeled T_TEMPO. The hysteresis between the POR and PDR/BOR thresholds is also indicated.

With typical values as follows:

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

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

5.3.2 Power voltage detection (PVD)

The PVD can be used to monitor:

The PVD can be enabled or disabled through the PWRC_CR2.PVDE bit.

When the feature is enabled and the PVD measures 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 Section 8.2.10: Power controller interrupt status and clear register (PWRC_ISCR) ).

5.4 Operating modes

The STM32WB05xZ supports 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.6.18: RCC register map ).

Figure 6. Power regulators and SMPS configuration in mode shows the regulators and SMPS configuration in mode with a product with only 24 Kbytes of RAM.

Figure 6. Power regulators and SMPS configuration in mode

Block diagram of power regulators and SMPS configuration. It shows three main power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), and Interruptible domain (VDD12I). Power sources include VDDIO, Vss, SMPS, LP-Reg, and MLDO. The V33 Domain contains HSE, LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn Domain contains BLE_wakeup, RTC, WDOG, LPUART, PWRC0, and RCC0. The Interruptible domain contains CPU, RF_FSM, BLE, Peripherals, and RCCi. Other components shown include HSI, IO Mgt, IO Ctrl, RAM0, RAM1, and FLASH. Control signals like VGATEN, CMDNO, CMDNI, and VGATENP are shown between the regulators and domains.
Block diagram of power regulators and SMPS configuration. It shows three main power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), and Interruptible domain (VDD12I). Power sources include VDDIO, Vss, SMPS, LP-Reg, and MLDO. The V33 Domain contains HSE, LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn Domain contains BLE_wakeup, RTC, WDOG, LPUART, PWRC0, and RCC0. The Interruptible domain contains CPU, RF_FSM, BLE, Peripherals, and RCCi. Other components shown include HSI, IO Mgt, IO Ctrl, RAM0, RAM1, and FLASH. Control signals like VGATEN, CMDNO, CMDNI, and VGATENP are shown between the regulators and domains.

5.4.2

Deepstop mode

The Deepstop is the only low-power mode of the STM32WB05xZ in order to restart from a saved context environment and go on running the application at wakeup.

The conditions to enter Deepstop mode are:

Note: If the MR_BLE is not used at all by the SoC (or not yet started), the following steps need to be performed after any reset to allow low-power modes (Deepstop and Shutdown):

In Deepstop mode:

A version of Deepstop mode called DEEPSTOP2 has been implemented to emulate Deepstop mode without losing the debugger connection and breakpoints or watchpoints.

Possible wakeup sources:

After wakeup from Deepstop, all the I/Os are in retention mode (except PA2 and PA3 in order to have SWD available again); if DBGRET bit was set, before entering Deepstop mode, then at wakeup also PA2 and PA3 are in retention mode and SWD is not available. To change I/Os 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 Deepstop, or a new one). At wakeup, the hardware resources located in the VDD12i power domain are reset, the CPU reboots. The wakeup reason is visible in a PWRC register (see Section 5.7.5: Status register 1 (PWRC_SR1) for details).

Figure 7. Power regulators and SMPS configuration in Deepstop mode shows the regulators and SMPS configuration in Deepstop mode, with a configuration requesting retention only on RAM0 and RAM1 banks.

Figure 7. Power regulators and SMPS configuration in Deepstop mode

Figure 7: Power regulators and SMPS configuration in Deepstop mode. This block diagram shows the internal power architecture of a microcontroller. It features several power domains: VDDIO, VDD12O (AlwaysOn), and VDD12I (Interruptible). Components like LP-Reg, SMPS, and MLDO manage power distribution. Strikethrough text indicates components that are OFF in Deepstop mode, such as HSE, LSI, LSE in the V33 Domain, and CPU, RF_FSM, BLE, and Peripherals in the Interruptible domain.
V DDIO V SS VREG PAD SMPS LP-Reg MLDO V33 Domain (VDDIO) HSE , LSI , LSE , BOR, POR, PVD, PWRC33, RCC33 AlwaysOn Domain (VDD12O) BLE_wakeup, RTC, WDOG, LPUART, PWRC0, RCC0 Interruptible domain (VDD12I) CPU , RF_FSM , BLE , Peripherals , RCCi IO Mgt IO Ctrl RAM0 RAM1 FLASH
Figure 7: Power regulators and SMPS configuration in Deepstop mode. This block diagram shows the internal power architecture of a microcontroller. It features several power domains: VDDIO, VDD12O (AlwaysOn), and VDD12I (Interruptible). Components like LP-Reg, SMPS, and MLDO manage power distribution. Strikethrough text indicates components that are OFF in Deepstop mode, such as HSE, LSI, LSE in the V33 Domain, and CPU, RF_FSM, BLE, and Peripherals in the Interruptible domain.

Note: Strikethrough text indicates that the feature is OFF in Deepstop mode.

5.4.3 Shutdown mode

Shutdown mode is the least power consuming mode.

The conditions to enter Shutdown mode are the same conditions needed to enter Deepstop mode except that the PWRC_CR1.LPMS bit must be equal to 1 and the PWRC_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 (see Section 6.6.15: V33 reset status register (RCC_CSR) for reset reason flag detail).

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

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

Figure 8. Power regulators and SMPS configuration in Shutdown mode

Block diagram of power regulators and SMPS configuration in Shutdown mode. The diagram shows three main power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), and Interruptible domain (VDD12I). The V33 Domain includes HSE, LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn Domain includes BLE_wakeup, RTC, WDOG, LPUART, PWRCo, and RCCo. The Interruptible domain includes CPU, RF_FSM, BLE, Peripherals, and RCCi. Power regulators shown are LP-Reg, VREG PAD, SMPS, and MLDO. Other components include HSI, IO Mgt, IO Ctrl, RAM0, RAM1, and FLASH. Connections show power flow from VDDIO and Vss to the various domains and regulators. Strikethrough text indicates features are OFF in Shutdown mode.

The diagram illustrates the power architecture in Shutdown mode. The V33 Domain (VDDIO) contains HSE, LSI, LSE , BOR, POR, PVD , PWRC33, and RCC33. The AlwaysOn Domain (VDD12O) contains BLE_wakeup, RTC, WDOG, LPUART, PWRCo, and RCCo. The Interruptible domain (VDD12I) contains CPU, RF_FSM, BLE, Peripherals, and RCCi. Power sources include V DDIO , V ss , LP-Reg, VREG PAD, SMPS, and MLDO. The HSI is also shown. Connections include PU/PD, IOs, IO Mgt, IO Ctrl, RAM0, RAM1, and FLASH. Strikethrough text indicates features are OFF in Shutdown mode.

Block diagram of power regulators and SMPS configuration in Shutdown mode. The diagram shows three main power domains: V33 Domain (VDDIO), AlwaysOn Domain (VDD12O), and Interruptible domain (VDD12I). The V33 Domain includes HSE, LSI, LSE, BOR, POR, PVD, PWRC33, and RCC33. The AlwaysOn Domain includes BLE_wakeup, RTC, WDOG, LPUART, PWRCo, and RCCo. The Interruptible domain includes CPU, RF_FSM, BLE, Peripherals, and RCCi. Power regulators shown are LP-Reg, VREG PAD, SMPS, and MLDO. Other components include HSI, IO Mgt, IO Ctrl, RAM0, RAM1, and FLASH. Connections show power flow from VDDIO and Vss to the various domains and regulators. Strikethrough text indicates features are OFF in Shutdown mode.

Note: Strikethrough text indicates that the feature is OFF in Shutdown mode.

5.4.4 Operating mode transition management

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

Figure 9. PWRC state machine for operating modes transition

PWRC state machine diagram showing transitions between START (reset), SHUTDOWN, RUN, and DEEPSTOP states with associated configuration lists.
stateDiagram-v2
    [*] --> START
    START --> RUN : RESETn
    RUN --> SHUTDOWN : CSTOP & RF OFF & CR1.LPMS = SHUTDOWN
    RUN --> DEEPSTOP : CSTOP & RF OFF & CR1.LPMS = DEEPSTOP
    DEEPSTOP --> RUN : wakeup
    DEEPSTOP --> SHUTDOWN : CSTOP & RF OFF & CR1.LPMS = SHUTDOWN
  

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

SHUTDOWN
SHUTDOWN
LPREG: OFF
MLDO: OFF
SMPS: OFF
RFLDO: OFF
LSI/LSE: OFF
HSI: OFF
HSE: OFF
POR

RUN
CPU: CRUN/CSLEEP
RF: ON/OFF
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

DEEPSTOP
CPU: CSLEEP => SLEEPING
CPU: CSTOP => DEEPSLEEP
RF: OFF => Ready2Sleep
DEEPSTOP
CSTOP
RF: OFF
STOP
LPREG: ON (0.95V)
MLDO: OFF
SMPS: PRECHARGE/(OPEN)
RFLDO: OFF
LSI: ON/OFF
LSE: ON/OFF
HSI: OFF
HSE: OFF

PWRC state machine diagram showing transitions between START (reset), SHUTDOWN, RUN, and DEEPSTOP states with associated configuration lists.

5.5 SMPS step-down regulator

The STM32WB05xZ SMPS is a 20 mA output step-down SMPS (switch mode power supply) converter. The SMPS output voltage can be programmed from 1.2 V to 1.90 V. It is internally clocked at 4 MHz or 8 MHz. The SMPS can be in different configurations:

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

Figure 10. Power supply configuration

Figure 10 shows two power supply configuration diagrams. The left diagram, labeled 'SMPS supply configuration', shows an SMPS Step Down converter connected to VDD, VDDSD, VLXSD, and VFBSD pins. The output of the SMPS is connected to a capacitor and to three LDOs: Main LDO, RF LDO, and LP Reg. The Main LDO output is connected to VCAP. The right diagram, labeled 'NOSMPS supply configuration', is similar but the SMPS is not connected to the Main LDO, RF LDO, and LP Reg. Instead, the Main LDO, RF LDO, and LP Reg are connected directly to VDD, VDDSD, and VLXSD pins respectively.
Figure 10 shows two power supply configuration diagrams. The left diagram, labeled 'SMPS supply configuration', shows an SMPS Step Down converter connected to VDD, VDDSD, VLXSD, and VFBSD pins. The output of the SMPS is connected to a capacitor and to three LDOs: Main LDO, RF LDO, and LP Reg. The Main LDO output is connected to VCAP. The right diagram, labeled 'NOSMPS supply configuration', is similar but the SMPS is not connected to the Main LDO, RF LDO, and LP Reg. Instead, the Main LDO, RF LDO, and LP Reg are connected directly to VDD, VDDSD, and VLXSD pins respectively.

The user must configure the PWRC_CR5.SMPSBOMSEL[1:0] according to the BOM implemented on their board. The value to program is indicated in Table 11. SMPS BOM information.

Table 11. SMPS BOM information

BOMInductance (L)Output capacitance (C)SMPSBOMSEL[1:0]
BOM11.5 uH2.2 uF00
BOM22.2 uH4.7 uF01
BOM310 uH4.7 uF10

The SMPS is managed by the PWRC through a state machine shown in Figure 11. PWRC SMPS state machine overview.

Figure 11. PWRC SMPS state machine overview

Figure 11 shows the PWRC SMPS state machine overview. The state machine starts in the STARTUP state, which transitions to the SMPS_REQ state. The SMPS_REQ state transitions to the RUN state when smps_rdy OR CR5.SMPSRDY is asserted. The RUN state transitions to the STOP state when ds_exit is asserted, or to the NOSMPS state when CR5.NOSMPS is asserted, or to the PRECHARGE state when CR5.SMPSFBYP & ICR5.NOSMPS is asserted. The STOP state transitions back to the STARTUP state. The NOSMPS state transitions to the PRECHARGE state when ICR5.SMPSFBYP is asserted. The PRECHARGE state transitions to the RUN state when smps_rdy OR CR5.SMPSRDY is asserted. Each state has associated output signals: STARTUP (smps_req=0, smps_precharge=1), SMPS_REQ (smps_req=1, smps_precharge=1), RUN (smps_req=1, smps_precharge=1), STOP (smps_req=0, smps_precharge=~CR5.SMPSLPOPEN), NOSMPS (smps_req=0, smps_precharge=0), and PRECHARGE (smps_req=0, smps_precharge=1).
Figure 11 shows the PWRC SMPS state machine overview. The state machine starts in the STARTUP state, which transitions to the SMPS_REQ state. The SMPS_REQ state transitions to the RUN state when smps_rdy OR CR5.SMPSRDY is asserted. The RUN state transitions to the STOP state when ds_exit is asserted, or to the NOSMPS state when CR5.NOSMPS is asserted, or to the PRECHARGE state when CR5.SMPSFBYP & ICR5.NOSMPS is asserted. The STOP state transitions back to the STARTUP state. The NOSMPS state transitions to the PRECHARGE state when ICR5.SMPSFBYP is asserted. The PRECHARGE state transitions to the RUN state when smps_rdy OR CR5.SMPSRDY is asserted. Each state has associated output signals: STARTUP (smps_req=0, smps_precharge=1), SMPS_REQ (smps_req=1, smps_precharge=1), RUN (smps_req=1, smps_precharge=1), STOP (smps_req=0, smps_precharge=~CR5.SMPSLPOPEN), NOSMPS (smps_req=0, smps_precharge=0), and PRECHARGE (smps_req=0, smps_precharge=1).

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 Deepstop mode, the PWRC automatically switches the SMPS from Run to Deepstop mode which can be:

5.6 I/O pull-ups/pull-downs during low power mode

When PWRC_CR1.APC is set (default configuration), the pull-up/pull-down of the IOs is controlled by the PWRC_PUCRx and PWRC_PDCRx registers of the PWRC block, instead of GPIOx_PUPDR register of the GPIO block. This feature avoids glitches on the lines by keeping the same pull-up/pull-down configuration during all the supported operating modes.

5.7 PWRC registers

All PWRC APB registers are only 16-bit registers. The 16 most-significant bits are always stuck to 0.

5.7.1 Control register 1 (PWRC_CR1)

This register controls the BOR in Shutdown, 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.Res.Res.Res.APCIBIAS_RUN_STATEIBIAS_RUN_AUTOENSDNBORLPMS
rwrwrwrwrw
Bits 31:5Reserved, must be kept at reset value.
Bit 4APC: Apply pull-up/down configuration from PWRC or GPIO register.
  • 0: The GPIOx_PUPDR of the GPIO block are used to control the product pull-up/-down of the IOs
  • 1: The PWRC_PUCRx and PWRC_PDCRx of the PWRC block are used to control the product pull-up/down of the IOs (default)
Bit 3IBIAS_RUN_STATE: Enable/disable IBIAS during Run mode when automatic mode is disabled.
  • 0: IBIAS control is disabled (default)
  • 1: IBIAS control is enabled
Bit 2IBIAS_RUN_AUTO: IBIAS_RUN_AUTO: Enable automatic IBIAS control during Run or Deepstop mode.
  • 0: IBIAS control is manual (and controlled by IBIAS_RUN_STATE register)
  • 1: IBIAS control is automatic (default)
Bit 1ENSDNBOR: Enable BOR reset supervising during Shutdown mode.
  • 0: No BOR is monitored during Shutdown mode (default)
  • 1: BOR is monitored during Shutdown mode (a POR reset happens if VDDIO goes below 1.58 V during Shutdown mode)

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

Bit 0LPMS: Low-power mode selection.

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

  • 0: Deepstop mode(default)
  • 1: Shutdown mode (PWRC_DBGR.DEEPSTOP2 bit must be kept reset)

Note: It is mandatory to ensure that PWRC_DBGR.DEEPSTOP2 bit is reset when LPMS bit is set before entering in Shutdown.

5.7.2 Control register 2 (PWRC_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.Res.Res.Res.Res.Res.Res.GPIORETRes.Res.RAMRET1DBGRETPVDLS[2:0]PVDE
rwrwrwrwrwrwrw
Bits 31:9Reserved, must be kept at reset value.
Bit 8GPIORET: GPIO retention enable.
  • 0: GPIOs don't retain their configuration during and exiting Deepstop (default)
  • 1: GPIOs retain their configuration during and exiting Deepstop
Bit 7Reserved, must be kept at reset value.
Bit 6Reserved, must be kept at reset value.
Bit 5RAMRET1: Enables the RAM1 bank retention in Deepstop mode.
  • 0: RAM1 bank is not retained during Deepstop mode (default)
  • 1: RAM1 bank is retained during Deepstop mode
Bit 4DBGRET: PA2 and PA3 retention enable after Deepstop
  • 0: PA2, PA3 GPIOs don't retain their configuration exiting from Deepstop (default).
  • 1: PA2, PA3 GPIOs retain their configuration exiting from Deepstop
Bits 3:1PVDLS[2:0]: Programmable voltage detector level selection:
  • 000: 2.04 V - the lowest level
  • 001: 2.22 V
  • 010: 2.36 V
  • 011: 2.53 V
  • 100: 2.66 V
  • 101: 2.81 V
  • 110: 2.94 V - the highest level
  • 111: External input analog voltage (compared internally to VBGP). In this case, PVDO signal is high when external voltage is lower than VBGP
Bit 0PVDE: Programmable voltage detector enable.
  • 0: The power voltage detector feature is disabled (default)
  • 1: The power voltage detector feature is enabled

Note: it is mandatory to ensure GPIORET bit is set before entering Deepstop unless DEEPSTOP2 bit is set.

5.7.3 Control register 3 (PWRC_CR3)

This register manages the selection of the 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
EIWLEIWL2EWBLEHCPUEWBLEEWU11EWU10EWU9EWU8EWU7EWU6EWU5EWU4EWU3EWU2EWU1EWU0
r/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/wr/w
Bits 31:16Reserved, must be kept at reset value.
Bit 15EIWL: Enable wakeup on internal event (RTC).
  • 0: Wakeup on internal line is disabled (default)
  • 1: Wakeup on internal line is enabled
Bit 14EIWL2: Enable wakeup on internal event (LPUART).
  • 0: Wakeup on internal line is disabled (default)
  • 1: Wakeup on internal line is enabled.
Bit 13EWBLEHCPU: Enable wakeup on BLE Host CPU event.
  • 0: Wakeup on BLE Host CPU line is disabled (default)
  • 1: Wakeup on BLE Host CPU line is enabled
Bit 12EWBLE: Enable wakeup on BLE event.
  • 0: Wakeup on BLE line is disabled(default)
  • 1: Wakeup on BLE line is enabled
Bit 11EWU11: Enable wakeup on PA11 I/O event.
  • 0: Wakeup on PA11 I/O line is disabled (default)
  • 1: Wakeup on PA11 I/O line is enabled
Bit 10EWU10: Enable wakeup on PA10 I/O event.
  • 0: Wakeup on PA10 I/O line is disabled (default)
  • 1: Wakeup on PA10 I/O line is enabled
Bit 9EWU9: Enable wakeup on PA9 I/O event.
  • 0: Wakeup on PA9 I/O line is disabled (default)
  • 1: Wakeup on PA9 I/O line is enabled
Bit 8EWU8: Enable wakeup on PA8 I/O event.
  • 0: Wakeup on PA8 I/O line is disabled (default)
  • 1: Wakeup on PA8 I/O line is enabled
Bit 7EWU7: Enable wakeup on PB7 I/O event.
  • 0: Wakeup on PB7 I/O line is disabled (default)
  • 1: Wakeup on PB7 I/O line is enabled
Bit 6EWU6: Enable wakeup on PB6 I/O event.
  • 0: Wakeup on PB6 I/O line is disabled (default)
  • 1: Wakeup on PB6 I/O line is enabled
Bit 5EWU5: Enable wakeup on PB5 I/O event.
  • 0: Wakeup on PB5 I/O line is disabled (default)
  • • 1: Wakeup on PB5 I/O line is enabled
Bit 4EWU4: Enable wakeup on PB4 I/O event.
  • • 0: Wakeup on PB4 I/O line is disabled (default)
  • • 1: Wakeup on PB4 I/O line is enabled
Bit 3EWU3: Enable wakeup on PB3 I/O event.
  • • 0: Wakeup on PB3 I/O line is disabled (default)
  • • 1: Wakeup on PB3 I/O line is enabled
Bit 2EWU2: Enable wakeup on PB2 I/O event.
  • • 0: Wakeup on PB2 I/O line is disabled (default)
  • • 1: Wakeup on PB2 I/O line is enabled
Bit 1EWU1: Enable wakeup on PB1 I/O event.
  • • 0: Wakeup on PB1 I/O line is disabled (default)
  • • 1: Wakeup on PB1 I/O line is enabled
Bit 0EWU0: Enable wakeup on PB0 I/O event.
  • • 0: Wakeup on PB0 I/O line is disabled (default)
  • • 1: Wakeup on PB0 I/O line is enabled

5.7.4 Control register 4 (PWRC_CR4)

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

Note: The wakeup events are edge detection only, 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.WUP11WUP10WUP9WUP8WUP7WUP6WUP5WUP4WUP3WUP2WUP1WUP0
rwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:12Reserved, must be kept at reset value.
Bit 11WUP11: wakeup polarity for PA11 I/O.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 10WUP10: wakeup polarity for PA10 I/O.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 9WUP9: wakeup polarity for PA9 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 8WUP8: wakeup polarity for PA8 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 7WUP7: wakeup polarity for PB7 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 6WUP6: wakeup polarity for PB6 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 5WUP5: wakeup polarity for PB5 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 4WUP4: Wakeup polarity for PB4 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 3WUP3: wakeup polarity for PB3 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 2WUP2: wakeup polarity for PB2 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 1WUP1: wakeup polarity for PB1 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 0WUP0: wakeup polarity for PB0 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge

5.7.5 Status register 1 (PWRC_SR1)

This register provides the information concerning which 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
IWUFIWUF2WBLEHCPUFWBLEFWUF11WUF10WUF9WUF8WUF7WUF6WUF5WUF4WUF3WUF2WUF1WUF0
rrc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1
Bits 31:16Reserved, must be kept at reset value.
Bit 15IWUF: Internal wakeup flag (RTC).
  • 0: No wakeup from RTC occurred since last clear
  • 1: A wakeup from RTC occurred since last clear
Note: The user must clear the RTC wakeup flag inside the RTC IP to clear this bit.
Bit 14IWUF2: Internal wakeup 2 flag (LPUART).
  • 0: No wakeup from LPUART occurred since last clear
  • 1: A wakeup from LPUART occurred since last clear.
Cleared by writing 1 in this bit.
Note: The user must clear before LPUART wakeup flag inside the LPUART IP to clear this bit.
Bit 13WBLEHCPUF: BLE Host CPU wakeup flag.
  • 0: No wakeup from BLE Host CPU occurred since last clear
  • 1: A wakeup from BLE Host CPU occurred since last clear.
    Cleared by writing 1 in this bit
Bit 12WBLEF: BLE wakeup flag.
  • 0: No wakeup from BLE occurred since last clear
  • 1: A wakeup from BLE occurred since last clear.
    Cleared by writing 1 in this bit
Bit 11WUF11: PA11 I/O wakeup flag.
  • 0: No wakeup from PA11 I/O occurred since last clear
  • 1: A wakeup from PA11 I/O occurred since last clear.
    Cleared by writing 1 in this bit
Bit 10WUF10: PA10 I/O wakeup flag.
  • 0: No wakeup from PA10 I/O occurred since last clear
  • 1: A wakeup from PA10 I/O occurred since last clear.
    Cleared by writing 1 in this bit
Bit 9WUF9: PA9 I/O wakeup flag.
  • 0: No wakeup from PA9 I/O occurred since last clear
  • 1: A wakeup from PA9 I/O occurred since last clear.
    Cleared by writing 1 in this bit
Bit 8WUF8: PA8 I/O wakeup flag.
  • 0: No wakeup from PA8 I/O occurred since last clear
  • 1: A wakeup from PA8 I/O occurred since last clear.
    Cleared by writing 1 in this bit
Bit 7

WUF7: PB7 I/O wakeup flag.

  • 0: No wakeup from PB7 I/O occurred since last clear
  • 1: A wakeup from PB7 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 6

WUF6: PB6 I/O wakeup flag.

  • 0: No wakeup from PB6 I/O occurred since last clear
  • 1: A wakeup from PB6 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 5

WUF5: PB5 I/O wakeup flag.

  • 0: No wakeup from PB5 I/O occurred since last clear
  • 1: A wakeup from PB5 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 4

WUF4: PB4 I/O wakeup flag.

  • 0: No wakeup from PB4 I/O occurred since last clear
  • 1: A wakeup from PB4 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 3

WUF3: PB3 I/O wakeup flag.

  • 0: No wakeup from PB3 I/O occurred since last clear
  • 1: A wakeup from PB3 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 2

WUF2: PB2 I/O wakeup flag.

  • 0: No wakeup from PB2 I/O occurred since last clear
  • 1: A wakeup from PB2 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 1

WUF1: PB1 I/O wakeup flag.

  • 0: No wakeup from PB1 I/O occurred since last clear
  • 1: A wakeup from PB1 I/O occurred since last clear.

Cleared by writing 1 in this bit

Bit 0

WUF0: PB0 I/O wakeup flag.

  • 0: No wakeup from PB0 I/O occurred since last clear
  • 1: A wakeup from PB0 I/O occurred since last clear.

Cleared by writing 1 in this bit

5.7.6 Status register 2 (PWRC_SR2)

This register provides some status flags related to the power voltage detector and the SMPS blocks.

Address offset: 0x14

Reset value: 0x0000 -306

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
IOBOOTVAL[3:0]PVDORes.Res.REGLPSIOBOOTVAL2[3:0]Res.SMPS RDYSMPSE NRSMPSB YPR
rrrrrrrrr
Bits 31:16Reserved, must be kept at reset value.
Bits 15:12IOBOOTVAL: I/Os value latched at POR.
  • bit 3: PA11 input value latched at POR,
  • bit 2: PA10 input value latched at POR,
  • bit 1: PA9 input value latched at POR,
  • bit 0: PA8 input value latched at POR.
Note: This information may be used by the boot loader to manage boot on serial interfaces for instance.
Bit 11PVDO: Power voltage detector output.
When the power voltage detector is enabled (PWRC_CR2.PVDE=1), this bit indicates when the VDDIO is lower than the selected threshold (through PWRC_CR2.PVDLS bit field).
  • 0: The VDDIO is not lower than threshold or PVD feature is not enabled
  • 1: The VDDIO is lower than the selected threshold
Bit 10:9Reserved, must be kept at reset value.
Bit 8REGLPS: Low-power regulator ready status.
  • 0: The low-power regulator is not ready
  • 1: The low-power regulator is ready
Bits 7:4IOBOOTVAL2: I/Os value latched at POR.
  • bit 3: PB15 input value latched at POR
  • bit 2: PB14 input value latched at POR
  • bit 1: PB13 input value latched at POR
  • bit 0: PB12 input value latched at POR
Note: This information may be used but the boot loader to manage boot on serial interfaces for instance.
Bit 3Reserved, must be kept at reset value.
Bit 2SMPSRDY: SMPS ready status.
  • 0: SMPS regulator is not ready
  • 1: SMPS regulator is ready
Bit 1SMPSENR: SMPS mode status.
This bit mirrors the internal ENABLE_3V3 control signal connected to the SMPS and driven by the hardware.
  • 0: SMPS regulator is not regulating (in PRECHARGE or NOSMPS mode)
  • 1: SMPS regulator is in mode
Bit 0SMPSBYPR: SMPS PRECHARGE mode status.
This bit mirrors the PRECHARGE control state of the SMPS.
  • 0: SMPS regulator is not in PRECHARGE mode
    • • 1: SMPS regulator is in PRECHARGE mode (VSMPS connected to VDDIO)

5.7.7 Control register 5 (PWRC_CR5)

This register is used to configure the SMPS.

Address offset: 0x1C

Reset value: 0x0000 6014

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.SMPS_PRECH_CUR_SEL[1:0]CLKDETR_DISABLESMPS_ENA_DCMNOSMPSSMPSF_BYPSMPSL_POPENRes.Res.SMPSBOMSEL[1:0]SMPSLVL[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:15Reserved, must be kept at reset value.
Bits 14:13SMPS_PRECH_CUR_SEL[1:0] : Select SMPS PRECHARGE limit current.
  • 00: 2.5 mA
  • 01: 5 mA
  • 10: 10 mA
  • 11: 20 mA (default)
Bit 12CLKDETR_DISABLE : Disables the SMPS clock detection.
The SMPS clock detection enables an automatic SMPS bypass switching in case of unexpected loss of the SMPS clock.
  • 0: SMPS clock detection mechanism enabled (default)
  • 1: SMPS clock detection mechanism disabled
Bit 11SMPS_ENA_DCM : Discontinuous conduction mode enable.
  • 0: SMPS DCM is disabled (default)
  • 1: SMPS DCM is enabled
Bit 10NOSMPS : No SMPS mode.
  • 0: SMPS is enabled (default)
  • 1: SMPS is disabled
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 9SMPSFBYP : Forces the SMPS in PRECHARGE mode.
  • 0: No effect (default)
  • 1: SMPS is disabled and bypassed
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 PWRC_SR2 register.
Bit 8SMPSL_POPEN : Select OPEN mode instead of PRECHARGE mode for the SMPS during Deepstop.
  • 0: In Deepstop, the SMPS is in PRECHARGE mode with output connected to VDDIO (default)
  • 1: In Deepstop, the SMPS is disabled with floating output
Bits 7:6Reserved, must be kept at reset value.
Bits 5:4SMPSBOMSEL[1:0] : Select the SMPS BOM.
  • 00: BOM1
  • • 01: BOM2(default)
  • • 10: BOM3
  • • 11: Not applicable

Note: BOM correspondence/details is available in Table 11. 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 about 50 mV. The SMPS output voltage level, \( V_{SMPS} \) , must be configured such that \( V_{BAT} - V_{SMPS} \geq 0.2 \) V.

[e.g. For \( V_{BAT} = 2 \) V, \( V_{SMPS} \) must be no higher than 1.8 V]

  • • -0000: 1.2 V
  • • -0001: 1.25 V
  • • -0010: 1.3 V
  • • -0011: 1.35 V
  • • -0100: 1.4 V
  • • -0101: 1.45 V
  • • -0110: 1.5 V
  • • -0111: 1.55 V
  • • -1000: 1.6 V
  • • -1001: 1.65 V
  • • -1010: 1.7 V
  • • -1011: 1.75 V
  • • -1100: 1.8 V
  • • -1101: 1.85 V
  • • -1110: 1.9 V
  • • -1111: 1.9 V

Warning: The SMPS output voltage must not be changed by more than one step 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.7.8 I/O port A pull-up control register (PWRC_PUCRA)

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

Caution: If both pull-up and pull-down are enabled in the PWRC_PUCRA and PWRC_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 0F07

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.PUA11PUA10PUA9PUA8Res.Res.Res.Res.PUA3PUA2PUA1PUA0
rwrwrwrwrwrwrwrw
Bits 31:12Reserved, must be kept at reset value.
Bit 11PUA11: Pull-up enable for PA11 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 10PUA10: Pull-up enable for PA10 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 9PUA9: Pull-up enable for PA9 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 8PUA8: Pull-up enable for PA8 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 7:4Reserved, must be kept at reset value.
Bit 3PUA3: Pull-up enable for PA3 I/O.
  • 0: No pull-up (default)
  • 1: Pull-up enabled
Bit 2PUA2: Pull-up enable for PA2 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 1PUA1: Pull-up enable for PA1 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 0PUA0: Pull-up enable for PA0 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)

5.7.9 I/O port A pull-down control register (PWRC_PDCRA)

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

Caution: If both pull-up and pull-down are enabled in the PWRC_PUCRA and PWRC_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.PDA11PDA10PDA9PDA8Res.Res.Res.Res.PDA3PDA2PDA1PDA0
rwrwrwrwrwrwrwrw
Bits 31:12Reserved, must be kept at reset value.
Bit 11PDA11: Pull-down enable for PA11 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 10PDA10: Pull-down enable for PA10 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 9PDA9: Pull-down enable for PA9 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 8PDA8: Pull-down enable for PA8 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 7:4Reserved, must be kept at reset value.
Bit 3PDA3: Pull-down enable for PA3 I/O.
  • 0: No pull-down
  • 1: Pull-down enabled (default)
Bit 2PDA2: Pull-down enable for PA2 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 1PDA1: Pull-down enable for PA1 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 0PDA0: Pull-down enable for PA0 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled

5.7.10 I/O port B pull-up control register (PWRC_PUCRB)

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

Caution: If both pull-up and pull-down are enabled in the PWRC_PUCRA and PWRC_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 F0FF

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PUB15PUB14PUB13PUB12Res.Res.Res.Res.PUB7PUB6PUB5PUB4PUB3PUB2PUB1PUB0
rwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:16Reserved, must be kept at reset value.
Bit 15PUB15: Pull-up enable for PB15 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 14PUB14: Pull-up enable for PB14 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 13PUB13: Pull-up enable for PB13 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 12PUB12: Pull-up enable for PB12 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 11:8PUB11: Reserved, must be kept at reset value
Bit 7PUB7: Pull-up enable for PB7 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 6PUB6: Pull-up enable for PB6 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 5PUB5: Pull-up enable for PB5 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 4PUB4: Pull-up enable for PB4 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 3PUB3: Pull-up enable for PB3 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 2PUB2: Pull-up enable for PB2 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 1PUB1: Pull-up enable for PB1 I/O.
  • 0: No pull-up
  • 1: Pull-up enabled (default)
Bit 0PUB0: Pull-up enable for PB0 I/O.
  • • 0: No pull-up
  • • 1: Pull-up enabled (default)

5.7.11 I/O port B pull-down control register (PWRC_PDCRB)

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

Caution: If both pull-up and pull-down are enabled in the PWRC_PUCRA and PWRC_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 F0FF

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
PDB15PDB14PDB13PDB12Res.Res.Res.Res.PDB7PDB6PDB5PDB4PDB3PDB2PDB1PDB0
rwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:16Reserved, must be kept at reset value.
Bit 15PDB15: Pull-down enable for PB15 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 14PDB14: Pull-down enable for PB14 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 13PDB13: Pull-down enable for PB13 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 12PDB12: Pull-down enable for PB12 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 11:8Reserved, must be kept at reset value
Bit 7PDB7: Pull-down enable for PB7 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 6PDB6: Pull-down enable for PB6 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 5PDB5: Pull-down enable for PB5 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 4PDB4: Pull-down enable for PB4 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 3PDB3: Pull-down enable for PB3 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 2PDB2: Pull-down enable for PB2 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 1PDB1: Pull-down enable for PB1 I/O.
  • 0: No pull-down (default)
  • 1: Pull-down enabled
Bit 0PDB0: Pull-down enable for PB0 I/O.
  • • 0: No pull-down (default)
  • • 1: Pull-down enabled

5.7.12 Control register 6 (PWRC_CR6)

This register manages the selection of the wakeup sources 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.Res.Res.Res.Res.EWU19EWU18EWU17EWU16EWU15EWU14EWU13EWU12
rwrwrwrwrwrwrwrw
Bits 31:8Reserved, must be kept at reset value.
Bit 7EWU19: Enable wakeup on PB15 I/O event.
  • 0: wakeup on PB15 I/O line is disabled (default)
  • 1: wakeup on PB15 I/O line is enabled
Bit 6EWU18: Enable wakeup on PB14 I/O event.
  • 0: Wakeup on PB14 I/O line is disabled (default)
  • 1: Wakeup on PB14 I/O line is enabled
Bit 5EWU17: Enable wakeup on PB13 I/O event.
  • 0: Wakeup on PB13 I/O line is disabled (default)
  • 1: Wakeup on PB13 I/O line is enabled
Bit 4EWU16: Enable wakeup on PB12 I/O event.
  • 0: Wakeup on PB12 I/O line is disabled (default)
  • 1: Wakeup on PB12 I/O line is enabled
Bit 3EWU15: Enable wakeup on PA3 I/O event.
  • 0: Wakeup on PA3 I/O line is disabled (default)
  • 1: Wakeup on PA3 I/O line is enabled
Bit 2EWU14: Enable wakeup on PA2 I/O event.
  • 0: Wakeup on PA2 I/O line is disabled (default)
  • 1: Wakeup on PA2 I/O line is enabled
Bit 1EWU13: Enable wakeup on PA1 I/O event.
  • 0: Wakeup on PA1 I/O line is disabled (default)
  • 1: Wakeup on PA1 I/O line is enabled
Bit 0EWU12: Enable wakeup on PA0 I/O event.
  • 0: Wakeup on PA0 I/O line is disabled (default)
  • 1: Wakeup on PA0 I/O line is enabled

5.7.13 Control register 7 (PWRC_CR7)

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

Note: The wakeup events 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.Res.Res.Res.Res.WUP19WUP18WUP17WUP16WUP15WUP14WUP13WUP12
rwrwrwrwrwrwrwrw
Bits 31:8Reserved, must be kept at reset value.
Bit 7WUP19: wakeup polarity for PB15 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 6WUP18: wakeup polarity for PB14 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 5WUP17: wakeup polarity for PB13 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 4WUP16: wakeup polarity for PB12 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 3WUP15: wakeup polarity for PA3 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 2WUP14: wakeup polarity for PA2 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 1WUP13: wakeup polarity for PA1 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge
Bit 0WUP12: wakeup polarity for PA0 IO event.
  • 0: Detection of wakeup event on rising edge (default)
  • 1: Detection of wakeup event on falling edge

5.7.14 Status register 3(PWRC_SR3)

This register provides some information about which 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.Res.Res.Res.Res.WUF19WUF18WUF17WUF16WUF15WUF14WUF13WUF12
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1
Bits 31:8Reserved, must be kept at reset value.
Bit 7WUF19: PB15 I/O wakeup flag.
  • 0: No wakeup from PB15 I/O occurred since last clear
  • 1: A wakeup from PB15 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 6WUF18: PB14 I/O wakeup flag.
  • 0: No wakeup from PB14 I/O occurred since last clear
  • 1: A wakeup from PB14 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 5WUF17: PB13 I/O wakeup flag.
  • 0: No wakeup from PB13 I/O occurred since last clear
  • 1: A wakeup from PB13 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 4WUF16: PB12 I/O wakeup flag.
  • 0: No wakeup from PB12 I/O occurred since last clear
  • 1: A wakeup from PB12 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 3WUF15: PA3 I/O wakeup flag.
  • 0: No wakeup from PA3 I/O occurred since last clear
  • 1: A wakeup from PA3 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 2WUF14: PA2 I/O wakeup flag.
  • 0: No wakeup from PA2 I/O occurred since last clear
  • 1: A wakeup from PA2 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 1WUF13: PA1 I/O wakeup flag.
  • 0: No wakeup from PA1 I/O occurred since last clear
  • 1: A wakeup from PA1 I/O occurred since last clear. Cleared by writing 1 in this bit
Bit 0WUF12: PA0 I/O wakeup flag.
  • 0: No wakeup from PA0 I/O occurred since last clear
  • 1: A wakeup from PA0 I/O occurred since last clear. Cleared by writing 1 in this bit

5.7.15 Debug register (PWRC_DBGR)

This register is used for debug features.

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
DIS_PRECH[2:0]Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEEPSTOP2
rwrwrwrw
Bits 31:16Reserved, must be kept at reset value.
Bits 15:13Bits 15:13 DIS_PRECH[2:0] : disable SMPS PRECHARGE during Deepstop (debug only).
  • 111: PRECHARGE and SMPS monitoring disabled
  • 101: PRECHARGE enabled only at Deepstop exit (PWRC_CR5.SMPSLOPEN must be set)
  • others values: Deepstop PRECHARGE enabled
Bits 12:1Reserved, must be kept at reset value
Bit 0DEEPSTOP2 : DEEPSTOP2 low-power saving emulation enable.
  • 0: Normal Deepstop is applied
  • 1: DEEPSTOP2 (debugger features not lost) is applied instead of Deepstop

5.7.16 Extended status and reset register (PWRC_EXTSRR)

This register provides flags about Bluetooth 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:11Reserved, must be kept at reset value.
Bit 10

RFPHASEF: RFPHASE Flag.

  • 0: The BLE IP does not require any attention
  • 1: The BLE 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 BLE IP raises the ‐ready to sleep‐ information.

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

Bit 9

DEEPSTOPF: System Deepstop 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:0Reserved, must be kept at reset value.

5.7.17 PWRC register map

Refer to Table 3. STM32WB05xZ memory map and peripheral register boundary addresses for the PWRC base address location in the STM32WB05xZ.

Note: All the PWRC registers are retained during Deepstop mode. The grey cells indicate the bit fields located in the VDD33 power domain. This implies the associated feature is applied even during Shutdown state (but are lost at Shutdown mode exit as a PORESETn is generated).

Table 12. PWRC register map

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00PWRC_CR1Res.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.APCIBIAS_RUN_STATEIBIAS_RUN_AUTOENSDNBORLPMS
Reset value1000
0x04PWRC_CR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.GPIORETRes.Res.RAMRET1DBGRETRes.Res.PVDLSRes.PVDE
Reset value00000
0x08PWRC_CR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EIWLEIWL2EWBLEHCPUEWBLEEWU11EWU10EWU9EWU8EWU7EWU6EWU5EWU4EWU3EWU2EWU1EWU0
Reset value0000000000000000
0x0CPWRC_CR4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUP11WUP10WUP9WUP8WUP7WUP6WUP5WUP4WUP3WUP2WUP1WUP0
Reset value000000000000
0x10PWRC_SR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IWUFRes.WBLEHCPUFWBLEFWUF11WUF10WUF9WUF8WUF7WUF6WUF5WUF4WUF3WUF2WUF1WUF0
Reset value000000000000000
OffsetRegister313029282726252423222120191817161514131211109876543210
0x14PWRC_SR2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.IOBOOTVAL[3:0]PVDORes.Res.REGLPSIOBOOTVAL2[3:0]Res.SMPSRDYSMPSENRSMPSBYPR
Reset value011110
0x18Reserved
0x1CPWRC_CR5Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SMPS_PRECH_CUR_SEL[1:0]CLKDETR_DISABLESMPS_ENA_DCMNOSMPSSMPSFBYPSMPSLPOENRes.Res.SMPSBOMSEL[1:0]
Reset value1100000010100
0x20PWRC_PUCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PUA11PUA10PUA9PUA8Res.Res.Res.Res.Res.PUA3PUA2PUA1PUA0
Reset value111111111111
0x24PWRC_PDCRARes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDA11PDA10PDA9PDA8Res.Res.Res.Res.Res.PDA3PDA2PDA1PDA0
Reset value00001000
0x28PWRC_PUCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PUB15PUB14PUB13PUB12Res.Res.Res.Res.Res.PUB7PUB6PUB5PUB4PUB3PUB2PUB1PUB0
Reset value111111111111
0x2CPWRC_PDCRBRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PDB15PDB14PDB13PDB12Res.Res.Res.Res.Res.PDB7PDB6PDB5PDB4PDB3PDB2PDB1PDB0
Reset value000000000000
0x30PWRC_CR6Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.EWU19EWU18EWU17EWU16EWU15EWU14EWU13EWU12
Reset value00000000
OffsetRegister313029282726252423222120191817161514131211109876543210
0x34PWRC_CR7Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUP19WUP18WUP17WUP16WUP15WUP14WUP13WUP12
Reset value00000000
0x38PWRC_SR3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.WUF19WUF18WUF17WUF16WUF15WUF14WUF13WUF12
Reset value00000000
0x3C-0x80Reserved
0x84PWRC_DBGRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DIS_PRE(2:0)Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DEEPSTOP2
Reset value0000
0x88PWRC_EXTSRRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RFPHASEFDEEPSTOPFRes.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value00

5.8 Programmer model

5.8.1 Reset reason management

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

Table 13. Flags versus CPU reboot reason

RCC_CSRPWRC_ISCR (in SYSCFG)PWRC_EXT_SRR
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--

If the reboot reason is a wakeup from Deepstop, then the wakeup source(s) can be read in the PWRC_SR1 register as shown in Table 14. Wakeup reason flags.

Table 14. Wakeup reason flags

PWRC_SR1
IWUF2IWUFWBLEHCPUFWBLEFWUFx
Wakeup on BLE event---1-
Wakeup on Host timer in MR_BLE event--1--
Wakeup on RTC event-1---
Wakeup on LPUART event1----
Wakeup on I/Os----1

Note: If several (enabled) wakeup events occur, several bits are high in the PWRC_SR1. The wakeup flags are set as soon as a wakeup event (enabled in PWRC_CR3 register) occurs; the associated flag is set in the PWRC_SR1 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 requests a Deepstop mode.

5.8.2 SMPS output level re-programming

The SMPS output voltage cannot be modified on-the-fly when the SMPS is in use for more than one step. When the software needs to re-program the SMPS output voltage to another value, the following sequence must be respected:

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