
GD32L23x User Manual
266
the measure is within 0.477PPM (0.5 RTCCLK cycles over 32s)
When the calibration period is 16 seconds(by setting CWND16 bit)
In this configuration, CMSK[0] is fixed to 0 by hardware. Using exactly 16s period to measure
the accuracy of the calibration 1Hz output can guarantee the measure is within 0.954PPM
(0.5 RTCCLK cycles over 16s)
When the calibration period is 8 seconds(by setting CWND8 bit)
In this configuration, CMSK[1:0] is fixed to 0 by hardware. Using exactly 8s period to measure
the accuracy of the calibration 1Hz output can guarantee the measure is within 1.907PPM
(0.5 RTCCLK cycles over 8s)
Re-calibration on-the-fly
When the INITF bit is 0, software can update the value of RTC_HRFC using following steps:
1.
Wait the SCPF=0
2.
Write the new value into RTC_HRFC register
3.
After 3 ck_apre clocks, the new calibration settings take effect
16.3.12.
Time-stamp function
Time-stamp function is performed on RTC_TS pin and is enabled by control bit TSEN. It is
also enabled by control bit ITSEN
When a time-stamp event occurs on RTC_TS pin (TSEN = 1), the calendar value will be
saved in time-stamp registers (RTC_DTS/RTC_TTS/RTC_SSTS) and the time-stamp flag
(TSF) is set to 1 by hardware. Time-stamp event can generate an interrupt if time-stamp
interrupt enable (TSIE) is set.
When an internal time-stamp event detected (ITSEN = 1), the calendar value will be saved in
time-stamp registers (RTC_DTS/RTC_TTS/RTC_SSTS), the time-stamp flag (TSF) and
internal time-stamp flag (ITSF) is set to 1 by hardware. Time-stamp event can generate an
interrupt if internal time-stamp interrupt enable (TSIE) is set.The internal timestamp event is
generated by the switch to the V
BAT
supply
Time-stamp registers only record the calendar at the first time time-stamp event occurs which
means that time-stamp registers will not change when TSF=1.
To extend the time-stamp event source, one optional feature is provided: tamper function can
also be considered as time-stamp function if TPTS is set.
Note:
When the time-stamp event occurs, TSF is set 2 ck_apre cycles delay because of
synchronization mechanism.
16.3.13.
Tamper detection
The RTC_TAMPx pin input can be used for tamper event detection under edge detection