RTC (Real Time clock): Realtime clock
BCD code: 4-bit 2 binary to represent the decimal form within 10.
RTC Clock Source: LSE (32.768KHZ), HSE_RTC, LSI. After a precise calibration (RTC_CALR). The 7-bit prescaler is then divided (rtc_prer, default 127+1=128) to produce a ck_apre () clock. Again after a rough calibration (RTC_CALPR). Then go through Rtc_prer (a synchronous 15-bit Prescaler (default value =256), Shadow Register (RTC_SSR)). Then, generate a Ck_spre (default 1HZ) for the true RTC core clock, then, provide a 1HZ frequency to the calendar (shadow Register, RTC_TR,RTC_DR, is the time and date register). Synchronous 15-bit Prescaler Shadow register (RTC_SSR's clock comes from Ck_apre, its initial value is from Rtc_prer, assuming 256, when it counts to zero, then ck_apre produces 256 times, and Ck_ Spre only produces one time to go to the calendar) and the calendar's shadow register determines the exact time. Alarms are generated when the time of alarm A or B is equal to the calendar time.
The following is automatic wakeup: the clock source is precision calibrated (RTC_CALR), then wucksel[1:0], and output to the clock selector. Then go to Rtc_wutr (16-bit wake-up auto reload Register). When the auto-mount Register is set to a value, such as 100, when it is reduced to 0, the Wutf is awakened, the flag is turned on, and the interrupt is generated.
Backup Register BKP
RTC Common Registers
RTC Real-Time clock-backup area bkp--principle explanation