![GigaDevice Semiconductor GD32E23 Series Скачать руководство пользователя страница 208](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794208.webp)
GD32E23x User Manual
208
2.
Write the new value into RTC_HRFC register
3.
After 3 ck_apre clocks, the new calibration settings take effect
13.3.11.
Time-stamp function (Only for GD32E230xx devices)
Time-stamp function is performed on RTC_TS pin and is enabled by control bit TSEN.
When a time-stamp event occurs on RTC_TS pin, 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.
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.
13.3.12.
Tamper detection
The RTC_TAMPx pin input can be used for tamper event detection under edge detection
mode or level detection mode with configurable filtering setting.
RTC backup registers (RTC_BKPx)
The RTC backup registers are located in the V
DD
backup domain. The wake up action from
Standby Mode or System Reset does not affect these registers.
These registers are only reset by detected tamper event and backup domain reset.
Tamper detection function initialization
RTC tamper detection function can be independently enabled on tamper input pin by setting
corresponding TPxEN bit. Tamper detection configuration is set before enable TPxEN bit.
When the tamper event is detected, the corresponding flag (TPxF) will assert. Tamper event
can generate an interrupt if tamper interrupt enable (TPIE) is set. Any tamper event will reset
all backup registers (RTC_BKPx).
Timestamp on tamper event
The TPTS bit can control whether the tamper detection function is used as time-stamp
function. If the bit is set to 1, the TSF bit will be set when the tamper event detected. If enable
the time-stamp function. Whatever the TPTS bit is, the TPxF will assert when tamper event
detected.