STM32H735xx HAL User Manual
|
Power Monitoring functions. More...
Functions | |
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. |
Power Monitoring functions.
=============================================================================== ##### Power Monitoring functions ##### =============================================================================== *** VBAT and Temperature supervision *** ======================================== [..] (+) The VBAT battery voltage supply can be monitored by comparing it with two threshold levels: VBAThigh and VBATlow. VBATH flag and VBATL flags in the PWR control register 2 (PWR_CR2), indicate if VBAT is higher or lower than the threshold. (+) The temperature can be monitored by comparing it with two threshold levels, TEMPhigh and TEMPlow. TEMPH and TEMPL flags, in the PWR control register 2 (PWR_CR2), indicate whether the device temperature is higher or lower than the threshold. (+) The VBAT and the temperature monitoring is enabled by HAL_PWREx_EnableMonitoring() function and disabled by HAL_PWREx_DisableMonitoring() function. (+) The HAL_PWREx_GetVBATLevel() function returns the VBAT level which can be : PWR_VBAT_BELOW_LOW_THRESHOLD or PWR_VBAT_ABOVE_HIGH_THRESHOLD or PWR_VBAT_BETWEEN_HIGH_LOW_THRESHOLD. (+) The HAL_PWREx_GetTemperatureLevel() function returns the Temperature level which can be : PWR_TEMP_BELOW_LOW_THRESHOLD or PWR_TEMP_ABOVE_HIGH_THRESHOLD or PWR_TEMP_BETWEEN_HIGH_LOW_THRESHOLD. *** AVD configuration *** ========================= [..] (+) The AVD is used to monitor the VDDA power supply by comparing it to a threshold selected by the AVD Level (ALS[3:0] bits in the PWR_CR1 register). (+) A AVDO flag is available to indicate if VDDA is higher or lower than the AVD threshold. This event is internally connected to the EXTI line 16 to generate an interrupt if enabled. It is configurable through __HAL_PWR_AVD_EXTI_ENABLE_IT() macro. (+) The AVD is stopped in System Standby mode.
void HAL_PWREx_AVDCallback | ( | void | ) |
PWR AVD interrupt callback.
None. |
Definition at line 2119 of file stm32h7xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_PVD_AVD_IRQHandler().
void HAL_PWREx_ConfigAVD | ( | PWREx_AVDTypeDef * | sConfigAVD | ) |
Configure the event mode and the voltage threshold detected by the Analog Voltage Detector (AVD).
sConfigAVD | : Pointer to an PWREx_AVDTypeDef structure that contains the configuration information for the AVD. |
None. |
Definition at line 1976 of file stm32h7xx_hal_pwr_ex.c.
References __HAL_PWR_AVD_EXTI_DISABLE_EVENT, __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_AVD_EXTI_DISABLE_IT, __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_AVD_EXTI_ENABLE_EVENT, __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_AVD_EXTI_ENABLE_IT, __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE, assert_param, AVD_FALLING_EDGE, AVD_MODE_EVT, AVD_MODE_IT, AVD_RISING_EDGE, PWREx_AVDTypeDef::AVDLevel, IS_PWR_AVD_LEVEL, IS_PWR_AVD_MODE, and PWREx_AVDTypeDef::Mode.
void HAL_PWREx_DisableAVD | ( | void | ) |
Disable the Analog Voltage Detector(AVD).
None. |
Definition at line 2035 of file stm32h7xx_hal_pwr_ex.c.
void HAL_PWREx_DisableMonitoring | ( | void | ) |
Disable the VBAT and temperature monitoring.
HAL | status. |
Definition at line 1871 of file stm32h7xx_hal_pwr_ex.c.
void HAL_PWREx_EnableAVD | ( | void | ) |
Enable the Analog Voltage Detector (AVD).
None. |
Definition at line 2025 of file stm32h7xx_hal_pwr_ex.c.
void HAL_PWREx_EnableMonitoring | ( | void | ) |
Enable the VBAT and temperature monitoring.
HAL | status. |
Definition at line 1861 of file stm32h7xx_hal_pwr_ex.c.
uint32_t HAL_PWREx_GetTemperatureLevel | ( | void | ) |
Indicate whether the junction temperature is between, above or below the thresholds.
Temperature | level. |
Definition at line 1882 of file stm32h7xx_hal_pwr_ex.c.
References PWR_TEMP_ABOVE_HIGH_THRESHOLD, PWR_TEMP_BELOW_LOW_THRESHOLD, and PWR_TEMP_BETWEEN_HIGH_LOW_THRESHOLD.
uint32_t HAL_PWREx_GetVBATLevel | ( | void | ) |
Indicate whether the Battery voltage level is between, above or below the thresholds.
VBAT | level. |
Definition at line 1913 of file stm32h7xx_hal_pwr_ex.c.
References PWR_VBAT_ABOVE_HIGH_THRESHOLD, PWR_VBAT_BELOW_LOW_THRESHOLD, and PWR_VBAT_BETWEEN_HIGH_LOW_THRESHOLD.
void HAL_PWREx_PVD_AVD_IRQHandler | ( | void | ) |
This function handles the PWR PVD/AVD interrupt request.
None |
Definition at line 2046 of file stm32h7xx_hal_pwr_ex.c.
References __HAL_PWR_AVD_EXTI_CLEAR_FLAG, __HAL_PWR_AVD_EXTI_GET_FLAG, __HAL_PWR_PVD_EXTI_CLEAR_FLAG, __HAL_PWR_PVD_EXTI_GET_FLAG, CM7_CPUID, HAL_GetCurrentCPUID(), HAL_PWR_PVDCallback(), and HAL_PWREx_AVDCallback().