STM32F10x Standard Peripherals Library  3.5.0
/opt/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c File Reference

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

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

Go to the source code of this file.

Defines

#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)

Functions

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

Detailed Description

This file provides all the BKP firmware functions.

Author:
MCD Application Team
Version:
V3.5.0
Date:
11-March-2011
Attention:

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 2011 STMicroelectronics

Definition in file stm32f10x_bkp.c.