STM32F103xB HAL User Manual
Defines | Functions
stm32f1xx_hal_pwr.c File Reference

PWR HAL module driver. More...

#include "stm32f1xx_hal.h"

Go to the source code of this file.

Defines

#define PVD_MODE_IT   0x00010000U
#define PVD_MODE_EVT   0x00020000U
#define PVD_RISING_EDGE   0x00000001U
#define PVD_FALLING_EDGE   0x00000002U
#define PWR_OFFSET   (PWR_BASE - PERIPH_BASE)
#define PWR_CR_OFFSET   0x00U
#define PWR_CSR_OFFSET   0x04U
#define PWR_CR_OFFSET_BB   (PWR_OFFSET + PWR_CR_OFFSET)
#define PWR_CSR_OFFSET_BB   (PWR_OFFSET + PWR_CSR_OFFSET)
#define LPSDSR_BIT_NUMBER   PWR_CR_LPDS_Pos
#define CR_LPSDSR_BB   ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (LPSDSR_BIT_NUMBER * 4U)))
#define DBP_BIT_NUMBER   PWR_CR_DBP_Pos
#define CR_DBP_BB   ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (DBP_BIT_NUMBER * 4U)))
#define PVDE_BIT_NUMBER   PWR_CR_PVDE_Pos
#define CR_PVDE_BB   ((uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (PVDE_BIT_NUMBER * 4U)))
#define CSR_EWUP_BB(VAL)   ((uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (POSITION_VAL(VAL) * 4U)))

Functions

static void PWR_OverloadWfe (void)
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_EnterSLEEPMode (uint32_t Regulator, uint8_t SLEEPEntry)
 Enters Sleep mode.
void HAL_PWR_EnterSTOPMode (uint32_t Regulator, uint8_t STOPEntry)
 Enters Stop 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

PWR HAL module driver.

Author:
MCD Application Team This file provides firmware functions to manage the following functionalities of the Power Controller (PWR) peripheral: + Initialization/de-initialization functions + Peripheral Control functions
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.c.