MG32F10x Standard Peripherals Firmware Library
Macros | Functions
mg32f10x_bkp.h File Reference

This file contains all the functions prototypes for the BKP firmware library. More...

#include "mg32f10x.h"

Go to the source code of this file.

Macros

#define BKP_TamperPinLevel_High   ((uint16_t)0x0000)
 
#define BKP_TamperPinLevel_Low   ((uint16_t)0x0001)
 
#define IS_BKP_TAMPER_PIN_LEVEL(LEVEL)
 
#define BKP_RTCOutputSource_None   ((uint16_t)0x0000)
 
#define BKP_RTCOutputSource_CalibClock   ((uint16_t)0x0080)
 
#define BKP_RTCOutputSource_Alarm   ((uint16_t)0x0100)
 
#define BKP_RTCOutputSource_Second   ((uint16_t)0x0300)
 
#define IS_BKP_RTC_OUTPUT_SOURCE(SOURCE)
 
#define BKP_DR1   ((uint32_t)0x00000010)
 
#define BKP_DR2   ((uint32_t)0x00000014)
 
#define BKP_DR3   ((uint32_t)0x00000018)
 
#define BKP_DR4   ((uint32_t)0x0000001C)
 
#define BKP_DR5   ((uint32_t)0x00000020)
 
#define BKP_DR6   ((uint32_t)0x00000024)
 
#define BKP_DR7   ((uint32_t)0x00000028)
 
#define BKP_DR8   ((uint32_t)0x0000002C)
 
#define BKP_DR9   ((uint32_t)0x00000030)
 
#define BKP_DR10   ((uint32_t)0x00000034)
 
#define BKP_DR11   ((uint32_t)0x00000038)
 
#define BKP_DR12   ((uint32_t)0x0000003C)
 
#define BKP_DR13   ((uint32_t)0x00000040)
 
#define BKP_DR14   ((uint32_t)0x00000044)
 
#define BKP_DR15   ((uint32_t)0x00000048)
 
#define BKP_DR16   ((uint32_t)0x0000004C)
 
#define BKP_DR17   ((uint32_t)0x00000050)
 
#define BKP_DR18   ((uint32_t)0x00000054)
 
#define BKP_DR19   ((uint32_t)0x00000058)
 
#define BKP_DR20   ((uint32_t)0x0000005C)
 
#define BKP_DR21   ((uint32_t)0x00000060)
 
#define IS_BKP_DR(DR)
 
#define IS_BKP_CALIBRATION_VALUE(VALUE)   ((VALUE) <= 0x7F)
 
#define BKP_RTCCLKSource_LSE   ((uint32_t)0x00000100)
 
#define BKP_RTCCLKSource_LSI   ((uint32_t)0x00000200)
 
#define BKP_RTCCLKSource_HSE_Div128   ((uint32_t)0x00000300)
 
#define BKP_LSE_OFF   ((uint32_t)0x00000000)
 
#define BKP_LSE_ON   ((uint32_t)0x00000001)
 
#define BKP_LSE_Bypass   ((uint32_t)0x00000004)
 

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

Detailed Description

This file contains all the functions prototypes for the BKP firmware library.

Author
megawin Application Team
Version
V0.1.10
Date
05-January-2023