STM32H735xx HAL User Manual
Data Structures | Defines | Functions
stm32h7xx_hal_pwr_ex.h File Reference

Header file of PWR HAL Extension module. More...

#include "stm32h7xx_hal_def.h"

Go to the source code of this file.

Data Structures

struct  PWREx_AVDTypeDef
 PWREx AVD configuration structure definition. More...
struct  PWREx_WakeupPinTypeDef
 PWREx Wakeup pin configuration structure definition. More...

Defines

#define PWR_WAKEUP_PIN6   PWR_WKUPEPR_WKUPEN6
#define PWR_WAKEUP_PIN4   PWR_WKUPEPR_WKUPEN4
#define PWR_WAKEUP_PIN2   PWR_WKUPEPR_WKUPEN2
#define PWR_WAKEUP_PIN1   PWR_WKUPEPR_WKUPEN1
#define PWR_WAKEUP_PIN6_HIGH   PWR_WKUPEPR_WKUPEN6
#define PWR_WAKEUP_PIN4_HIGH   PWR_WKUPEPR_WKUPEN4
#define PWR_WAKEUP_PIN2_HIGH   PWR_WKUPEPR_WKUPEN2
#define PWR_WAKEUP_PIN1_HIGH   PWR_WKUPEPR_WKUPEN1
#define PWR_WAKEUP_PIN6_LOW   (PWR_WKUPEPR_WKUPP6 | PWR_WKUPEPR_WKUPEN6)
#define PWR_WAKEUP_PIN4_LOW   (PWR_WKUPEPR_WKUPP4 | PWR_WKUPEPR_WKUPEN4)
#define PWR_WAKEUP_PIN2_LOW   (PWR_WKUPEPR_WKUPP2 | PWR_WKUPEPR_WKUPEN2)
#define PWR_WAKEUP_PIN1_LOW   (PWR_WKUPEPR_WKUPP1 | PWR_WKUPEPR_WKUPEN1)
#define PWR_PIN_POLARITY_HIGH   (0x00000000U)
#define PWR_PIN_POLARITY_LOW   (0x00000001U)
#define PWR_PIN_NO_PULL   (0x00000000U)
#define PWR_PIN_PULL_UP   (0x00000001U)
#define PWR_PIN_PULL_DOWN   (0x00000002U)
#define PWR_WAKEUP_FLAG1   PWR_WKUPFR_WKUPF1
#define PWR_WAKEUP_FLAG2   PWR_WKUPFR_WKUPF2
#define PWR_WAKEUP_FLAG4   PWR_WKUPFR_WKUPF4
#define PWR_WAKEUP_FLAG6   PWR_WKUPFR_WKUPF6
#define PWR_WAKEUP_FLAG_ALL
#define PWR_D1_DOMAIN   (0x00000000U)
#define PWR_D2_DOMAIN   (0x00000001U)
#define PWR_D3_DOMAIN   (0x00000002U)
#define PWR_CPU_FLAGS   (0x00000000U)
#define PWR_D3_DOMAIN_STOP   (0x00000000U)
#define PWR_D3_DOMAIN_RUN   (0x00000800U)
#define PWR_LDO_SUPPLY   PWR_CR3_LDOEN
#define PWR_DIRECT_SMPS_SUPPLY   PWR_CR3_SMPSEN
#define PWR_SMPS_1V8_SUPPLIES_LDO   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define PWR_SMPS_2V5_SUPPLIES_LDO   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define PWR_SMPS_2V5_SUPPLIES_EXT_AND_LDO   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_LDOEN)
#define PWR_SMPS_1V8_SUPPLIES_EXT   (PWR_CR3_SMPSLEVEL_0 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
#define PWR_SMPS_2V5_SUPPLIES_EXT   (PWR_CR3_SMPSLEVEL_1 | PWR_CR3_SMPSEXTHP | PWR_CR3_SMPSEN | PWR_CR3_BYPASS)
#define PWR_EXTERNAL_SOURCE_SUPPLY   PWR_CR3_BYPASS
#define PWR_SUPPLY_CONFIG_MASK
#define PWR_AVDLEVEL_0   PWR_CR1_ALS_LEV0
#define PWR_AVDLEVEL_1   PWR_CR1_ALS_LEV1
#define PWR_AVDLEVEL_2   PWR_CR1_ALS_LEV2
#define PWR_AVDLEVEL_3   PWR_CR1_ALS_LEV3
#define PWR_AVD_MODE_NORMAL   (0x00000000U)
#define PWR_AVD_MODE_IT_RISING   (0x00010001U)
#define PWR_AVD_MODE_IT_FALLING   (0x00010002U)
#define PWR_AVD_MODE_IT_RISING_FALLING   (0x00010003U)
#define PWR_AVD_MODE_EVENT_RISING   (0x00020001U)
#define PWR_AVD_MODE_EVENT_FALLING   (0x00020002U)
#define PWR_AVD_MODE_EVENT_RISING_FALLING   (0x00020003U)
#define PWR_REGULATOR_SVOS_SCALE5   (PWR_CR1_SVOS_0)
#define PWR_REGULATOR_SVOS_SCALE4   (PWR_CR1_SVOS_1)
#define PWR_REGULATOR_SVOS_SCALE3   (PWR_CR1_SVOS_0 | PWR_CR1_SVOS_1)
#define PWR_BATTERY_CHARGING_RESISTOR_5   (0x00000000U)
#define PWR_BATTERY_CHARGING_RESISTOR_1_5   PWR_CR3_VBRS
#define PWR_VBAT_BETWEEN_HIGH_LOW_THRESHOLD   (0x00000000U)
#define PWR_VBAT_BELOW_LOW_THRESHOLD   PWR_CR2_VBATL
#define PWR_VBAT_ABOVE_HIGH_THRESHOLD   PWR_CR2_VBATH
#define PWR_TEMP_BETWEEN_HIGH_LOW_THRESHOLD   (0x00000000U)
#define PWR_TEMP_BELOW_LOW_THRESHOLD   PWR_CR2_TEMPL
#define PWR_TEMP_ABOVE_HIGH_THRESHOLD   PWR_CR2_TEMPH
#define PWR_EXTI_LINE_AVD   EXTI_IMR1_IM16
#define __HAL_PWR_AVD_EXTI_ENABLE_IT()   SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_AVD)
 Enable the AVD EXTI Line 16.
