STM32F1 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F1 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Groups
stm32f10x_pwr.c File Reference

This file provides all the PWR firmware functions. More...

#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"

Macros

#define PWR_OFFSET   (PWR_BASE - PERIPH_BASE)
 
#define CR_OFFSET   (PWR_OFFSET + 0x00)
 
#define DBP_BitNumber   0x08
 
#define CR_DBP_BB   (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))
 
#define PVDE_BitNumber   0x04
 
#define CR_PVDE_BB   (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PVDE_BitNumber * 4))
 
#define CSR_OFFSET   (PWR_OFFSET + 0x04)
 
#define EWUP_BitNumber   0x08
 
#define CSR_EWUP_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (EWUP_BitNumber * 4))
 
#define CR_PDDS_Set   ((uint32_t)0x00000002)
 
#define CR_DS_Mask   ((uint32_t)0xFFFFFFFC)
 
#define CR_CWUF_Set   ((uint32_t)0x00000004)
 
#define CR_PLS_Mask   ((uint32_t)0xFFFFFF1F)
 
#define SCB_SysCtrl   ((uint32_t)0xE000ED10)
 
#define SysCtrl_SLEEPDEEP_Set   ((uint32_t)0x00000004)
 
#define SysCtrl_SLEEPDEEP_Reset   ((uint32_t)0xFFFFFFFB)
 

Functions

void PWR_DeInit (void)
 Deinitializes the PWR peripheral registers to their default reset values. More...
 
void PWR_BackupAccessCmd (FunctionalState NewState)
 Enables or disables access to the RTC and backup registers. More...
 
void PWR_PVDCmd (FunctionalState NewState)
 Enables or disables the Power Voltage Detector(PVD). More...
 
void PWR_PVDLevelConfig (uint32_t PWR_PVDLevel)
 Configures the voltage threshold detected by the Power Voltage Detector(PVD). More...
 
void PWR_WakeUpPinCmd (FunctionalState NewState)
 Enables or disables the WakeUp Pin functionality. More...
 
void PWR_EnterSTOPMode (uint32_t PWR_Regulator, uint8_t PWR_STOPEntry)
 Enters STOP mode. More...
 
void PWR_EnterSTANDBYMode (void)
 Enters STANDBY mode. More...
 
FlagStatus PWR_GetFlagStatus (uint32_t PWR_FLAG)
 Checks whether the specified PWR flag is set or not. More...
 
void PWR_ClearFlag (uint32_t PWR_FLAG)
 Clears the PWR's pending flags. More...
 

Detailed Description

This file provides all the PWR firmware functions.

Author
MCD Application Team
Version
V3.3.0
Date
04/16/2010

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2010 STMicroelectronics