Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
323
/
631
RTC_TMPCFG.TPFLT[1:0] determines the number of samples.
The internal pull-up resistance of tamper pin can be precharged before each sampling, and the precharge time is
controlled by RTC_TMPCFG.TPPRCH[1:0] bits. Precharge will be disabled when RTC_TMPCFG.TPPUDIS set 1.
Using RTC_TMPCFG.TPFREQ[2:0] to determine the sampling frequency of level detection can optimize the best
balance between tamper detection delay and pull-up power consumption.
Daylight saving time configuration
Daylight saving time function can be controlled by RTC_CTRL.SU1H, RTC_CTRL.AD1H, and RTC_CTRL.BAKP
bits. Calendar will subtract one hour when set RTC_CTRL.SU1H bit to 1, and add one hour when set
RTC_CTRL.AD1H to 1. RTC_CTRL.BAKP can be used to remember this adjustment or not.
RTC reset
All system reset resources will reset some of the calendar shadow registers (RTC_SUBS, RTC_TSH and RTC_DATE)
and RTC initialization status register (RTC_INITSTS) to their default values.
On the contrary, the Backup reset is used to reset the following registers and they are not affected by the system reset.
The RTC current calendar register, the RTC control register (RTC_CTRL), the pre-divider register (RTC_PRE), the
RTC calibration register (RTC_CALIB), the RTC time-stamp register (RTC_TSSS, RTC_TST and RTC_TSD), the
wake-up timer registers (RTC_WKUPT), the Alarm A and the Alarm B registers (RTC_ALRMASS/RTC_ALARMA
and RTC_ALRMBSS/RTC_ALARMB), and the option registers (RTC_OPT).
In addition, when the LSE clock is used, if the reset source is different from the Backup domain reset the RTC keeps
on running under system reset (the list of the RTC domain registers is not affected by system reset, refer to RTC
clock). When a Backup domain reset occurs, the RTC stops working and all RTC registers are set to their reset values.
RTC sub-second register shift operation
When the value of calendar has a sub-second deviation compared to the external precision clock, the shift function
can be used to improve the precision of calendar.
Calendar can use RTC_SCTRL.AD1S and RTC_SCTRL.SUBF[14:0] bits to control maximum delay or advance 1s.
The resolution of the adjustment is 1/(RTC_PRE.DIVS[14:0]+1) second, it means the higher value of
RTC_PRE.DIVS[14:0] , the higher of the resolution. However, to keep the synchronous prescaler output at 1Hz, the
higher RTC_PRE.DIVS[14:0] means the lower RTC_PRE.DIVA[6:0], then more power consuming.
Note: Before starting a shift operation, user must check RTC_SUBS.SS[15] bit is 0.
Whenever write RTC_SCTRL register, the RTC_INITSTS.SHOPF flag will be set by hardware, which indicate a
shift operation is pending. Once this shift operation is complete, the bit is cleared by hardware.
RTC digital clock precision calibration
Digital precision calibration is achieved by adjusting the number of RTC clock pulses in the calibration period. Digital
precision calibration resolution is 0.954 PPM with the range from -487.1 PPM to +488.5 PPM.