Go to the documentation of this file.
25 #include "stm32f4xx_hal.h"
36 #ifdef HAL_PWR_MODULE_ENABLED
43 #define PWR_OVERDRIVE_TIMEOUT_VALUE 1000U
44 #define PWR_UDERDRIVE_TIMEOUT_VALUE 1000U
45 #define PWR_BKPREG_TIMEOUT_VALUE 1000U
46 #define PWR_VOSRDY_TIMEOUT_VALUE 1000U
145 uint32_t tickstart = 0U;
155 if((
HAL_GetTick() - tickstart ) > PWR_BKPREG_TIMEOUT_VALUE)
169 uint32_t tickstart = 0U;
179 if((
HAL_GetTick() - tickstart ) > PWR_BKPREG_TIMEOUT_VALUE)
218 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx)
236 uint32_t tickstart = 0U;
250 if((
HAL_GetTick() - tickstart ) > PWR_VOSRDY_TIMEOUT_VALUE)
259 #elif defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
260 defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
261 defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F469xx) || \
262 defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || \
263 defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
292 uint32_t tickstart = 0U;
337 if((
HAL_GetTick() - tickstart ) > PWR_VOSRDY_TIMEOUT_VALUE)
352 #if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) ||\
353 defined(STM32F411xE) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) ||\
354 defined(STM32F413xx) || defined(STM32F423xx)
402 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) ||\
403 defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
417 uint32_t tickstart = 0U;
429 if((
HAL_GetTick() - tickstart) > PWR_OVERDRIVE_TIMEOUT_VALUE)
443 if((
HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)
464 uint32_t tickstart = 0U;
476 if((
HAL_GetTick() - tickstart) > PWR_OVERDRIVE_TIMEOUT_VALUE)
490 if((
HAL_GetTick() - tickstart) > PWR_OVERDRIVE_TIMEOUT_VALUE)
540 uint32_t tmpreg1 = 0U;
561 tmpreg1 |= Regulator;
#define assert_param(expr)
Include module's header file.
#define __HAL_PWR_GET_FLAG(__FLAG__)
Check PWR flag is set or not.
HAL_StatusTypeDef
HAL Status structures definition
HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void)
#define __HAL_PWR_OVERDRIVE_DISABLE()
HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void)
#define PLL_TIMEOUT_VALUE
void HAL_PWREx_EnableLowRegulatorLowVoltage(void)
#define __HAL_PWR_OVERDRIVESWITCHING_ENABLE()
Macros to enable or disable the Over drive switching.
#define IS_PWR_VOLTAGE_SCALING_RANGE(VOLTAGE)
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
#define IS_PWR_STOP_ENTRY(ENTRY)
#define PWR_SLEEPENTRY_WFI
#define __HAL_RCC_PLL_DISABLE()
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void)
HAL_StatusTypeDef HAL_PWREx_DisableOverDrive(void)
HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
void HAL_PWREx_EnableFlashPowerDown(void)
#define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR)
#define __HAL_RCC_PWR_CLK_ENABLE()
#define __HAL_RCC_PLL_ENABLE()
Macros to enable or disable the main PLL.
void HAL_PWREx_DisableFlashPowerDown(void)
#define __HAL_PWR_CLEAR_ODRUDR_FLAG()
Clear the Under-Drive Ready flag.
void HAL_PWREx_DisableMainRegulatorLowVoltage(void)
#define __HAL_RCC_GET_FLAG(__FLAG__)
uint32_t HAL_PWREx_GetVoltageRange(void)
void HAL_PWREx_DisableLowRegulatorLowVoltage(void)
#define __HAL_PWR_UNDERDRIVE_ENABLE()
Macros to enable or disable the Under drive mode.
#define __HAL_PWR_OVERDRIVESWITCHING_DISABLE()
#define __HAL_PWR_OVERDRIVE_ENABLE()
Macros to enable or disable the Over drive mode.
#define __HAL_RCC_GET_SYSCLK_SOURCE()
Macro to get the clock source used as system clock.
void HAL_PWREx_EnableMainRegulatorLowVoltage(void)
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)
#define __WFE
Wait For Event.
#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__)
macros configure the main internal regulator output voltage.
#define __WFI
Wait For Interrupt.
#define SCB_SCR_SLEEPDEEP_Msk