STM32L486xx HAL User Manual
Defines
PWR Exported Macros
PWR

Defines

#define __HAL_PWR_GET_FLAG(__FLAG__)
 Check whether or not a specific PWR flag is set.
#define __HAL_PWR_CLEAR_FLAG(__FLAG__)
 Clear a specific PWR flag.
#define __HAL_PWR_PVD_EXTI_ENABLE_IT()   SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
 Enable the PVD Extended Interrupt Line.
#define __HAL_PWR_PVD_EXTI_DISABLE_IT()   CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Line.
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT()   SET_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
 Enable the PVD Event Line.
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT()   CLEAR_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)
 Disable the PVD Event Line.
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
 Enable the PVD Extended Interrupt Rising Trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Rising Trigger.
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
 Enable the PVD Extended Interrupt Falling Trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Falling Trigger.
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE()
 Enable the PVD Extended Interrupt Rising & Falling Trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable the PVD Extended Interrupt Rising & Falling Trigger.
#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT()   SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_PVD)
 Generate a Software interrupt on selected EXTI line.
#define __HAL_PWR_PVD_EXTI_GET_FLAG()   (EXTI->PR1 & PWR_EXTI_LINE_PVD)
 Check whether or not the PVD EXTI interrupt flag is set.
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG()   WRITE_REG(EXTI->PR1, PWR_EXTI_LINE_PVD)
 Clear the PVD EXTI interrupt flag.

Define Documentation

#define __HAL_PWR_CLEAR_FLAG (   __FLAG__)
Value:
( (((uint8_t)(__FLAG__)) == PWR_FLAG_WU) ?\
                                         (PWR->SCR  = (__FLAG__)) :\
                                         (PWR->SCR = (1U << ((__FLAG__) & 31U))) )

Clear a specific PWR flag.

Parameters:
__FLAG__,:specifies the flag to clear. This parameter can be one of the following values:
  • PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event was received from the WKUP pin 1.
  • PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event was received from the WKUP pin 2.
  • PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event was received from the WKUP pin 3.
  • PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event was received from the WKUP pin 4.
  • PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event was received from the WKUP pin 5.
  • PWR_FLAG_WU Encompasses all five Wake Up Flags.
  • PWR_FLAG_SB Standby Flag. Indicates that the system entered Standby mode.
Return values:
None

Definition at line 230 of file stm32l4xx_hal_pwr.h.

#define __HAL_PWR_GET_FLAG (   __FLAG__)
Value:
( ((((uint8_t)(__FLAG__)) >> 5U) == 1)  ?\
                                      (PWR->SR1 & (1U << ((__FLAG__) & 31U))) :\
                                      (PWR->SR2 & (1U << ((__FLAG__) & 31U))) )

Check whether or not a specific PWR flag is set.

Parameters:
__FLAG__,:specifies the flag to check. This parameter can be one of the following values:
  • PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event was received from the WKUP pin 1.
  • PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event was received from the WKUP pin 2.
  • PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event was received from the WKUP pin 3.
  • PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event was received from the WKUP pin 4.
  • PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event was received from the WKUP pin 5.
  • PWR_FLAG_SB StandBy Flag. Indicates that the system entered StandBy mode.
  • PWR_FLAG_WUFI Wake-Up Flag Internal. Set when a wakeup is detected on the internal wakeup line.
  • PWR_FLAG_REGLPS Low Power Regulator Started. Indicates whether or not the low-power regulator is ready.
  • PWR_FLAG_REGLPF Low Power Regulator Flag. Indicates whether the regulator is ready in main mode or is in low-power mode.
  • PWR_FLAG_VOSF Voltage Scaling Flag. Indicates whether the regulator is ready in the selected voltage range or is still changing to the required voltage level.
  • PWR_FLAG_PVDO Power Voltage Detector Output. Indicates whether VDD voltage is below or above the selected PVD threshold.
  • PWR_FLAG_PVMO1 Peripheral Voltage Monitoring Output 1. Indicates whether VDDUSB voltage is is below or above PVM1 threshold (applicable when USB feature is supported).
  • PWR_FLAG_PVMO2 Peripheral Voltage Monitoring Output 2. Indicates whether VDDIO2 voltage is is below or above PVM2 threshold (applicable when VDDIO2 is present on device).
  • PWR_FLAG_PVMO3 Peripheral Voltage Monitoring Output 3. Indicates whether VDDA voltage is is below or above PVM3 threshold.
  • PWR_FLAG_PVMO4 Peripheral Voltage Monitoring Output 4. Indicates whether VDDA voltage is is below or above PVM4 threshold.
Return values:
Thenew state of __FLAG__ (TRUE or FALSE).

Definition at line 208 of file stm32l4xx_hal_pwr.h.

#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG ( )    WRITE_REG(EXTI->PR1, PWR_EXTI_LINE_PVD)

Clear the PVD EXTI interrupt flag.

Return values:
None

Definition at line 319 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().

#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT ( )    CLEAR_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)

Disable the PVD Event Line.

Return values:
None

Definition at line 255 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE ( )    CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)

Disable the PVD Extended Interrupt Falling Trigger.

Return values:
None

Definition at line 280 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_DISABLE_IT ( )    CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)

Disable the PVD Extended Interrupt Line.

Return values:
None

Definition at line 243 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE ( )    CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)

Disable the PVD Extended Interrupt Rising Trigger.

Return values:
None

Definition at line 267 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

Value:
do {                                                    \
    __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();             \
    __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE();            \
  } while(0)

Disable the PVD Extended Interrupt Rising & Falling Trigger.

Return values:
None

Definition at line 297 of file stm32l4xx_hal_pwr.h.

#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT ( )    SET_BIT(EXTI->EMR1, PWR_EVENT_LINE_PVD)

Enable the PVD Event Line.

Return values:
None

Definition at line 249 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE ( )    SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_PVD)

Enable the PVD Extended Interrupt Falling Trigger.

Return values:
None

Definition at line 273 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_ENABLE_IT ( )    SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_PVD)

Enable the PVD Extended Interrupt Line.

Return values:
None

Definition at line 237 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE ( )    SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_PVD)

Enable the PVD Extended Interrupt Rising Trigger.

Return values:
None

Definition at line 261 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWR_ConfigPVD().

Value:
do {                                                   \
    __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE();             \
    __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE();            \
  } while(0)

Enable the PVD Extended Interrupt Rising & Falling Trigger.

Return values:
None

Definition at line 287 of file stm32l4xx_hal_pwr.h.

#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT ( )    SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_PVD)

Generate a Software interrupt on selected EXTI line.

Return values:
None

Definition at line 307 of file stm32l4xx_hal_pwr.h.

#define __HAL_PWR_PVD_EXTI_GET_FLAG ( )    (EXTI->PR1 & PWR_EXTI_LINE_PVD)

Check whether or not the PVD EXTI interrupt flag is set.

Return values:
EXTIPVD Line Status.

Definition at line 313 of file stm32l4xx_hal_pwr.h.

Referenced by HAL_PWREx_PVD_PVM_IRQHandler().