#define __HAL_PWR_AVD_EXTI_DISABLE_IT()   CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_AVD)
 Disable the AVD EXTI Line 16.
#define __HAL_PWR_AVD_EXTI_ENABLE_EVENT()   SET_BIT(EXTI->EMR1, PWR_EXTI_LINE_AVD)
 Enable event on AVD EXTI Line 16.
#define __HAL_PWR_AVD_EXTI_DISABLE_EVENT()   CLEAR_BIT(EXTI->EMR1, PWR_EXTI_LINE_AVD)
 Disable event on AVD EXTI Line 16.
#define __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_AVD)
 Enable the AVD Extended Interrupt Rising Trigger.
#define __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_AVD)
 Disable the AVD Extended Interrupt Rising Trigger.
#define __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_AVD)
 Enable the AVD Extended Interrupt Falling Trigger.
#define __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_AVD)
 Disable the AVD Extended Interrupt Falling Trigger.
#define __HAL_PWR_AVD_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable the AVD Extended Interrupt Rising and Falling Trigger.
#define __HAL_PWR_AVD_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable the AVD Extended Interrupt Rising & Falling Trigger.
#define __HAL_PWR_AVD_EXTI_GET_FLAG()   ((READ_BIT(EXTI->PR1, PWR_EXTI_LINE_AVD) == PWR_EXTI_LINE_AVD) ? 1UL : 0UL)
 Check whether the specified AVD EXTI interrupt flag is set or not.
#define __HAL_PWR_AVD_EXTI_CLEAR_FLAG()   SET_BIT(EXTI->PR1, PWR_EXTI_LINE_AVD)
 Clear the AVD EXTI flag.
#define __HAL_PWR_AVD_EXTI_GENERATE_SWIT()   SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_AVD)
 Generates a Software interrupt on AVD EXTI line.
