Module stm32h7xx_hal::pwr

source ·
Expand description

Power configuration

This module configures the PWR unit to provide the core voltage VCORE. The voltage scaling mode is VOS1 (High Performance) by default, but VOS2, VOS3 and VOS0 can also be selected.

When the system starts up, it is in Run* mode. After the call to freeze, it will be in Run mode. See RM0433 Rev 7 Section 6.6.1 “System/D3 domain modes”.

§Examples

    let dp = pac::Peripherals::take().unwrap();

    let pwr = dp.PWR.constrain();
    let pwrcfg = pwr.freeze();

    assert_eq!(pwrcfg.vos(), VoltageScale::Scale1);

§SMPS

Some parts include an integrated Switched Mode Power Supply (SMPS) to supply VCORE. For these parts, the method of supplying VCORE can be specified. Refer to RM0399 Rev 3 Table 32. for a more detailed descriptions of the possible modes.

Note: Specifying the wrong mode for your hardware will cause undefined results.

    let dp = pac::Peripherals::take().unwrap();

    let pwr = dp.PWR.constrain();
    let pwrcfg = pwr.smps().freeze();

    assert_eq!(pwrcfg.vos(), VoltageScale::Scale1);

The VCORE supply configuration can only be set once after each POR, and this is enforced by hardware. If you add or change the power supply method, freeze will panic until you power on reset your board.

§Boost Mode (VOS0)

Some parts have a Boost Mode that allows higher clock speeds. This can be selected using the .vos0(..) builder method. The following parts are supported:

PartsReference ManualMaximum Core Clock with VOS0
stm32h742/743/753/750RM0433480MHz 1
stm32h745/747/755/757RM0399480MHz
stm32h7a3/7b3/7b0RM0455280MHz
stm32h723/725/730/733/735RM0468520MHz 2

  1. Revision V and later parts only 

  2. These parts allow up to 550MHz by setting an additional bit in User Register 18, but this is not supported through the HAL. 

Structs§

Enums§

Traits§

  • Extension trait that constrains the PWR peripheral