Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
322
/
631
RTC_INITSTS.TISOVF flag to 1, and the timestamp registers (RTC_TST and RTC_TSD) will continue to hold the
value of the previous event, which means timestamp registers(RTC_TST and RTC_TSD) data will not change when
RTC_INITSTS.TISF=1.
After the timestamp event caused by the synchronization process occurs again, RTC_INITSTS.TISF is set to 1 in 2
RTC_CLK cycles. There is no delay in the generation of RTC_INITSTS.TISOVF. This means that if two timestamp
events are very close, this can cause RTC_INITSTS.TISOVF to be "1" and RTC_INITSTS.TISF to be "0". Therefore,
after detecting that RTC_INITSTS.TISF is "1", then detect RTC_INITSTS.TISOVF bit.
Tamper event can trigger timestamp event when RTC_TMPCFG.TPTS bit is set to 1.
If timestamp events are enabled, the timestamp will capture the calendar read in the timestamp register. When both
tamper events and timestamp events are enabled, tamper events can also result in timestamp capture. Timestamp
events can be generated on any of the 16 GPIO ports selected by EXTI. The GPIO pins in each port are selected by
setting the corresponding EXTI_TS_SEL.TSSEL[3:0] bits.
Tamper detection
There are three tamper detection pin, RTC_TAMP1 pin is PC13, RTC_TAMP2 pin is PA0, RTC_TAMP3 pin is PA8.
RTC_TAMPx pin can be used as tamper event detection function input pin. There are two detection modes, edge
detection mode and level detection mode with configurable filtering function.
When RTC_TAMPx event is detected, RTC_BKP(1~20) registers will be erased if RTC_TMPCFG.TPxONE=0.
Tamper detection initialization
There are three tamper detection pins, each of them can be configured independently. User need to configure tamper
detection before enable RTC_TMPCFG.TPxEN bit. When the tamper event is detected after tamper detection is
enable, if RTC_TMPCFG.TPxINTEN is set to 1, tamper event can generate an interrupt and RTC_INITSTS.TAMxF
bit will be set 1.
When RTC_INITSTS.TAMxF is set to 1, a new tamper event on the same pin cannot be detected.
Timestamp on tamper event
Any tamper event can cause a timestamp event when RTC_INITSTS.TPTS is set to 1, and RTC_INITSTS.TISF bit
and RTC_INITSTS.TISOVF bit will be set as a normal timestamp event.
Edge detection of tamper input
When RTC_TMPCFG.TPFLT[1:0] bits set to 0, tamper detection is set to edge detection, and one of rising edge or
falling edge is controlled by RTC_TMPCFG.TPxTRG bit. The RTC_TAMPx pin will generate a tamper detection
event when corresponding edge is detected.
Because of RTC_BKP(1~20) can be reset when tamper event is detected, it is necessary to ensure that tamper event
detection and writing to RTC_BKP(1~20) will not occur at the same time. It is recommended to start the tamper
detection function after writing RTC_BKP(1~20).
Filtered level detection of RTC_TAMPx input
When RTC_TMPCFG.TPFLT[1:0] bits set to 1/2/3, tamper detection is set to level detection. The value of