STM32H735xx HAL User Manual
|
Low power control functions. More...
Functions | |
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. |
Low power control functions.
=============================================================================== ##### Low power control functions ##### =============================================================================== *** Domains Low Power modes configuration *** ============================================= [..] This section provides the extended low power mode control APIs. The system presents 3 principles domains (D1, D2 and D3) that can be operated in low-power modes (DSTOP or DSTANDBY mode): (+) DSTOP mode to enters a domain to STOP mode: (++) D1 domain and/or D2 domain enters DSTOP mode only when the CPU subsystem is in CSTOP mode and has allocated peripheral in the domain. In DSTOP mode the domain bus matrix clock is stopped. (++) The system enters STOP mode using one of the following scenarios: (+++) D1 domain enters DSTANDBY mode (powered off) and D2, D3 domains enter DSTOP mode. (+++) D2 domain enters DSTANDBY mode (powered off) and D1, D3 domains enter DSTOP mode. (+++) D3 domain enters DSTANDBY mode (powered off) and D1, D2 domains enter DSTOP mode. (+++) D1 and D2 domains enter DSTANDBY mode (powered off) and D3 domain enters DSTOP mode. (+++) D1 and D3 domains enter DSTANDBY mode (powered off) and D2 domain enters DSTOP mode. (+++) D2 and D3 domains enter DSTANDBY mode (powered off) and D1 domain enters DSTOP mode. (+++) D1, D2 and D3 domains enter DSTOP mode. (++) When the system enters STOP mode, the clocks are stopped and the regulator is running in main or low power mode. (++) D3 domain can be kept in Run mode regardless of the CPU status when enter STOP mode by using HAL_PWREx_ConfigD3Domain(D3State) function. (+) DSTANDBY mode to enters a domain to STANDBY mode: (++) The DSTANDBY mode is entered when the PDDS_Dn bit in PWR CPU control register (PWR_CPUCR) for the Dn domain selects Standby mode. (++) The system enters STANDBY mode only when D1, D2 and D3 domains enter DSTANDBY mode. Consequently the VCORE supply regulator is powered off. *** DSTOP mode *** ================== [..] In DStop mode the domain bus matrix clock is stopped. The Flash memory can enter low-power Stop mode when it is enabled through FLPS in PWR_CR1 register. This allows a trade-off between domain DStop restart time and low power consumption. [..] In DStop mode domain peripherals using the LSI or LSE clock and peripherals having a kernel clock request are still able to operate. [..] Before entering DSTOP mode it is recommended to call SCB_CleanDCache function in order to clean the D-Cache and guarantee the data integrity for the SRAM memories. (+) Entry: The DSTOP mode is entered using the HAL_PWREx_EnterSTOPMode(Regulator, STOPEntry, Domain) 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 (++) Domain: (+++) PWR_D1_DOMAIN : Enters D1/CD domain to DSTOP mode. (+++) PWR_D2_DOMAIN : Enters D2 domain to DSTOP mode. (+++) PWR_D3_DOMAIN : Enters D3/SRD domain to DSTOP mode. (+) Exit: Any EXTI Line (Internal or External) configured in Interrupt/Event mode. *** DSTANDBY mode *** ===================== [..] In DStandby mode: (+) The domain bus matrix clock is stopped. (+) The domain is powered down and the domain RAM and register contents are lost. [..] Before entering DSTANDBY mode it is recommended to call SCB_CleanDCache function in order to clean the D-Cache and guarantee the data integrity for the SRAM memories. (+) Entry: The DSTANDBY mode is entered using the HAL_PWREx_EnterSTANDBYMode (Domain) function with: (++) Domain: (+++) PWR_D1_DOMAIN : Enters D1/CD domain to DSTANDBY mode. (+++) PWR_D2_DOMAIN : Enters D2 domain to DSTANDBY mode. (+++) PWR_D3_DOMAIN : Enters D3/SRD domain to DSTANDBY mode. (+) 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. *** Keep D3/SRD in RUN mode *** =============================== [..] D3/SRD domain can be kept in Run mode regardless of the CPU status when entering STOP mode by using HAL_PWREx_ConfigD3Domain(D3State) function with : (+) D3State: (++) PWR_D3_DOMAIN_STOP : D3/SDR domain follows the CPU sub-system mode. (++) PWR_D3_DOMAIN_RUN : D3/SRD domain remains in Run mode regardless of CPU subsystem mode. *** FLASH Power Down configuration **** ======================================= [..] By setting the FLPS bit in the PWR_CR1 register using the HAL_PWREx_EnableFlashPowerDown() function, the Flash memory also enters power down mode when the device enters STOP mode. When the Flash memory is in power down mode, an additional startup delay is incurred when waking up from STOP mode. *** Wakeup Pins configuration **** =================================== [..] Wakeup pins allow the system to exit from Standby mode. The configuration of wakeup pins is done with the HAL_PWREx_EnableWakeUpPin(sPinParams) function with: (+) sPinParams: structure to enable and configure a wakeup pin: (++) WakeUpPin: Wakeup pin to be enabled. (++) PinPolarity: Wakeup pin polarity (rising or falling edge). (++) PinPull: Wakeup pin pull (no pull, pull-up or pull-down). [..] The wakeup pins are internally connected to the EXTI lines [55-60] to generate an interrupt if enabled. The EXTI lines configuration is done by the HAL_EXTI_Dx_EventInputConfig() functions defined in the stm32h7xxhal.c file. [..] When a wakeup pin event is received the HAL_PWREx_WAKEUP_PIN_IRQHandler is called and the appropriate flag is set in the PWR_WKUPFR register. Then in the HAL_PWREx_WAKEUP_PIN_IRQHandler function the wakeup pin flag will be cleared and the appropriate user callback will be called. The user can add his own code by customization of function pointer HAL_PWREx_WKUPx_Callback.
void HAL_PWREx_ClearPendingEvent | ( | void | ) |
Clear pending event.
None. |
Definition at line 939 of file stm32h7xx_hal_pwr_ex.c.
References CM7_CPUID, and HAL_GetCurrentCPUID().
HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag | ( | uint32_t | WakeUpFlag | ) |
Clear the Wake-Up pin pending flag.
WakeUpFlag,: | Specifies the Wake-Up PIN flag to clear. This parameter can be one of the following values:
|
HAL | status. |
Definition at line 1394 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, and IS_PWR_WAKEUP_FLAG.
void HAL_PWREx_ConfigD3Domain | ( | uint32_t | D3State | ) |
Configure the D3/SRD Domain state when the System in low power mode.
D3State | : Specifies the D3/SRD state. This parameter can be one of the following values :
|
None |
Definition at line 1081 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, and IS_D3_STATE.
void HAL_PWREx_DisableFlashPowerDown | ( | void | ) |
Disable the Flash Power Down in Stop mode.
None. |
Definition at line 1226 of file stm32h7xx_hal_pwr_ex.c.
void HAL_PWREx_DisableWakeUpPin | ( | uint32_t | WakeUpPin | ) |
Disable the Wake-up PINx functionality.
WakeUpPin | : Specifies the Wake-Up pin to be disabled. This parameter can be one of the following values:
|
None |
Definition at line 1344 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, and IS_PWR_WAKEUP_PIN.
void HAL_PWREx_EnableFlashPowerDown | ( | void | ) |
Enable the Flash Power Down in Stop mode.
None. |
Definition at line 1212 of file stm32h7xx_hal_pwr_ex.c.
void HAL_PWREx_EnableWakeUpPin | ( | PWREx_WakeupPinTypeDef * | sPinParams | ) |
Enable the Wake-up PINx functionality.
sPinParams | : Pointer to a PWREx_WakeupPinTypeDef structure that contains the configuration information for the wake-up Pin. |
None. |
Definition at line 1302 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, IS_PWR_WAKEUP_PIN, IS_PWR_WAKEUP_PIN_POLARITY, IS_PWR_WAKEUP_PIN_PULL, PWREx_WakeupPinTypeDef::PinPolarity, PWREx_WakeupPinTypeDef::PinPull, PWR_EXTI_WAKEUP_PINS_MASK, PWR_WAKEUP_PINS_PULL_SHIFT_OFFSET, and PWREx_WakeupPinTypeDef::WakeUpPin.
void HAL_PWREx_EnterSTANDBYMode | ( | uint32_t | Domain | ) |
Enter a Domain to DSTANDBY mode.
Domain | : Specifies the Domain to enter to STANDBY mode. This parameter can be one of the following values:
|
None |
Definition at line 986 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, CM7_CPUID, HAL_GetCurrentCPUID(), IS_PWR_DOMAIN, PWR_D1_DOMAIN, and PWR_D2_DOMAIN.
void HAL_PWREx_EnterSTOPMode | ( | uint32_t | Regulator, |
uint8_t | STOPEntry, | ||
uint32_t | Domain | ||
) |
Enter a Domain to DSTOP 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:
|
Domain | : Specifies the Domain to enter in DSTOP mode. This parameter can be one of the following values:
|
None. |
Definition at line 816 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, CM7_CPUID, HAL_GetCurrentCPUID(), IS_PWR_DOMAIN, IS_PWR_REGULATOR, IS_PWR_STOP_ENTRY, PWR_D1_DOMAIN, PWR_D2_DOMAIN, and PWR_STOPENTRY_WFI.
uint32_t HAL_PWREx_GetWakeupFlag | ( | uint32_t | WakeUpFlag | ) |
Get the Wake-Up Pin pending flags.
WakeUpFlag | : Specifies the Wake-Up PIN flag to be checked. This parameter can be one of the following values:
|
The | Wake-Up pin flag. |
Definition at line 1369 of file stm32h7xx_hal_pwr_ex.c.
References assert_param, and IS_PWR_WAKEUP_FLAG.
void HAL_PWREx_WAKEUP_PIN_IRQHandler | ( | void | ) |
This function handles the PWR WAKEUP PIN interrupt request.
None. |
Definition at line 1416 of file stm32h7xx_hal_pwr_ex.c.
References __HAL_PWR_CLEAR_WAKEUPFLAG, HAL_PWREx_WKUP1_Callback(), HAL_PWREx_WKUP2_Callback(), HAL_PWREx_WKUP4_Callback(), HAL_PWREx_WKUP6_Callback(), PWR_FLAG_WKUP1, PWR_FLAG_WKUP2, PWR_FLAG_WKUP3, PWR_FLAG_WKUP4, PWR_FLAG_WKUP5, and PWR_FLAG_WKUP6.
void HAL_PWREx_WKUP1_Callback | ( | void | ) |
PWR WKUP1 interrupt callback.
None. |
Definition at line 1477 of file stm32h7xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_WAKEUP_PIN_IRQHandler().
void HAL_PWREx_WKUP2_Callback | ( | void | ) |
PWR WKUP2 interrupt callback.
None. |
Definition at line 1488 of file stm32h7xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_WAKEUP_PIN_IRQHandler().
void HAL_PWREx_WKUP4_Callback | ( | void | ) |
PWR WKUP4 interrupt callback.
None. |
Definition at line 1512 of file stm32h7xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_WAKEUP_PIN_IRQHandler().
void HAL_PWREx_WKUP6_Callback | ( | void | ) |
PWR WKUP6 interrupt callback.
None. |
Definition at line 1536 of file stm32h7xx_hal_pwr_ex.c.
Referenced by HAL_PWREx_WAKEUP_PIN_IRQHandler().