#define IS_PWR_SUPPLY(PWR_SOURCE)
#define IS_PWR_STOP_MODE_REGULATOR_VOLTAGE(VOLTAGE)
#define IS_PWR_DOMAIN(DOMAIN)
#define IS_D3_STATE(STATE)
#define IS_PWR_WAKEUP_PIN(PIN)
#define IS_PWR_WAKEUP_PIN_POLARITY(POLARITY)
#define IS_PWR_WAKEUP_PIN_PULL(PULL)
#define IS_PWR_WAKEUP_FLAG(FLAG)
#define IS_PWR_AVD_LEVEL(LEVEL)
#define IS_PWR_AVD_MODE(MODE)
#define IS_PWR_BATTERY_RESISTOR_SELECT(RESISTOR)
#define IS_PWR_D1_CPU(CPU)   ((CPU) == CM7_CPUID)

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.
void HAL_PWREx_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry, uint32_t Domain)
 Enter a Domain to DSTOP mode.
void HAL_PWREx_EnterSTANDBYMode (uint32_t Domain)
 Enter a Domain to DSTANDBY mode.
void HAL_PWREx_ConfigD3Domain (uint32_t D3State)
 Configure the D3/SRD Domain state when the System in low power mode.
void HAL_PWREx_ClearPendingEvent (void)
 Clear pending event.
void HAL_PWREx_EnableFlashPowerDown (void)
 Enable the Flash Power Down in Stop mode.
void HAL_PWREx_DisableFlashPowerDown (void)
 Disable the Flash Power Down in Stop mode.
void HAL_PWREx_EnableWakeUpPin (PWREx_WakeupPinTypeDef *sPinParams)
 Enable the Wake-up PINx functionality.
void HAL_PWREx_DisableWakeUpPin (uint32_t WakeUpPin)
 Disable the Wake-up PINx functionality.
uint32_t HAL_PWREx_GetWakeupFlag (uint32_t WakeUpFlag)
 Get the Wake-Up Pin pending flags.
HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag (uint32_t WakeUpFlag)
 Clear the Wake-Up pin pending flag.
void HAL_PWREx_WAKEUP_PIN_IRQHandler (void)
 This function handles the PWR WAKEUP PIN interrupt request.
__weak void HAL_PWREx_WKUP1_Callback (void)
 PWR WKUP1 interrupt callback.
__weak void HAL_PWREx_WKUP2_Callback (void)
 PWR WKUP2 interrupt callback.
__weak void HAL_PWREx_WKUP4_Callback (void)
 PWR WKUP4 interrupt callback.
__weak void HAL_PWREx_WKUP6_Callback (void)
 PWR WKUP6 interrupt callback.
HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg (void)
 Enable the Backup Regulator.
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg (void)
 Disable the Backup Regulator.
HAL_StatusTypeDef HAL_PWREx_EnableUSBReg (void)
 Enable the USB Regulator.
HAL_StatusTypeDef HAL_PWREx_DisableUSBReg (void)
 Disable the USB Regulator.
void HAL_PWREx_EnableUSBVoltageDetector (void)
 Enable the USB voltage level detector.
void HAL_PWREx_DisableUSBVoltageDetector (void)
 Disable the USB voltage level detector.
void HAL_PWREx_EnableBatteryCharging (uint32_t ResistorValue)
 Enable the Battery charging.
void HAL_PWREx_DisableBatteryCharging (void)
 Disable the Battery charging.
void HAL_PWREx_EnableMonitoring (void)
 Enable the VBAT and temperature monitoring.
void HAL_PWREx_DisableMonitoring (void)
 Disable the VBAT and temperature monitoring.
uint32_t HAL_PWREx_GetTemperatureLevel (void)
 Indicate whether the junction temperature is between, above or below the thresholds.
uint32_t HAL_PWREx_GetVBATLevel (void)
 Indicate whether the Battery voltage level is between, above or below the thresholds.
void HAL_PWREx_ConfigAVD (PWREx_AVDTypeDef *sConfigAVD)
 Configure the event mode and the voltage threshold detected by the Analog Voltage Detector (AVD).
void HAL_PWREx_EnableAVD (void)
 Enable the Analog Voltage Detector (AVD).
void HAL_PWREx_DisableAVD (void)
 Disable the Analog Voltage Detector(AVD).
void HAL_PWREx_PVD_AVD_IRQHandler (void)
 This function handles the PWR PVD/AVD interrupt request.
__weak void HAL_PWREx_AVDCallback (void)
 PWR AVD interrupt callback.

Detailed Description

Header file of PWR HAL Extension 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_hal_pwr_ex.h.