![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 204](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794204.webp)
GD32E23x User Manual
204
1.
after a system reset
2.
after an initialization
3.
after shift function
Especially that software must clear RSYNF bit and wait it asserted before reading calendar
register after wakeup from power saving mode.
Reading calendar registers under BPSHAD=1
When BPSHAD=1, RSYNF is cleared and maintains as 0 by hardware so reading calendar
registers does not care about RSYNF bit. Current calendar value is read from real-time
calendar counter directly. The benefit of this configuration is that software can get the real
current time without any delay after wakeup from power saving mode (Deep-sleep /Standby
Mode).
Because of no RSYNF bit periodic assertion, the results of the different calendar registers
(RTC_SS/RTC_TIME/RTC_DATE) might not be coherent with each other when clock
ck_apre edge occurs between two reading calendar registers.
In addition, if current calendar register is changing and at the same time the APB bus reading
calendar register is also performing, the value of the calendar register read out might be not
correct.
To ensure the correctness and consistency of the calendar value, software must perform
reading operation as this: read all calendar registers continuously, if the last two values are
the same, the data is coherent and correct.
13.3.7.
Resetting the RTC
There are two reset sources used in RTC unit: system reset and backup domain reset.
System reset will affect calendar shadow registers and some bits of the RTC_STAT. When
system reset is valid, the bits or registers mentioned before are reset to the default value.
Backup domain reset will affect the following registers and system reset will not affect them:
-
RTC current real-time calendar registers
-
RTC Control register (RTC_CTL)
-
RTC Prescaler register (RTC_PSC)
-
RTC High resolution frequency compensation register (RTC_HRFC)
-
RTC Shift control register (RTC_SHIFTCTL)
-
RTC Time stamp registers (RTC_SSTS/RTC_TTS/RTC_DTS)
-
RTC Tamper register (RTC_TAMP)
-
RTC Backup registers (RTC_BKPx)
-
RTC Alarm registers (RTC_ALRMxSS/RTC_ALRMxTD)(x=0)
The RTC unit will go on running when system reset occurs or enter power saving mode, but
if backup domain reset occurs, RTC will stop counting and all registers will reset.