STM32H735xx HAL User Manual
Defines | Functions
stm32h7xx_ll_pwr.h File Reference

Header file of PWR LL module. More...

#include "stm32h7xx.h"

Go to the source code of this file.

Defines

#define LL_PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET   2UL
#define LL_PWR_WAKEUP_PINS_MAX_SHIFT_MASK   0x1FU
#define LL_PWR_FLAG_CPU_CSSF   PWR_CPUCR_CSSF
#define LL_PWR_FLAG_WKUPCR_WKUPC6   PWR_WKUPCR_WKUPC6
#define LL_PWR_FLAG_WKUPCR_WKUPC4   PWR_WKUPCR_WKUPC4
#define LL_PWR_FLAG_WKUPCR_WKUPC2   PWR_WKUPCR_WKUPC2
#define LL_PWR_FLAG_WKUPCR_WKUPC1   PWR_WKUPCR_WKUPC1
#define LL_PWR_FLAG_AVDO   PWR_CSR1_AVDO
#define LL_PWR_FLAG_PVDO   PWR_CSR1_PVDO
#define LL_PWR_FLAG_ACTVOS   PWR_CSR1_ACTVOS
#define LL_PWR_FLAG_ACTVOSRDY   PWR_CSR1_ACTVOSRDY
#define LL_PWR_FLAG_TEMPH   PWR_CR2_TEMPH
#define LL_PWR_FLAG_TEMPL   PWR_CR2_TEMPL
#define LL_PWR_FLAG_VBATH   PWR_CR2_VBATH
#define LL_PWR_FLAG_VBATL   PWR_CR2_VBATL
#define LL_PWR_FLAG_BRRDY   PWR_CR2_BRRDY
#define LL_PWR_FLAG_USBRDY   PWR_CR3_USB33RDY
#define LL_PWR_FLAG_SMPSEXTRDY   PWR_CR3_SMPSEXTRDY
#define LL_PWR_FLAG_CPU_SBF_D2   PWR_CPUCR_SBF_D2
#define LL_PWR_FLAG_CPU_SBF_D1   PWR_CPUCR_SBF_D1
#define LL_PWR_FLAG_CPU_SBF   PWR_CPUCR_SBF
#define LL_PWR_FLAG_CPU_STOPF   PWR_CPUCR_STOPF
#define LL_PWR_D3CR_VOSRDY   PWR_D3CR_VOSRDY
#define LL_PWR_WKUPFR_WKUPF6   PWR_WKUPFR_WKUPF6
#define LL_PWR_WKUPFR_WKUPF4   PWR_WKUPFR_WKUPF4
#define LL_PWR_WKUPFR_WKUPF2   PWR_WKUPFR_WKUPF2
#define LL_PWR_WKUPFR_WKUPF1   PWR_WKUPFR_WKUPF1
#define LL_PWR_CPU_MODE_D1STOP   0x00000000U
#define LL_PWR_CPU_MODE_D1STANDBY   PWR_CPUCR_PDDS_D1
#define LL_PWR_CPU_MODE_D2STOP   0x00000000U
#define LL_PWR_CPU_MODE_D2STANDBY   PWR_CPUCR_PDDS_D2
#define LL_PWR_CPU_MODE_D3RUN   PWR_CPUCR_RUN_D3
#define LL_PWR_CPU_MODE_D3STOP   0x00000000U
#define LL_PWR_CPU_MODE_D3STANDBY   PWR_CPUCR_PDDS_D3
#define LL_PWR_REGU_VOLTAGE_SCALE3   PWR_D3CR_VOS_0
#define LL_PWR_REGU_VOLTAGE_SCALE2   PWR_D3CR_VOS_1
#define LL_PWR_REGU_VOLTAGE_SCALE1   (PWR_D3CR_VOS_0 | PWR_D3CR_VOS_1)
#define LL_PWR_REGU_VOLTAGE_SCALE0   0x00000000U
#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE5   PWR_CR1_SVOS_0
#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE4   PWR_CR1_SVOS_1
#define LL_PWR_REGU_VOLTAGE_SVOS_SCALE3   (PWR_CR1_SVOS_0 | PWR_CR1_SVOS_1)
#define LL_PWR_REGU_DSMODE_MAIN   0x00000000U
#define LL_PWR_REGU_DSMODE_LOW_POWER   PWR_CR1_LPDS
#define LL_PWR_PVDLEVEL_0   PWR_CR1_PLS_LEV0
#define LL_PWR_PVDLEVEL_1   PWR_CR1_PLS_LEV1
#define LL_PWR_PVDLEVEL_2   PWR_CR1_PLS_LEV2
#define LL_PWR_PVDLEVEL_3   PWR_CR1_PLS_LEV3
#define LL_PWR_PVDLEVEL_4   PWR_CR1_PLS_LEV4
#define LL_PWR_PVDLEVEL_5   PWR_CR1_PLS_LEV5
#define LL_PWR_PVDLEVEL_6   PWR_CR1_PLS_LEV6
#define LL_PWR_PVDLEVEL_7   PWR_CR1_PLS_LEV7
#define LL_PWR_AVDLEVEL_0   PWR_CR1_ALS_LEV0
#define LL_PWR_AVDLEVEL_1   PWR_CR1_ALS_LEV1
#define LL_PWR_AVDLEVEL_2   PWR_CR1_ALS_LEV2
#define LL_PWR_AVDLEVEL_3   PWR_CR1_ALS_LEV3
#define LL_PWR_BATT_CHARG_RESISTOR_5K   0x00000000U
#define LL_PWR_BATT_CHARGRESISTOR_1_5K   PWR_CR3_VBRS
#define LL_PWR_WAKEUP_PIN1   PWR_WKUPEPR_WKUPEN1
#define LL_PWR_WAKEUP_PIN2   PWR_WKUPEPR_WKUPEN2
#define LL_PWR_WAKEUP_PIN4   PWR_WKUPEPR_WKUPEN4
#define LL_PWR_WAKEUP_PIN6   PWR_WKUPEPR_WKUPEN6
#define LL_PWR_WAKEUP_PIN_NOPULL   0x00000000UL
#define LL_PWR_WAKEUP_PIN_PULLUP   0x00000001UL
#define LL_PWR_WAKEUP_PIN_PULLDOWN   0x00000002UL
#define LL_PWR_LDO_SUPPLY   PWR_CR3_LDOEN
#define LL_PWR_DIRECT_SMPS_SUPPLY   PWR_CR3_SMPSEN
#define LL_PWR_SMPS_1V8_SUPPLIES_LDO   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define LL_PWR_SMPS_2V5_SUPPLIES_LDO   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define LL_PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define LL_PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define LL_PWR_SMPS_1V8_SUPPLIES_EXT   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
#define LL_PWR_SMPS_2V5_SUPPLIES_EXT   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
#define LL_PWR_EXTERNAL_SOURCE_SUPPLY   PWR_CR3_BYPASS
#define LL_PWR_WriteReg(__REG__, __VALUE__)   WRITE_REG(PWR->__REG__, (__VALUE__))
 Write a value in PWR register.
