RM0444
The WUTF flag must then be cleared by software.
When the periodic wakeup interrupt is enabled by setting the WUTIE bit in the RTC_CR
register, it can exit the device from low-power modes.
The periodic wakeup flag can be routed to the TAMPALRM output provided it has been
enabled through bits OSEL[1:0] of RTC_CR register. TAMPALRM output polarity can be
configured through the POL bit in the RTC_CR register.
System reset, as well as low-power modes (Sleep, Stop and Standby) have no influence on
the wakeup timer.
30.3.8
RTC initialization and configuration
RTC register access
The RTC registers are 32-bit registers. The APB interface introduces 2 wait-states in RTC
register accesses except on read accesses to calendar shadow registers when BYPSHAD
= 0.
RTC register write protection
After system reset, the RTC registers are protected against parasitic write access by the
DBP bit in the power control peripheral (refer to the PWR power control section). DBP bit
must be set in order to enable RTC registers write access.
After Backup domain reset, some of the RTC registers are write-protected.
Writing to the protected RTC registers is enabled by writing a key into the Write Protection
register, RTC_WPR.
The following steps are required to unlock the write protection on the protected RTC
registers.
1.
Write 0xCA into the RTC_WPR register.
2.
Write 0x53 into the RTC_WPR register.
Writing a wrong key reactivates the write protection.
The protection mechanism is not affected by system reset.
Calendar initialization and configuration
To program the initial time and date calendar values, including the time format and the
prescaler configuration, the following sequence is required:
the RTC_SR register, and the wakeup counter is automatically reloaded with its
reload value (RTC_WUTR register value).
RM0444 Rev 5
Real-time clock (RTC)
881/1390
926
Need help?
Do you have a question about the STM32G0 1 Series and is the answer not in the manual?
Questions and answers