39 #include "stm32f4xx_rcc.h" 53 #define PWR_OFFSET (PWR_BASE - PERIPH_BASE) 58 #define CR_OFFSET (PWR_OFFSET + 0x00) 59 #define DBP_BitNumber 0x08 60 #define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4)) 63 #define PVDE_BitNumber 0x04 64 #define CR_PVDE_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PVDE_BitNumber * 4)) 67 #define FPDS_BitNumber 0x09 68 #define CR_FPDS_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (FPDS_BitNumber * 4)) 71 #define PMODE_BitNumber 0x0E 72 #define CR_PMODE_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PMODE_BitNumber * 4)) 78 #define CSR_OFFSET (PWR_OFFSET + 0x04) 79 #define EWUP_BitNumber 0x08 80 #define CSR_EWUP_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (EWUP_BitNumber * 4)) 83 #define BRE_BitNumber 0x09 84 #define CSR_BRE_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (BRE_BitNumber * 4)) 89 #define CR_DS_MASK ((uint32_t)0xFFFFFFFC) 90 #define CR_PLS_MASK ((uint32_t)0xFFFFFF1F) 91 #define CR_VOS_MASK ((uint32_t)0xFFFF3FFF) 203 tmpreg |= PWR_PVDLevel;
345 tmpreg |= PWR_Regulator_Voltage;
536 tmpreg |= PWR_Regulator;
582 #if defined ( __CC_ARM ) 634 if ((
PWR->CSR & PWR_FLAG) != (uint32_t)
RESET)
659 PWR->CR |= PWR_FLAG << 2;
#define SCB_SCR_SLEEPDEEP_Msk
#define IS_PWR_CLEAR_FLAG(FLAG)
void PWR_EnterSTANDBYMode(void)
Enters STANDBY mode.
void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel)
Configures the voltage threshold detected by the Power Voltage Detector(PVD).
void PWR_BackupRegulatorCmd(FunctionalState NewState)
Enables or disables the Backup Regulator.
This file contains all the functions prototypes for the PWR firmware library.
void assert_param(int val)
void PWR_ClearFlag(uint32_t PWR_FLAG)
Clears the PWR's pending flags.
#define IS_PWR_PVD_LEVEL(LEVEL)
#define IS_FUNCTIONAL_STATE(STATE)
#define IS_PWR_STOP_ENTRY(ENTRY)
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
Forces or releases Low Speed APB (APB1) peripheral reset.
void PWR_BackupAccessCmd(FunctionalState NewState)
Enables or disables access to the backup domain (RTC registers, RTC backup data registers and backup ...
#define RCC_APB1Periph_PWR
FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG)
Checks whether the specified PWR flag is set or not.
#define IS_PWR_REGULATOR_VOLTAGE(VOLTAGE)
void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
Enters STOP mode.
void PWR_PVDCmd(FunctionalState NewState)
Enables or disables the Power Voltage Detector(PVD).
void PWR_FlashPowerDownCmd(FunctionalState NewState)
Enables or disables the Flash Power Down in STOP mode.
void PWR_MainRegulatorModeConfig(uint32_t PWR_Regulator_Voltage)
Configures the main internal regulator output voltage.
void PWR_DeInit(void)
Deinitializes the PWR peripheral registers to their default reset values.
void PWR_WakeUpPinCmd(FunctionalState NewState)
Enables or disables the WakeUp Pin functionality.
#define IS_PWR_REGULATOR(REGULATOR)
#define PWR_STOPEntry_WFI
#define IS_PWR_GET_FLAG(FLAG)