BKP_Private_Functions
[BKP]

Functions

void BKP_ClearFlag (void)
 Clears Tamper Pin Event pending flag.
void BKP_ClearITPendingBit (void)
 Clears Tamper Pin Interrupt pending bit.
void BKP_DeInit (void)
 Deinitializes the BKP peripheral registers to their default reset values.
FlagStatus BKP_GetFlagStatus (void)
 Checks whether the Tamper Pin Event flag is set or not.
ITStatus BKP_GetITStatus (void)
 Checks whether the Tamper Pin Interrupt has occurred or not.
void BKP_ITConfig (FunctionalState NewState)
 Enables or disables the Tamper Pin Interrupt.
uint16_t BKP_ReadBackupRegister (uint16_t BKP_DR)
 Reads data from the specified Data Backup Register.
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_TamperPinCmd (FunctionalState NewState)
 Enables or disables the Tamper Pin activation.
void BKP_TamperPinLevelConfig (uint16_t BKP_TamperPinLevel)
 Configures the Tamper Pin active level.
void BKP_WriteBackupRegister (uint16_t BKP_DR, uint16_t Data)
 Writes user data to the specified Data Backup Register.

Function Documentation

void BKP_ClearFlag ( void   ) 

Clears Tamper Pin Event pending flag.

Parameters:
None 
Return values:
None 

Definition at line 268 of file stm32f10x_bkp.c.

References BKP, and BKP_CSR_CTE.

Referenced by main(), and TAMPER_IRQHandler().

void BKP_ClearITPendingBit ( void   ) 

Clears Tamper Pin Interrupt pending bit.

Parameters:
None 
Return values:
None 

Definition at line 289 of file stm32f10x_bkp.c.

References BKP, and BKP_CSR_CTI.

Referenced by TAMPER_IRQHandler().

void BKP_DeInit ( void   ) 

Deinitializes the BKP peripheral registers to their default reset values.

Parameters:
None 
Return values:
None 

Definition at line 119 of file stm32f10x_bkp.c.

References DISABLE, ENABLE, and RCC_BackupResetCmd().

Referenced by RTC_Configuration().

FlagStatus BKP_GetFlagStatus ( void   ) 

Checks whether the Tamper Pin Event flag is set or not.

Parameters:
None 
Return values:
The new state of the Tamper Pin Event flag (SET or RESET).

Definition at line 258 of file stm32f10x_bkp.c.

References CSR_TEF_BB.

ITStatus BKP_GetITStatus ( void   ) 

Checks whether the Tamper Pin Interrupt has occurred or not.

Parameters:
None 
Return values:
The new state of the Tamper Pin Interrupt (SET or RESET).

Definition at line 279 of file stm32f10x_bkp.c.

References CSR_TIF_BB.

Referenced by TAMPER_IRQHandler().

void BKP_ITConfig ( FunctionalState  NewState  ) 

Enables or disables the Tamper Pin Interrupt.

Parameters:
NewState,: new state of the Tamper Pin Interrupt. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 159 of file stm32f10x_bkp.c.

References assert_param, CSR_TPIE_BB, and IS_FUNCTIONAL_STATE.

Referenced by main().

uint16_t BKP_ReadBackupRegister ( uint16_t  BKP_DR  ) 

Reads data from the specified Data Backup Register.

Parameters:
BKP_DR,: specifies the Data Backup Register. This parameter can be BKP_DRx where x:[1, 42]
Return values:
The content of the specified Data Backup Register

Definition at line 240 of file stm32f10x_bkp.c.

References assert_param, BKP_BASE, and IS_BKP_DR.

Referenced by CheckBackupReg(), IsBackupRegReset(), and main().

void BKP_RTCOutputConfig ( uint16_t  BKP_RTCOutputSource  ) 

Select the RTC output source to output on the Tamper pin.

Parameters:
BKP_RTCOutputSource,: specifies the RTC output source. This parameter can be one of the following values:

  • BKP_RTCOutputSource_None: no RTC output on the Tamper pin.
  • BKP_RTCOutputSource_CalibClock: output the RTC clock with frequency divided by 64 on the Tamper pin.
  • BKP_RTCOutputSource_Alarm: output the RTC Alarm pulse signal on the Tamper pin.
  • BKP_RTCOutputSource_Second: output the RTC Second pulse signal on the Tamper pin.
Return values:
None 

Definition at line 179 of file stm32f10x_bkp.c.

References assert_param, BKP, IS_BKP_RTC_OUTPUT_SOURCE, and RTCCR_MASK.

Referenced by main(), and RTC_Configuration().

void BKP_SetRTCCalibrationValue ( uint8_t  CalibrationValue  ) 

Sets RTC Clock Calibration value.

Parameters:
CalibrationValue,: specifies the RTC Clock Calibration value. This parameter must be a number between 0 and 0x7F.
Return values:
None 

Definition at line 200 of file stm32f10x_bkp.c.

References assert_param, BKP, IS_BKP_CALIBRATION_VALUE, and RTCCR_CAL_MASK.

void BKP_TamperPinCmd ( FunctionalState  NewState  ) 

Enables or disables the Tamper Pin activation.

Parameters:
NewState,: new state of the Tamper Pin activation. This parameter can be: ENABLE or DISABLE.
Return values:
None 

Definition at line 146 of file stm32f10x_bkp.c.

References assert_param, CR_TPE_BB, and IS_FUNCTIONAL_STATE.

Referenced by main(), RTC_Configuration(), and TAMPER_IRQHandler().

void BKP_TamperPinLevelConfig ( uint16_t  BKP_TamperPinLevel  ) 

Configures the Tamper Pin active level.

Parameters:
BKP_TamperPinLevel,: specifies the Tamper Pin active level. This parameter can be one of the following values:

  • BKP_TamperPinLevel_High: Tamper pin active on high level
  • BKP_TamperPinLevel_Low: Tamper pin active on low level
Return values:
None 

Definition at line 133 of file stm32f10x_bkp.c.

References assert_param, CR_TPAL_BB, and IS_BKP_TAMPER_PIN_LEVEL.

Referenced by main().

void BKP_WriteBackupRegister ( uint16_t  BKP_DR,
uint16_t  Data 
)

Writes user data to the specified Data Backup Register.

Parameters:
BKP_DR,: specifies the Data Backup Register. This parameter can be BKP_DRx where x:[1, 42]
Data,: data to write
Return values:
None 

Definition at line 221 of file stm32f10x_bkp.c.

References assert_param, BKP_BASE, and IS_BKP_DR.

Referenced by main(), and WriteToBackupReg().

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32