19.2.7 Initialization and Configuration functions
This section provide functions allowing to initialize and configure the RTC Prescaler
(Synchronous and Asynchronous), RTC Hour format, disable RTC registers Write
protection, enter and exit the RTC initialization mode, RTC registers synchronization check
and reference clock detection enable.
1. The RTC Prescaler is programmed to generate the RTC 1Hz time base. It is split into
2 programmable prescalers to minimize power consumption.
ï€ A 7-bit asynchronous prescaler and A 13-bit synchronous prescaler.
ï€ When both prescalers are used, it is recommended to configure the
asynchronous prescaler to a high value to minimize consumption.
2. All RTC registers are Write protected. Writing to the RTC registers is enabled by
writing a key into the Write Protection register, RTC_WPR.
3. To Configure the RTC Calendar, user application should enter initialization mode. In
this mode, the calendar counter is stopped and its value can be updated. When the
initialization sequence is complete, the calendar restarts counting after 4 RTCCLK
cycles.
4. To read the calendar through the shadow registers after Calendar initialization,
calendar update or after wakeup from low power modes the software must first clear
the RSF flag. The software must then wait until it is set again before reading the
calendar, which means that the calendar registers have been correctly copied into the
RTC_TR and RTC_DR shadow registers. The RTC_WaitForSynchro() function
implements the above software sequence (RSF clear and RSF check).
ï‚· RTC_DeInit()
ï‚· RTC_Init()
ï‚· RTC_StructInit()
ï‚· RTC_WriteProtectionCmd()
ï‚· RTC_EnterInitMode()
ï‚· RTC_ExitInitMode()
ï‚· RTC_WaitForSynchro()
ï‚· RTC_RefClockCmd()
ï‚· RTC_BypassShadowCmd()
19.2.8 Backup Data Registers configuration functions
ï‚· RTC_WriteBackupRegister()
ï‚· RTC_ReadBackupRegister()
19.2.9 Output Type Config configuration functions
ï‚· RTC_OutputTypeConfig()
19.2.10 Shift control synchronisation functions
ï‚· RTC_SynchroShiftConfig()
19.2.11 Interrupts and flags management functions