STM32H735xx HAL User Manual
|
Power Control functions. More...
Functions | |
void | HAL_PWR_ConfigPVD (PWR_PVDTypeDef *sConfigPVD) |
Configure the event mode and the voltage threshold detected by the Programmable Voltage Detector(PVD). | |
void | HAL_PWR_EnablePVD (void) |
Enable the Programmable Voltage Detector (PVD). | |
void | HAL_PWR_DisablePVD (void) |
Disable the Programmable Voltage Detector (PVD). | |
void | HAL_PWR_EnableWakeUpPin (uint32_t WakeUpPinPolarity) |
Enable the WakeUp PINx functionality. | |
void | HAL_PWR_DisableWakeUpPin (uint32_t WakeUpPinx) |
Disable the WakeUp PINx functionality. | |
void | HAL_PWR_EnterSLEEPMode (uint32_t Regulator, uint8_t SLEEPEntry) |
Enter the current core in SLEEP mode (CSLEEP). | |
void | HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry) |
Enter STOP mode. | |
void | HAL_PWR_EnterSTANDBYMode (void) |
Enter STANDBY mode. | |
void | HAL_PWR_EnableSleepOnExit (void) |
Indicate Sleep-On-Exit feature when returning from Handler mode to Thread mode. | |
void | HAL_PWR_DisableSleepOnExit (void) |
Disable Sleep-On-Exit feature when returning from Handler mode to Thread mode. | |
void | HAL_PWR_EnableSEVOnPend (void) |
Enable CORTEX SEVONPEND feature. | |
void | HAL_PWR_DisableSEVOnPend (void) |
Disable CORTEX SEVONPEND feature. | |
void | HAL_PWR_PVD_IRQHandler (void) |
This function handles the PWR PVD interrupt request. | |
void | HAL_PWR_PVDCallback (void) |
PWR PVD interrupt callback. |
Power Control functions.
=============================================================================== ##### Peripheral Control Functions ##### =============================================================================== [..] This section provides functions allowing to control power peripheral. *** PVD configuration *** ========================= [..] (+) The PVD is used to monitor the VDD power supply by comparing it to a threshold selected by the PVD Level (PLS[7:0] bits in the PWR_CR1 register). (+) A PVDO flag is available to indicate if VDD is higher or lower than the PVD threshold. This event is internally connected to the EXTI line 16 to generate an interrupt if enabled. It is configurable through __HAL_PWR_PVD_EXTI_ENABLE_IT() macro. (+) The PVD is stopped in STANDBY mode. *** Wake-up pin configuration *** ================================= [..] (+) Wake-up pin is used to wake up the system from STANDBY mode. The pin pull is configurable through the WKUPEPR register to be in No-pull, Pull-up and Pull-down. The pin polarity is configurable through the WKUPEPR register to be active on rising or falling edges. (+) There are up to six Wake-up pin in the STM32H7 devices family. *** Low Power modes configuration *** ===================================== [..] The device present 3 principles low-power modes features: (+) SLEEP mode : Cortex-Mx is stopped and all PWR domains are remaining active (Powered and Clocked). (+) STOP mode : Cortex-Mx is stopped, clocks are stopped and the regulator is running. The Main regulator or the LP regulator could be selected. (+) STANDBY mode : All PWR domains enter DSTANDBY mode and the VCORE supply regulator is powered off. *** SLEEP mode *** ================== [..] (+) Entry: The SLEEP mode is entered by using the HAL_PWR_EnterSLEEPMode(Regulator, SLEEPEntry) function. (++) PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction. (++) PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction. -@@- The Regulator parameter is not used for the STM32H7 family and is kept as parameter just to maintain compatibility with the lower power families (STM32L). (+) Exit: Any peripheral interrupt acknowledged by the nested vectored interrupt controller (NVIC) can wake up the device from SLEEP mode. *** STOP mode *** ================= [..] In system STOP mode, all clocks in the 1.2V domain are stopped, the PLL, the HSI, and the HSE RC oscillators are disabled. Internal SRAM and register contents are preserved. The voltage regulator can be configured either in normal or low-power mode. To minimize the consumption in STOP mode, FLASH can be powered off before entering the STOP mode using the HAL_PWREx_EnableFlashPowerDown() function. It can be switched on again by software after exiting the STOP mode using the HAL_PWREx_DisableFlashPowerDown() function. (+) Entry: The STOP mode is entered using the HAL_PWR_EnterSTOPMode(Regulator, STOPEntry) function with: (++) Regulator: (+++) PWR_MAINREGULATOR_ON: Main regulator ON. (+++) PWR_LOWPOWERREGULATOR_ON: Low Power regulator ON. (++) STOPEntry: (+++) PWR_STOPENTRY_WFI: enter STOP mode with WFI instruction. (+++) PWR_STOPENTRY_WFE: enter STOP mode with WFE instruction. (+) Exit: Any EXTI Line (Internal or External) configured in Interrupt/Event mode. *** STANDBY mode *** ==================== [..] (+) The system STANDBY mode allows to achieve the lowest power consumption. It is based on the Cortex-Mx deep SLEEP mode, with the voltage regulator disabled. The system is consequently powered off. The PLL, the HSI oscillator and the HSE oscillator are also switched off. SRAM and register contents are lost except for the RTC registers, RTC backup registers, backup SRAM and standby circuitry. [..] The voltage regulator is OFF. (++) Entry: (+++) The STANDBY mode is entered using the HAL_PWR_EnterSTANDBYMode() function. (++) Exit: (+++) WKUP pin rising or falling edge, RTC alarm (Alarm A and Alarm B), RTC wakeup, tamper event, time stamp event, external reset in NRST pin, IWDG reset. *** Auto-wakeup (AWU) from low-power mode *** ============================================= [..] (+) The MCU can be woken up from low-power mode by an RTC Alarm event, an RTC Wakeup event, a tamper event or a time-stamp event, without depending on an external interrupt (Auto-wakeup mode). (+) RTC auto-wakeup (AWU) from the STOP and STANDBY modes (++) To wake up from the STOP mode with an RTC alarm event, it is necessary to configure the RTC to generate the RTC alarm using the HAL_RTC_SetAlarm_IT() function. (++) To wake up from the STOP mode with an RTC Tamper or time stamp event, it is necessary to configure the RTC to detect the tamper or time stamp event using the HAL_RTCEx_SetTimeStamp_IT() or HAL_RTCEx_SetTamper_IT() functions. (++) To wake up from the STOP mode with an RTC WakeUp event, it is necessary to configure the RTC to generate the RTC WakeUp event using the HAL_RTCEx_SetWakeUpTimer_IT() function.
void HAL_PWR_ConfigPVD | ( | PWR_PVDTypeDef * | sConfigPVD | ) |
Configure the event mode and the voltage threshold detected by the Programmable Voltage Detector(PVD).
sConfigPVD | : Pointer to an PWR_PVDTypeDef structure that contains the configuration information for the PVD. |
None. |
Definition at line 415 of file stm32h7xx_hal_pwr.c.
References __HAL_PWR_PVD_EXTI_DISABLE_EVENT, __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE, __HAL_PWR_PVD_EXTI_DISABLE_IT, __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE, __HAL_PWR_PVD_EXTI_ENABLE_EVENT, __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE, __HAL_PWR_PVD_EXTI_ENABLE_IT, __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE, assert_param, IS_PWR_PVD_LEVEL, IS_PWR_PVD_MODE, PWR_PVDTypeDef::Mode, PVD_FALLING_EDGE, PVD_MODE_EVT, PVD_MODE_IT, PVD_RISING_EDGE, and PWR_PVDTypeDef::PVDLevel.
void HAL_PWR_DisablePVD | ( | void | ) |
Disable the Programmable Voltage Detector (PVD).
None. |
Definition at line 480 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_DisableSEVOnPend | ( | void | ) |
Disable CORTEX SEVONPEND feature.
None. |
Definition at line 776 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_DisableSleepOnExit | ( | void | ) |
Disable Sleep-On-Exit feature when returning from Handler mode to Thread mode.
None |
Definition at line 751 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_DisableWakeUpPin | ( | uint32_t | WakeUpPinx | ) |
Disable the WakeUp PINx functionality.
WakeUpPinx | : Specifies the Power Wake-Up pin to disable. This parameter can be one of the following values:
|
None. |
Definition at line 536 of file stm32h7xx_hal_pwr.c.
References assert_param, and IS_PWR_WAKEUP_PIN.
void HAL_PWR_EnablePVD | ( | void | ) |
Enable the Programmable Voltage Detector (PVD).
None. |
Definition at line 470 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_EnableSEVOnPend | ( | void | ) |
Enable CORTEX SEVONPEND feature.
None. |
Definition at line 764 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_EnableSleepOnExit | ( | void | ) |
Indicate Sleep-On-Exit feature when returning from Handler mode to Thread mode.
None. |
Definition at line 738 of file stm32h7xx_hal_pwr.c.
void HAL_PWR_EnableWakeUpPin | ( | uint32_t | WakeUpPinPolarity | ) |
Enable the WakeUp PINx functionality.
WakeUpPinPolarity | : Specifies which Wake-Up pin to enable. This parameter can be one of the following legacy values, which sets the default (rising edge):
|
None. |
Definition at line 507 of file stm32h7xx_hal_pwr.c.
References assert_param, IS_PWR_WAKEUP_PIN, and PWR_EWUP_MASK.
void HAL_PWR_EnterSLEEPMode | ( | uint32_t | Regulator, |
uint8_t | SLEEPEntry | ||
) |
Enter the current core in SLEEP mode (CSLEEP).
Regulator | : Specifies the regulator state in SLEEP mode. This parameter can be one of the following values:
|
SLEEPEntry | : Specifies if SLEEP mode is entered with WFI or WFE intrinsic instruction. This parameter can be one of the following values:
|
None. |
Definition at line 564 of file stm32h7xx_hal_pwr.c.
References assert_param, IS_PWR_REGULATOR, IS_PWR_SLEEP_ENTRY, and PWR_SLEEPENTRY_WFI.
void HAL_PWR_EnterSTANDBYMode | ( | void | ) |
Enter STANDBY mode.
None. |
Definition at line 686 of file stm32h7xx_hal_pwr.c.
References CM7_CPUID, and HAL_GetCurrentCPUID().
void HAL_PWR_EnterSTOPMode | ( | uint32_t | Regulator, |
uint8_t | STOPEntry | ||
) |
Enter STOP mode.
Regulator | : Specifies the regulator state in STOP mode. This parameter can be one of the following values:
|
STOPEntry | : Specifies if STOP mode in entered with WFI or WFE intrinsic instruction. This parameter can be one of the following values:
|
None. |
Definition at line 615 of file stm32h7xx_hal_pwr.c.
References assert_param, CM7_CPUID, HAL_GetCurrentCPUID(), IS_PWR_REGULATOR, IS_PWR_STOP_ENTRY, and PWR_STOPENTRY_WFI.
void HAL_PWR_PVD_IRQHandler | ( | void | ) |
This function handles the PWR PVD interrupt request.
None. |
Definition at line 805 of file stm32h7xx_hal_pwr.c.
References __HAL_PWR_PVD_EXTI_CLEAR_FLAG, __HAL_PWR_PVD_EXTI_GET_FLAG, CM7_CPUID, HAL_GetCurrentCPUID(), and HAL_PWR_PVDCallback().
void HAL_PWR_PVDCallback | ( | void | ) |
PWR PVD interrupt callback.
None. |
Definition at line 850 of file stm32h7xx_hal_pwr.c.
Referenced by HAL_PWR_PVD_IRQHandler(), and HAL_PWREx_PVD_AVD_IRQHandler().