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_bkp.c File Reference

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

#include "stm32f10x_bkp.h"
#include "stm32f10x_rcc.h"

Macros

#define BKP_OFFSET   (BKP_BASE - PERIPH_BASE)
 
#define CR_OFFSET   (BKP_OFFSET + 0x30)
 
#define TPAL_BitNumber   0x01
 
#define CR_TPAL_BB   (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TPAL_BitNumber * 4))
 
#define TPE_BitNumber   0x00
 
#define CR_TPE_BB   (PERIPH_BB_BASE + (CR_OFFSET * 32) + (TPE_BitNumber * 4))
 
#define CSR_OFFSET   (BKP_OFFSET + 0x34)
 
#define TPIE_BitNumber   0x02
 
#define CSR_TPIE_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TPIE_BitNumber * 4))
 
#define TIF_BitNumber   0x09
 
#define CSR_TIF_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TIF_BitNumber * 4))
 
#define TEF_BitNumber   0x08
 
#define CSR_TEF_BB   (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (TEF_BitNumber * 4))
 
#define RTCCR_CAL_Mask   ((uint16_t)0xFF80)
 
#define RTCCR_Mask   ((uint16_t)0xFC7F)
 
#define CSR_CTE_Set   ((uint16_t)0x0001)
 
#define CSR_CTI_Set   ((uint16_t)0x0002)
 

Functions

void BKP_DeInit (void)
 Deinitializes the BKP peripheral registers to their default reset values. More...
 
void BKP_TamperPinLevelConfig (uint16_t BKP_TamperPinLevel)
 Configures the Tamper Pin active level. More...
 
void BKP_TamperPinCmd (FunctionalState NewState)
 Enables or disables the Tamper Pin activation. More...
 
void BKP_ITConfig (FunctionalState NewState)
 Enables or disables the Tamper Pin Interrupt. More...
 
void BKP_RTCOutputConfig (uint16_t BKP_RTCOutputSource)
 Select the RTC output source to output on the Tamper pin. More...
 
void BKP_SetRTCCalibrationValue (uint8_t CalibrationValue)
 Sets RTC Clock Calibration value. More...
 
void BKP_WriteBackupRegister (uint16_t BKP_DR, uint16_t Data)
 Writes user data to the specified Data Backup Register. More...
 
uint16_t BKP_ReadBackupRegister (uint16_t BKP_DR)
 Reads data from the specified Data Backup Register. More...
 
FlagStatus BKP_GetFlagStatus (void)
 Checks whether the Tamper Pin Event flag is set or not. More...
 
void BKP_ClearFlag (void)
 Clears Tamper Pin Event pending flag. More...
 
ITStatus BKP_GetITStatus (void)
 Checks whether the Tamper Pin Interrupt has occurred or not. More...
 
void BKP_ClearITPendingBit (void)
 Clears Tamper Pin Interrupt pending bit. More...
 

Detailed Description

This file provides all the BKP 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