Go to the documentation of this file.
21 #ifndef __STM32F7xx_HAL_PWR_EX_H
22 #define __STM32F7xx_HAL_PWR_EX_H
47 #define PWR_WAKEUP_PIN1 PWR_CSR2_EWUP1
48 #define PWR_WAKEUP_PIN2 PWR_CSR2_EWUP2
49 #define PWR_WAKEUP_PIN3 PWR_CSR2_EWUP3
50 #define PWR_WAKEUP_PIN4 PWR_CSR2_EWUP4
51 #define PWR_WAKEUP_PIN5 PWR_CSR2_EWUP5
52 #define PWR_WAKEUP_PIN6 PWR_CSR2_EWUP6
53 #define PWR_WAKEUP_PIN1_HIGH PWR_CSR2_EWUP1
54 #define PWR_WAKEUP_PIN2_HIGH PWR_CSR2_EWUP2
55 #define PWR_WAKEUP_PIN3_HIGH PWR_CSR2_EWUP3
56 #define PWR_WAKEUP_PIN4_HIGH PWR_CSR2_EWUP4
57 #define PWR_WAKEUP_PIN5_HIGH PWR_CSR2_EWUP5
58 #define PWR_WAKEUP_PIN6_HIGH PWR_CSR2_EWUP6
59 #define PWR_WAKEUP_PIN1_LOW (uint32_t)((PWR_CR2_WUPP1<<6) | PWR_CSR2_EWUP1)
60 #define PWR_WAKEUP_PIN2_LOW (uint32_t)((PWR_CR2_WUPP2<<6) | PWR_CSR2_EWUP2)
61 #define PWR_WAKEUP_PIN3_LOW (uint32_t)((PWR_CR2_WUPP3<<6) | PWR_CSR2_EWUP3)
62 #define PWR_WAKEUP_PIN4_LOW (uint32_t)((PWR_CR2_WUPP4<<6) | PWR_CSR2_EWUP4)
63 #define PWR_WAKEUP_PIN5_LOW (uint32_t)((PWR_CR2_WUPP5<<6) | PWR_CSR2_EWUP5)
64 #define PWR_WAKEUP_PIN6_LOW (uint32_t)((PWR_CR2_WUPP6<<6) | PWR_CSR2_EWUP6)
73 #define PWR_MAINREGULATOR_UNDERDRIVE_ON PWR_CR1_MRUDS
74 #define PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON ((uint32_t)(PWR_CR1_LPDS | PWR_CR1_LPUDS))
82 #define PWR_FLAG_ODRDY PWR_CSR1_ODRDY
83 #define PWR_FLAG_ODSWRDY PWR_CSR1_ODSWRDY
84 #define PWR_FLAG_UDRDY PWR_CSR1_UDRDY
92 #define PWR_WAKEUP_PIN_FLAG1 PWR_CSR2_WUPF1
93 #define PWR_WAKEUP_PIN_FLAG2 PWR_CSR2_WUPF2
94 #define PWR_WAKEUP_PIN_FLAG3 PWR_CSR2_WUPF3
95 #define PWR_WAKEUP_PIN_FLAG4 PWR_CSR2_WUPF4
96 #define PWR_WAKEUP_PIN_FLAG5 PWR_CSR2_WUPF5
97 #define PWR_WAKEUP_PIN_FLAG6 PWR_CSR2_WUPF6
112 #define __HAL_PWR_OVERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODEN)
113 #define __HAL_PWR_OVERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODEN))
117 #define __HAL_PWR_OVERDRIVESWITCHING_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODSWEN)
118 #define __HAL_PWR_OVERDRIVESWITCHING_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODSWEN))
130 #define __HAL_PWR_UNDERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_UDEN)
131 #define __HAL_PWR_UNDERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_UDEN))
144 #define __HAL_PWR_GET_ODRUDR_FLAG(__FLAG__) ((PWR->CSR1 & (__FLAG__)) == (__FLAG__))
148 #define __HAL_PWR_CLEAR_ODRUDR_FLAG() (PWR->CSR1 |= PWR_FLAG_UDRDY)
160 #define __HAL_PWR_GET_WAKEUP_FLAG(__WUFLAG__) (PWR->CSR2 & (__WUFLAG__))
172 #define __HAL_PWR_CLEAR_WAKEUP_FLAG(__WUFLAG__) (PWR->CR2 |= (__WUFLAG__))
219 #define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_UNDERDRIVE_ON) || \
220 ((REGULATOR) == PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON))
221 #define IS_PWR_WAKEUP_PIN(__PIN__) (((__PIN__) == PWR_WAKEUP_PIN1) || \
222 ((__PIN__) == PWR_WAKEUP_PIN2) || \
223 ((__PIN__) == PWR_WAKEUP_PIN3) || \
224 ((__PIN__) == PWR_WAKEUP_PIN4) || \
225 ((__PIN__) == PWR_WAKEUP_PIN5) || \
226 ((__PIN__) == PWR_WAKEUP_PIN6) || \
227 ((__PIN__) == PWR_WAKEUP_PIN1_HIGH) || \
228 ((__PIN__) == PWR_WAKEUP_PIN2_HIGH) || \
229 ((__PIN__) == PWR_WAKEUP_PIN3_HIGH) || \
230 ((__PIN__) == PWR_WAKEUP_PIN4_HIGH) || \
231 ((__PIN__) == PWR_WAKEUP_PIN5_HIGH) || \
232 ((__PIN__) == PWR_WAKEUP_PIN6_HIGH) || \
233 ((__PIN__) == PWR_WAKEUP_PIN1_LOW) || \
234 ((__PIN__) == PWR_WAKEUP_PIN2_LOW) || \
235 ((__PIN__) == PWR_WAKEUP_PIN3_LOW) || \
236 ((__PIN__) == PWR_WAKEUP_PIN4_LOW) || \
237 ((__PIN__) == PWR_WAKEUP_PIN5_LOW) || \
238 ((__PIN__) == PWR_WAKEUP_PIN6_LOW))
HAL_StatusTypeDef
HAL Status structures definition
HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void)
HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void)
void HAL_PWREx_EnableLowRegulatorLowVoltage(void)
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)
void HAL_PWREx_DisableFlashPowerDown(void)
void HAL_PWREx_DisableMainRegulatorLowVoltage(void)
This file contains HAL common defines, enumeration, macros and structures definitions.
uint32_t HAL_PWREx_GetVoltageRange(void)
void HAL_PWREx_DisableLowRegulatorLowVoltage(void)
void HAL_PWREx_EnableMainRegulatorLowVoltage(void)
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)