STM32H735xx HAL User Manual
|
Extended PWR HAL module driver. This file provides firmware functions to manage the following functionalities of PWR extension peripheral: + Peripheral Extended features functions. More...
#include "stm32h7xx_hal.h"
Go to the source code of this file.
Defines | |
#define | AVD_MODE_IT (0x00010000U) |
#define | AVD_MODE_EVT (0x00020000U) |
#define | AVD_RISING_EDGE (0x00000001U) |
#define | AVD_FALLING_EDGE (0x00000002U) |
#define | AVD_RISING_FALLING_EDGE (0x00000003U) |
#define | PWR_FLAG_SETTING_DELAY (1000U) |
#define | PWR_EXTI_WAKEUP_PINS_MASK |
#define | PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET (2U) |
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_ClearPendingEvent (void) |
Clear pending event. | |
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_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. |
Extended PWR HAL module driver. This file provides firmware functions to manage the following functionalities of PWR extension peripheral: + Peripheral Extended features functions.
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.
============================================================================== ##### How to use this driver ##### ============================================================================== [..] (#) Call HAL_PWREx_ConfigSupply() function to configure the regulator supply with the following different setups according to hardware (support SMPS): (+) 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 (+) PWR_SMPS_2V5_SUPPLIES_EXT (+) PWR_LDO_SUPPLY (+) PWR_EXTERNAL_SOURCE_SUPPLY (#) Call HAL_PWREx_GetSupplyConfig() function to get the current supply setup. (#) Call HAL_PWREx_ControlVoltageScaling() function to configure the main internal regulator output voltage. The voltage scaling could be one of the following scales : (+) PWR_REGULATOR_VOLTAGE_SCALE0 (+) PWR_REGULATOR_VOLTAGE_SCALE1 (+) PWR_REGULATOR_VOLTAGE_SCALE2 (+) PWR_REGULATOR_VOLTAGE_SCALE3 (#) Call HAL_PWREx_GetVoltageRange() function to get the current output voltage applied to the main regulator. (#) Call HAL_PWREx_ControlStopModeVoltageScaling() function to configure the main internal regulator output voltage in STOP mode. The voltage scaling in STOP mode could be one of the following scales : (+) PWR_REGULATOR_SVOS_SCALE3 (+) PWR_REGULATOR_SVOS_SCALE4 (+) PWR_REGULATOR_SVOS_SCALE5 (#) Call HAL_PWREx_GetStopModeVoltageRange() function to get the current output voltage applied to the main regulator in STOP mode. (#) Call HAL_PWREx_EnterSTOP2Mode() function to enter the system in STOP mode with core domain in D2STOP mode. This API is used only for STM32H7Axxx and STM32H7Bxxx devices. Please ensure to clear all CPU pending events by calling HAL_PWREx_ClearPendingEvent() function when trying to enter the Cortex-Mx in DEEP-SLEEP mode with __WFE() entry. (#) Call HAL_PWREx_EnterSTOPMode() function to enter the selected domain in DSTOP mode. Call this API with all available power domains to enter the system in STOP mode. Please ensure to clear all CPU pending events by calling HAL_PWREx_ClearPendingEvent() function when trying to enter the Cortex-Mx in DEEP-SLEEP mode with __WFE() entry. (#) Call HAL_PWREx_ClearPendingEvent() function always before entring the Cortex-Mx in any low power mode (SLEEP/DEEP-SLEEP) using WFE entry. (#) Call HAL_PWREx_EnterSTANDBYMode() function to enter the selected domain in DSTANDBY mode. Call this API with all available power domains to enter the system in STANDBY mode. (#) Call HAL_PWREx_ConfigD3Domain() function to setup the D3/SRD domain state (RUN/STOP) when the system enter to low power mode. (#) Call HAL_PWREx_ClearDomainFlags() function to clear the CPU flags for the selected power domain. This API is used only for dual core devices. (#) Call HAL_PWREx_HoldCore() and HAL_PWREx_ReleaseCore() functions to hold and release the selected CPU and and their domain peripherals when exiting STOP mode. These APIs are used only for dual core devices. (#) Call HAL_PWREx_EnableFlashPowerDown() and HAL_PWREx_DisableFlashPowerDown() functions to enable and disable the Flash Power Down in STOP mode. (#) Call HAL_PWREx_EnableMemoryShutOff() and HAL_PWREx_DisableMemoryShutOff() functions to enable and disable the memory block shut-off in DStop or DStop2. These APIs are used only for STM32H7Axxx and STM32H7Bxxx lines. (#) Call HAL_PWREx_EnableWakeUpPin() and HAL_PWREx_DisableWakeUpPin() functions to enable and disable the Wake-up pin functionality for the selected pin. (#) Call HAL_PWREx_GetWakeupFlag() and HAL_PWREx_ClearWakeupFlag() functions to manage wake-up flag for the selected pin. (#) Call HAL_PWREx_WAKEUP_PIN_IRQHandler() function to handle all wake-up pins interrupts. (#) Call HAL_PWREx_EnableBkUpReg() and HAL_PWREx_DisableBkUpReg() functions to enable and disable the backup domain regulator. (#) Call HAL_PWREx_EnableUSBReg(), HAL_PWREx_DisableUSBReg(), HAL_PWREx_EnableUSBVoltageDetector() and HAL_PWREx_DisableUSBVoltageDetector() functions to manage USB power regulation functionalities. (#) Call HAL_PWREx_EnableBatteryCharging() and HAL_PWREx_DisableBatteryCharging() functions to enable and disable the battery charging feature with the selected resistor. (#) Call HAL_PWREx_EnableAnalogBooster() and HAL_PWREx_DisableAnalogBooster() functions to enable and disable the AVD boost feature when the VDD supply voltage is below 2V7. (#) Call HAL_PWREx_EnableMonitoring() and HAL_PWREx_DisableMonitoring() functions to enable and disable the VBAT and Temperature monitoring. When VBAT and Temperature monitoring feature is enables, use HAL_PWREx_GetTemperatureLevel() and HAL_PWREx_GetVBATLevel() to get respectively the Temperature level and VBAT level. (#) Call HAL_PWREx_GetMMCVoltage() and HAL_PWREx_DisableMonitoring() function to get VDDMMC voltage level. This API is used only for STM32H7Axxx and STM32H7Bxxx lines (#) Call HAL_PWREx_ConfigAVD() after setting parameter to be configured (event mode and voltage threshold) in order to set up the Analog Voltage Detector then use HAL_PWREx_EnableAVD() and HAL_PWREx_DisableAVD() functions to start and stop the AVD detection. (+) AVD level could be one of the following values : (++) 1V7 (++) 2V1 (++) 2V5 (++) 2V8 (#) Call HAL_PWREx_PVD_AVD_IRQHandler() function to handle the PWR PVD and AVD interrupt request.
Definition in file stm32h7xx_hal_pwr_ex.c.