STM32H735xx HAL User Manual
Functions
Power Supply Control Functions
PWREx Exported Functions

Power supply control functions. More...

Functions

HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource)
 Configure the system Power Supply.
uint32_t HAL_PWREx_GetSupplyConfig (void)
 Get the power supply configuration.
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling (uint32_t VoltageScaling)
 Configure the main internal regulator output voltage.
uint32_t HAL_PWREx_GetVoltageRange (void)
 Get the main internal regulator output voltage.
HAL_StatusTypeDef HAL_PWREx_ControlStopModeVoltageScaling (uint32_t VoltageScaling)
 Configure the main internal regulator output voltage in STOP mode.
uint32_t HAL_PWREx_GetStopModeVoltageRange (void)
 Get the main internal regulator output voltage in STOP mode.

Detailed Description

Power supply control functions.

 ===============================================================================
                  ##### Power supply control functions #####
 ===============================================================================
    [..]
   (#) When the system is powered on, the POR monitors VDD supply. Once VDD is
       above the POR threshold level, the voltage regulator is enabled in the
       default supply configuration:
      (+) The Voltage converter output level is set at 1V0 in accordance with
          the VOS3 level configured in PWR (D3/SRD) domain control register
          (PWR_D3CR/PWR_SRDCR).
      (+) The system is kept in reset mode as long as VCORE is not ok.
      (+) Once VCORE is ok, the system is taken out of reset and the HSI
          oscillator is enabled.
      (+) Once the oscillator is stable, the system is initialized: Flash memory
          and option bytes are loaded and the CPU starts in Run* mode.
      (+) The software shall then initialize the system including supply
          configuration programming using the HAL_PWREx_ConfigSupply().
      (+) Once the supply configuration has been configured, the
          HAL_PWREx_ConfigSupply() function checks the ACTVOSRDY bit in PWR
          control status register 1 (PWR_CSR1) to guarantee a valid voltage
          levels:
       (++) As long as ACTVOSRDY indicates that voltage levels are invalid, the
            system is in limited Run* mode, write accesses to the RAMs are not
            permitted and VOS shall not be changed.
       (++) Once ACTVOSRDY indicates that voltage levels are valid, the system
            is in normal Run mode, write accesses to RAMs are allowed and VOS
            can be changed.


Function Documentation

HAL_StatusTypeDef HAL_PWREx_ConfigSupply ( uint32_t  SupplySource)

Configure the system Power Supply.

Parameters:
SupplySource: Specifies the Power Supply source to set after a system startup. This parameter can be one of the following values :
  • PWR_DIRECT_SMPS_SUPPLY : The SMPS supplies the Vcore Power Domains. The LDO is Bypassed.
  • PWR_SMPS_1V8_SUPPLIES_LDO : The SMPS 1.8V output supplies the LDO. The Vcore Power Domains are supplied from the LDO.
  • PWR_SMPS_2V5_SUPPLIES_LDO : The SMPS 2.5V output supplies the LDO. The Vcore Power Domains are supplied from the LDO.
  • PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO : The SMPS 1.8V output supplies external circuits and the LDO. The Vcore Power Domains are supplied from the LDO.
  • PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO : The SMPS 2.5V output supplies external circuits and the LDO. The Vcore Power Domains are supplied from the LDO.
  • PWR_SMPS_1V8_SUPPLIES_EXT : The SMPS 1.8V output supplies external circuits. The LDO is Bypassed. The Vcore Power Domains are supplied from external source.
  • PWR_SMPS_2V5_SUPPLIES_EXT : The SMPS 2.5V output supplies external circuits. The LDO is Bypassed. The Vcore Power Domains are supplied from external source.
  • PWR_LDO_SUPPLY : The LDO regulator supplies the Vcore Power Domains. The SMPS regulator is Bypassed.
  • PWR_EXTERNAL_SOURCE_SUPPLY : The SMPS and the LDO are Bypassed. The Vcore Power Domains are supplied from external source.
Note:
The PWR_LDO_SUPPLY and PWR_EXTERNAL_SOURCE_SUPPLY are used by all H7 lines. The PWR_DIRECT_SMPS_SUPPLY, PWR_SMPS_1V8_SUPPLIES_LDO, PWR_SMPS_2V5_SUPPLIES_LDO, PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO, PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO, PWR_SMPS_1V8_SUPPLIES_EXT and PWR_SMPS_2V5_SUPPLIES_EXT are used only for lines that supports SMPS regulator.
Return values:
HALstatus.

Definition at line 313 of file stm32h7xx_hal_pwr_ex.c.

References __HAL_PWR_GET_FLAG, assert_param, HAL_GetTick(), IS_PWR_SUPPLY, PWR_FLAG_ACTVOSRDY, PWR_FLAG_SETTING_DELAY, PWR_FLAG_SMPSEXTRDY, PWR_SMPS_1V8_SUPPLIES_EXT, PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO, PWR_SMPS_2V5_SUPPLIES_EXT, PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO, and PWR_SUPPLY_CONFIG_MASK.

HAL_StatusTypeDef HAL_PWREx_ControlStopModeVoltageScaling ( uint32_t  VoltageScaling)

Configure the main internal regulator output voltage in STOP mode.

Parameters:
VoltageScaling: Specifies the regulator output voltage when the system enters Stop mode to achieve a tradeoff between performance and power consumption. This parameter can be one of the following values:
  • PWR_REGULATOR_SVOS_SCALE3 : Regulator voltage output range 3 mode.
  • PWR_REGULATOR_SVOS_SCALE4 : Regulator voltage output range 4 mode.
  • PWR_REGULATOR_SVOS_SCALE5 : Regulator voltage output range 5 mode.
Note:
The Stop mode voltage scaling for SVOS4 and SVOS5 sets the voltage regulator in Low-power (LP) mode to further reduce power consumption. When preselecting SVOS3, the use of the voltage regulator low-power mode (LP) can be selected by LPDS register bit.
The selected SVOS4 and SVOS5 levels add an additional startup delay when exiting from system Stop mode.
Return values:
HALStatus.

Definition at line 538 of file stm32h7xx_hal_pwr_ex.c.

References assert_param, and IS_PWR_STOP_MODE_REGULATOR_VOLTAGE.

HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling ( uint32_t  VoltageScaling)

Configure the main internal regulator output voltage.

Parameters:
VoltageScaling: Specifies the regulator output voltage to achieve a tradeoff between performance and power consumption. This parameter can be one of the following values :
  • PWR_REGULATOR_VOLTAGE_SCALE0 : Regulator voltage output Scale 0 mode.
  • PWR_REGULATOR_VOLTAGE_SCALE1 : Regulator voltage output range 1 mode.
  • PWR_REGULATOR_VOLTAGE_SCALE2 : Regulator voltage output range 2 mode.
  • PWR_REGULATOR_VOLTAGE_SCALE3 : Regulator voltage output range 3 mode.
Note:
For STM32H74x and STM32H75x lines, configuring Voltage Scale 0 is only possible when Vcore is supplied from LDO (Low DropOut). The SYSCFG Clock must be enabled through __HAL_RCC_SYSCFG_CLK_ENABLE() macro before configuring Voltage Scale 0. To enter low power mode , and if current regulator voltage is Voltage Scale 0 then first switch to Voltage Scale 1 before entering low power mode.
Return values:
HALStatus

Definition at line 413 of file stm32h7xx_hal_pwr_ex.c.

References __HAL_PWR_GET_FLAG, assert_param, HAL_GetTick(), IS_PWR_REGULATOR_VOLTAGE, PWR_FLAG_ACTVOSRDY, PWR_FLAG_SETTING_DELAY, PWR_REGULATOR_VOLTAGE_SCALE0, and PWR_REGULATOR_VOLTAGE_SCALE1.

uint32_t HAL_PWREx_GetStopModeVoltageRange ( void  )

Get the main internal regulator output voltage in STOP mode.

Return values:
Theactual applied VOS selection.

Definition at line 553 of file stm32h7xx_hal_pwr_ex.c.

uint32_t HAL_PWREx_GetSupplyConfig ( void  )

Get the power supply configuration.

Return values:
Thesupply configuration.

Definition at line 385 of file stm32h7xx_hal_pwr_ex.c.

References PWR_SUPPLY_CONFIG_MASK.

uint32_t HAL_PWREx_GetVoltageRange ( void  )

Get the main internal regulator output voltage.

Reflecting the last VOS value applied to the PMU.

Return values:
Thecurrent applied VOS selection.

Definition at line 512 of file stm32h7xx_hal_pwr_ex.c.