#define LL_PWR_ReadReg(__REG__)   READ_REG(PWR->__REG__)
 Read a value in PWR register.

Functions

__STATIC_INLINE void LL_PWR_SetRegulModeDS (uint32_t RegulMode)
 Set the voltage Regulator mode during deep sleep mode.
__STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS (void)
 Get the voltage Regulator mode during deep sleep mode.
__STATIC_INLINE void LL_PWR_EnablePVD (void)
 Enable Power Voltage Detector.
__STATIC_INLINE void LL_PWR_DisablePVD (void)
 Disable Power Voltage Detector.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD (void)
 Check if Power Voltage Detector is enabled.
__STATIC_INLINE void LL_PWR_SetPVDLevel (uint32_t PVDLevel)
 Configure the voltage threshold detected by the Power Voltage Detector.
__STATIC_INLINE uint32_t LL_PWR_GetPVDLevel (void)
 Get the voltage threshold detection.
__STATIC_INLINE void LL_PWR_EnableBkUpAccess (void)
 Enable access to the backup domain.
__STATIC_INLINE void LL_PWR_DisableBkUpAccess (void)
 Disable access to the backup domain.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess (void)
 Check if the backup domain is enabled.
__STATIC_INLINE void LL_PWR_EnableFlashPowerDown (void)
 Enable the Flash Power Down in Stop Mode.
