STM32F103xB HAL User Manual
Data Structures | Defines | Functions
stm32f1xx_hal_pwr.h File Reference

Header file of PWR HAL module. More...

#include "stm32f1xx_hal_def.h"

Go to the source code of this file.

Data Structures

struct  PWR_PVDTypeDef
 PWR PVD configuration structure definition. More...

Defines

#define PWR_EXTI_LINE_PVD   ((uint32_t)0x00010000)
#define PWR_PVDLEVEL_0   PWR_CR_PLS_2V2
#define PWR_PVDLEVEL_1   PWR_CR_PLS_2V3
#define PWR_PVDLEVEL_2   PWR_CR_PLS_2V4
#define PWR_PVDLEVEL_3   PWR_CR_PLS_2V5
#define PWR_PVDLEVEL_4   PWR_CR_PLS_2V6
#define PWR_PVDLEVEL_5   PWR_CR_PLS_2V7
#define PWR_PVDLEVEL_6   PWR_CR_PLS_2V8
#define PWR_PVDLEVEL_7   PWR_CR_PLS_2V9
#define PWR_PVD_MODE_NORMAL   0x00000000U
#define PWR_PVD_MODE_IT_RISING   0x00010001U
#define PWR_PVD_MODE_IT_FALLING   0x00010002U
#define PWR_PVD_MODE_IT_RISING_FALLING   0x00010003U
#define PWR_PVD_MODE_EVENT_RISING   0x00020001U
#define PWR_PVD_MODE_EVENT_FALLING   0x00020002U
#define PWR_PVD_MODE_EVENT_RISING_FALLING   0x00020003U
#define PWR_WAKEUP_PIN1   PWR_CSR_EWUP
#define PWR_MAINREGULATOR_ON   0x00000000U
#define PWR_LOWPOWERREGULATOR_ON   PWR_CR_LPDS
#define PWR_SLEEPENTRY_WFI   ((uint8_t)0x01)
#define PWR_SLEEPENTRY_WFE   ((uint8_t)0x02)
#define PWR_STOPENTRY_WFI   ((uint8_t)0x01)
#define PWR_STOPENTRY_WFE   ((uint8_t)0x02)
#define PWR_FLAG_WU   PWR_CSR_WUF
#define PWR_FLAG_SB   PWR_CSR_SBF
#define PWR_FLAG_PVDO   PWR_CSR_PVDO
#define __HAL_PWR_GET_FLAG(__FLAG__)   ((PWR->CSR & (__FLAG__)) == (__FLAG__))
 Check PWR flag is set or not.
#define __HAL_PWR_CLEAR_FLAG(__FLAG__)   SET_BIT(PWR->CR, ((__FLAG__) << 2))
 Clear the PWR's pending flags.
#define __HAL_PWR_PVD_EXTI_ENABLE_IT()   SET_BIT(EXTI->IMR, PWR_EXTI_LINE_PVD)
 Enable interrupt on PVD Exti Line 16.
#define __HAL_PWR_PVD_EXTI_DISABLE_IT()   CLEAR_BIT(EXTI->IMR, PWR_EXTI_LINE_PVD)
 Disable interrupt on PVD Exti Line 16.
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT()   SET_BIT(EXTI->EMR, PWR_EXTI_LINE_PVD)
 Enable event on PVD Exti Line 16.
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT()   CLEAR_BIT(EXTI->EMR, PWR_EXTI_LINE_PVD)
 Disable event on PVD Exti Line 16.
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
 PVD EXTI line configuration: set falling edge trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Falling Trigger.
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
 PVD EXTI line configuration: set rising edge trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Rising Trigger.
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE()   __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE();
 PVD EXTI line configuration: set rising & falling edge trigger.
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE()   __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE();
 Disable the PVD Extended Interrupt Rising & Falling Trigger.
#define __HAL_PWR_PVD_EXTI_GET_FLAG()   (EXTI->PR & (PWR_EXTI_LINE_PVD))
 Check whether the specified PVD EXTI interrupt flag is set or not.
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG()   (EXTI->PR = (PWR_EXTI_LINE_PVD))
 Clear the PVD EXTI flag.
#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT()   SET_BIT(EXTI->SWIER, PWR_EXTI_LINE_PVD)
 Generate a Software interrupt on selected EXTI line.
#define IS_PWR_PVD_LEVEL(LEVEL)
#define IS_PWR_PVD_MODE(MODE)
#define IS_PWR_WAKEUP_PIN(PIN)   (((PIN) == PWR_WAKEUP_PIN1))
#define IS_PWR_REGULATOR(REGULATOR)
#define IS_PWR_SLEEP_ENTRY(ENTRY)   (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
#define IS_PWR_STOP_ENTRY(ENTRY)   (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))

Functions

void HAL_PWR_DeInit (void)
 Deinitializes the PWR peripheral registers to their default reset values.
void HAL_PWR_EnableBkUpAccess (void)
 Enables access to the backup domain (RTC registers, RTC backup data registers ).
void HAL_PWR_DisableBkUpAccess (void)
 Disables access to the backup domain (RTC registers, RTC backup data registers).
void HAL_PWR_ConfigPVD (PWR_PVDTypeDef *sConfigPVD)
 Configures the voltage threshold detected by the Power Voltage Detector(PVD).
void HAL_PWR_EnablePVD (void)
 Enables the Power Voltage Detector(PVD).
void HAL_PWR_DisablePVD (void)
 Disables the Power Voltage Detector(PVD).
void HAL_PWR_EnableWakeUpPin (uint32_t WakeUpPinx)
 Enables the WakeUp PINx functionality.
void HAL_PWR_DisableWakeUpPin (uint32_t WakeUpPinx)
 Disables the WakeUp PINx functionality.
void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry)
 Enters Stop mode.
void HAL_PWR_EnterSLEEPMode (uint32_t Regulator, uint8_t SLEEPEntry)
 Enters Sleep mode.
void HAL_PWR_EnterSTANDBYMode (void)
 Enters Standby mode.
void HAL_PWR_EnableSleepOnExit (void)
 Indicates Sleep-On-Exit when returning from Handler mode to Thread mode.
void HAL_PWR_DisableSleepOnExit (void)
 Disables Sleep-On-Exit feature when returning from Handler mode to Thread mode.
void HAL_PWR_EnableSEVOnPend (void)
 Enables CORTEX M3 SEVONPEND bit.
void HAL_PWR_DisableSEVOnPend (void)
 Disables CORTEX M3 SEVONPEND bit.
void HAL_PWR_PVD_IRQHandler (void)
 This function handles the PWR PVD interrupt request.
__weak void HAL_PWR_PVDCallback (void)
 PWR PVD interrupt callback.

Detailed Description

Header file of PWR HAL module.

Author:
MCD Application Team
Attention:

© Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32f1xx_hal_pwr.h.