MG32F10x Standard Peripherals Firmware Library

函数
BKP_Private_Functions
MG32F10x_StdPeriph_Driver » BKP

## 函数
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 (uint32_t BKP_DR, uint32_t Data)
| Writes user data to the specified Data Backup Register. 更多...
uint32_t | BKP_ReadBackupRegister (uint32_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. 更多...
void | BKP_RTCCLKConfig (uint32_t BKP_RTCCLKSource)
| Configures the RTC clock (RTCCLK). 更多...
void | BKP_RTCCLKCmd (FunctionalState NewState)
| Enables or disables the RTC clock. 更多...
void | BKP_LSEConfig (uint32_t BKP_LSE)
| Configures the External Low Speed oscillator (LSE). 更多...
FlagStatus | BKP_GetLSEReadyFlagStatus (void)
| Checks whether the LSE Ready flag is set or not. 更多...

## 详细描述

## 函数说明

## ◆ BKP_ClearFlag()

void BKP_ClearFlag | ( | void |  | ) |

Clears Tamper Pin Event pending flag.

参数

  None |

返回值

  None |

## ◆ BKP_ClearITPendingBit()

void BKP_ClearITPendingBit | ( | void |  | ) |

Clears Tamper Pin Interrupt pending bit.

参数

  None |

返回值

  None |

## ◆ BKP_DeInit()

void BKP_DeInit | ( | void |  | ) |

Deinitializes the BKP peripheral registers to their default reset values.

参数

  None |

返回值

  None |

## ◆ BKP_GetFlagStatus()

FlagStatus BKP_GetFlagStatus | ( | void |  | ) |

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

参数

  None |

返回值

  The | new state of the Tamper Pin Event flag (SET or RESET).

## ◆ BKP_GetITStatus()

ITStatus BKP_GetITStatus | ( | void |  | ) |

Checks whether the Tamper Pin Interrupt has occurred or not.

参数

  None |

返回值

  The | new state of the Tamper Pin Interrupt (SET or RESET).

## ◆ BKP_GetLSEReadyFlagStatus()

FlagStatus BKP_GetLSEReadyFlagStatus | ( | void |  | ) |

Checks whether the LSE Ready flag is set or not.

参数

  None |

返回值

  The | new state of the LSE Ready flag (SET or RESET).

## ◆ BKP_ITConfig()

void BKP_ITConfig | ( | FunctionalState | NewState | ) |

Enables or disables the Tamper Pin Interrupt.

参数

  NewState | new state of the Tamper Pin Interrupt. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ BKP_LSEConfig()

void BKP_LSEConfig | ( | uint32_t | BKP_LSE | ) |

Configures the External Low Speed oscillator (LSE).

参数

  BKP_LSE | specifies the new state of the LSE. This parameter can be one of the following values: BKP_LSE_OFF: LSE oscillator OFF BKP_LSE_ON: LSE oscillator ON BKP_LSE_Bypass: LSE oscillator bypassed with external clock

返回
  None

## ◆ BKP_ReadBackupRegister()

uint32_t BKP_ReadBackupRegister | ( | uint32_t | BKP_DR | ) |

Reads data from the specified Data Backup Register.

参数

  BKP_DR | specifies the Data Backup Register. This parameter can be BKP_DRx where x:[1, 21]

返回值

  The | content of the specified Data Backup Register

## ◆ BKP_RTCCLKCmd()

void BKP_RTCCLKCmd | ( | FunctionalState | NewState | ) |

Enables or disables the RTC clock.

注解
  This function must be used only after the RTC clock was selected using the BKP_RTCCLKConfig function.

参数

  NewState | new state of the RTC clock. This parameter can be: ENABLE or DISABLE.

返回
  None

## ◆ BKP_RTCCLKConfig()

void BKP_RTCCLKConfig | ( | uint32_t | BKP_RTCCLKSource | ) |

Configures the RTC clock (RTCCLK).

注解
  Once the RTC clock is selected it can't be changed unless the Backup domain is reset.

参数

  BKP_RTCCLKSource | specifies the RTC clock source. This parameter can be one of the following values: BKP_RTCCLKSource_LSE: LSE selected as RTC clock BKP_RTCCLKSource_LSI: LSI selected as RTC clock BKP_RTCCLKSource_HSE_Div128: HSE clock divided by 128 selected as RTC clock

返回
  None

## ◆ BKP_RTCOutputConfig()

void BKP_RTCOutputConfig | ( | uint16_t | BKP_RTCOutputSource | ) |

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

参数

  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.

返回值

  None |

## ◆ BKP_SetRTCCalibrationValue()

void BKP_SetRTCCalibrationValue | ( | uint8_t | CalibrationValue | ) |

Sets RTC Clock Calibration value.

参数

  CalibrationValue | specifies the RTC Clock Calibration value. This parameter must be a number between 0 and 0x7F.

返回值

  None |

## ◆ BKP_TamperPinCmd()

void BKP_TamperPinCmd | ( | FunctionalState | NewState | ) |

Enables or disables the Tamper Pin activation.

参数

  NewState | new state of the Tamper Pin activation. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ BKP_TamperPinLevelConfig()

void BKP_TamperPinLevelConfig | ( | uint16_t | BKP_TamperPinLevel | ) |

Configures the Tamper Pin active level.

参数

  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

返回值

  None |

## ◆ BKP_WriteBackupRegister()

void BKP_WriteBackupRegister | ( | uint32_t | BKP_DR,
|  | uint32_t | Data
| ) |  |

Writes user data to the specified Data Backup Register.

参数

  BKP_DR | specifies the Data Backup Register. This parameter can be BKP_DRx where x:[1, 21]
  Data | data to write

返回值

  None |