__STATIC_INLINE void LL_PWR_DisableFlashPowerDown (void)
 Disable the Flash Power Down in Stop Mode.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledFlashPowerDown (void)
 Check if the Flash Power Down in Stop Mode is enabled.
__STATIC_INLINE void LL_PWR_SetStopModeRegulVoltageScaling (uint32_t VoltageScaling)
 Set the internal Regulator output voltage in STOP mode.
__STATIC_INLINE uint32_t LL_PWR_GetStopModeRegulVoltageScaling (void)
 Get the internal Regulator output voltage in STOP mode.
__STATIC_INLINE void LL_PWR_EnableAVD (void)
 Enable Analog Power Voltage Detector.
__STATIC_INLINE void LL_PWR_DisableAVD (void)
 Disable Analog Power Voltage Detector.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledAVD (void)
 Check if Analog Power Voltage Detector is enabled.
__STATIC_INLINE void LL_PWR_SetAVDLevel (uint32_t AVDLevel)
 Configure the voltage threshold to be detected by the Analog Power Voltage Detector.
__STATIC_INLINE uint32_t LL_PWR_GetAVDLevel (void)
 Get the Analog Voltage threshold to be detected by the Analog Power Voltage Detector.
__STATIC_INLINE void LL_PWR_EnableBkUpRegulator (void)
 Enable Backup Regulator.
__STATIC_INLINE void LL_PWR_DisableBkUpRegulator (void)
 Disable Backup Regulator.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpRegulator (void)
 Check if the backup Regulator is enabled.
__STATIC_INLINE void LL_PWR_EnableMonitoring (void)
 Enable VBAT and Temperature monitoring.
__STATIC_INLINE void LL_PWR_DisableMonitoring (void)
 Disable VBAT and Temperature monitoring.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledMonitoring (void)
 Check if the VBAT and Temperature monitoring is enabled.
__STATIC_INLINE void LL_PWR_ConfigSupply (uint32_t SupplySource)
 Configure the PWR supply.
__STATIC_INLINE uint32_t LL_PWR_GetSupply (void)
 Get the PWR supply.
__STATIC_INLINE void LL_PWR_EnableBatteryCharging (void)
 Enable battery charging.
__STATIC_INLINE void LL_PWR_DisableBatteryCharging (void)
 Disable battery charging.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging (void)
 Check if battery charging is enabled.
__STATIC_INLINE void LL_PWR_SetBattChargResistor (uint32_t Resistor)
 Set the Battery charge resistor impedance.
__STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor (void)
 Get the Battery charge resistor impedance.
__STATIC_INLINE void LL_PWR_EnableUSBReg (void)
 Enable the USB regulator.
__STATIC_INLINE void LL_PWR_DisableUSBReg (void)
 Disable the USB regulator.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBReg (void)
 Check if the USB regulator is enabled.
__STATIC_INLINE void LL_PWR_EnableUSBVoltageDetector (void)
 Enable the USB voltage detector.
__STATIC_INLINE void LL_PWR_DisableUSBVoltageDetector (void)
 Disable the USB voltage detector.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledUSBVoltageDetector (void)
 Check if the USB voltage detector is enabled.
__STATIC_INLINE void LL_PWR_CPU_SetD1PowerMode (uint32_t PDMode)
 Set the D1 domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE uint32_t LL_PWR_CPU_GetD1PowerMode (void)
 Get the D1 Domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE void LL_PWR_CPU_SetD2PowerMode (uint32_t PDMode)
 Set the D2 domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE uint32_t LL_PWR_CPU_GetD2PowerMode (void)
 Get the D2 Domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE void LL_PWR_CPU_SetD3PowerMode (uint32_t PDMode)
 Set the D3 domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE uint32_t LL_PWR_CPU_GetD3PowerMode (void)
 Get the D3 Domain Power Down mode when the CPU enters deepsleep.
__STATIC_INLINE void LL_PWR_CPU_EnableD3RunInLowPowerMode (void)
 D3 domain remains in Run mode regardless of CPU subsystem modes.
