GD32VF103 User Manual
57
4.
Backup registers (BKP)
4.1.
Overview
The Backup registers are located in the Backup domain that remains powered-on by V
BAT
even if V
DD
power is shut down, they are forty-two 16-bit (84 bytes) registers for data
protection of user application data, and the wake-up action from Standby mode or system
reset do not affect these registers.
In addition, the BKP registers can be used to implement the tamper detection and RTC
calibration function.
After reset, any writing access to the registers in Backup domain is disabled, that is, the
Backup registers and RTC cannot be written to access. In order to enable access to the
Backup registers and RTC, the Power and Backup interface clocks should be enabled firstly
by setting the PMUEN and BKPIEN bits in the RCU_APB1EN register, and writing access to
the registers in Backup domain should be enabled by setting the BKPWEN bit in the
PMU_CTL register.
4.2.
Characteristics
84 bytes Backup registers which can keep data under power saving mode. If tamper
event is detected, Backup registers will be reset.
The active level of Tamper source (PC13) can be configured.
RTC Clock Calibration register provides RTC alarm and second output selection, and
the calibration value configuration.
Tamper control and status register (BKP_TPCS) can control tamper detection with
interrupt or event capability.
4.3.
Function overview
4.3.1.
RTC clock calibration
In order to improve the RTC clock accuracy, the MCU provides the RTC output for calibration
function. The clock with the frequency f
RTCCLK
/64 can be output on the PC13. It is enabled by
setting the COEN bit in the BKP_OCTL register.
The calibration value is set by RCCV[6:0] in the BKP_OCTL register, and the calibration
function can slow down the RTC clock by steps of 1000000/2^20 ppm.