__STATIC_INLINE void LL_PWR_CPU_DisableD3RunInLowPowerMode (void)
 D3 domain follows CPU subsystem modes.
__STATIC_INLINE uint32_t LL_PWR_CPU_IsEnabledD3RunInLowPowerMode (void)
 Check if D3 is kept in Run mode when CPU enters low power mode.
__STATIC_INLINE void LL_PWR_SetRegulVoltageScaling (uint32_t VoltageScaling)
 Set the main internal Regulator output voltage.
__STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling (void)
 Get the main internal Regulator output voltage.
__STATIC_INLINE void LL_PWR_EnableWakeUpPin (uint32_t WakeUpPin)
 Enable the WakeUp PINx functionality.
__STATIC_INLINE void LL_PWR_DisableWakeUpPin (uint32_t WakeUpPin)
 Disable the WakeUp PINx functionality.
__STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin (uint32_t WakeUpPin)
 Check if the WakeUp PINx functionality is enabled.
__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow (uint32_t WakeUpPin)
 Set the Wake-Up pin polarity low for the event detection.
__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh (uint32_t WakeUpPin)
 Set the Wake-Up pin polarity high for the event detection.
__STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow (uint32_t WakeUpPin)
 Get the Wake-Up pin polarity for the event detection.
__STATIC_INLINE void LL_PWR_SetWakeUpPinPullNone (uint32_t WakeUpPin)
 Set the Wake-Up pin Pull None.
__STATIC_INLINE void LL_PWR_SetWakeUpPinPullUp (uint32_t WakeUpPin)
 Set the Wake-Up pin Pull Up.
__STATIC_INLINE void LL_PWR_SetWakeUpPinPullDown (uint32_t WakeUpPin)
 Set the Wake-Up pin Pull Down.
__STATIC_INLINE uint32_t LL_PWR_GetWakeUpPinPull (uint32_t WakeUpPin)
 Get the Wake-Up pin pull.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO (void)
 Indicate whether VDD voltage is below the selected PVD threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_ACTVOS (void)
 Indicate whether the voltage level is ready for current actual used VOS.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_AVDO (void)
 Indicate whether VDDA voltage is below the selected AVD threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BRR (void)
 Get Backup Regulator ready Flag.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATL (void)
 Indicate whether the VBAT level is above or below low threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VBATH (void)
 Indicate whether the VBAT level is above or below high threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPL (void)
 Indicate whether the CPU temperature level is above or below low threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_TEMPH (void)
 Indicate whether the CPU temperature level is above or below high threshold.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SMPSEXT (void)
 Indicate whether the SMPS external supply is ready or not.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_USB (void)
 Indicate whether the USB supply is ready or not.
__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_STOP (void)
 Get CPU System Stop Flag.
__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB (void)
 Get CPU System Standby Flag.
__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D1 (void)
 Get CPU D1 Domain Standby Flag.
__STATIC_INLINE uint32_t LL_PWR_CPU_IsActiveFlag_SB_D2 (void)
 Get CPU D2 Domain Standby Flag.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOS (void)
 Indicate whether the Regulator is ready in the selected voltage range or if its output voltage is still changing to the required voltage level.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU6 (void)
 Get Wake-up Flag 6.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4 (void)
 Get Wake-up Flag 4.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2 (void)
 Get Wake-up Flag 2.
__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1 (void)
 Get Wake-up Flag 1.
__STATIC_INLINE void LL_PWR_ClearFlag_CPU (void)
 Clear CPU STANDBY, STOP and HOLD flags.
__STATIC_INLINE void LL_PWR_ClearFlag_WU6 (void)
 Clear Wake-up Flag 6.
__STATIC_INLINE void LL_PWR_ClearFlag_WU4 (void)
 Clear Wake-up Flag 4.
__STATIC_INLINE void LL_PWR_ClearFlag_WU2 (void)
 Clear Wake-up Flag 2.
__STATIC_INLINE void LL_PWR_ClearFlag_WU1 (void)
 Clear Wake-up Flag 1.
ErrorStatus LL_PWR_DeInit (void)
 De-initialize the PWR registers to their default reset values.

Detailed Description

Header file of PWR LL module.

Author:
MCD Application Team
Attention:

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32h7xx_ll_pwr.h.