Real-time Clock (RTC)
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
233
Note
: It is recommended to configure the asynchronous prescaler to a high value to minimize consumption.
Default, the asynchronous prescaler division factor is set to 128, and the synchronous division factor is set to 256, to obtain an internal clock
frequency of 1Hz (clk_spre) with 32.768kHz as RTCCLK.
f
clk_apre
is given by the following formula:
𝑓
𝑐𝑙𝑘_𝑎𝑝𝑟𝑒
=
𝑓
𝑅𝑇𝐶𝐶𝐿𝐾
PREDIV_A + 1
f
clk_spre
is given by the following formula:
𝑓
𝑐𝑙𝑘_𝑠𝑝𝑟𝑒
=
𝑓
𝑐𝑙𝑘_𝑎𝑝𝑟𝑒
PREDIV_S + 1
11.2.2
32K Auto-trigger Calibration Circuit
RTCCLK is supported by SDM module, and the clock source is calibrated with xtal_clk.
When system is in high speed mode, the SDM module can always be calibrated with xtal_clk. When system is in low power mode, RTC can
wake up PMC to open xtal_clk by generating xtal_req_o signal. The xtal_req_32k (xtal_req_o) is also given to SDM module to inform it that the
calibration begins. When xtal_clk is stable, the SDM module receives a xtal_valid signal from PMC and begins to do calibration. When
calibration has finished, SDM gives a cal_done_100k signal to inform RTC to pull down the xtal_req_32k (xtal_req_o) signal and gives
xtal_valid_ack to PMC. PMC then enters low power mode when receiving the xtal_valid_ack signal (See Fig 11-4).
PMC
SDM
RTC
CAL_GEN
cal_done_100k
Posedge clear
xtal_req_32k
xtal_req_o
xtal_valid
xtal_valid_ack
Fig 11-4 Calibration block diagram
The RTC unit provides auto calibration function. It can be selected with ACAL_SEL[1:0] and a programmable threshold with ACAL_THES[5:0] in
RTC_CLKACALR register to generate a xtal_req_32k request, as Fig 11-5 shows.
ACAL_SEL[1:0] = 00, the SDM32K auto calibration function is disabled.
ACAL_SEL[1:0] = 01 and the ACAL_THES[5:0] is set, the ACAL_CNT[5:0] updates once per minute.
ACAL_SEL[1:0] = 10 and the ACAL_THES[5:0] is set, the ACAL_CNT[5:0] updates once per hour.
ACAL_SEL[1:0] = 11 and the ACAL_THES[5:0] is set, the ACAL_CNT[5:0] updates once per day.
01
10
ACAL_SEL[1:0]
ACAL_CNT[5:0]
ACAL_THES[5:0]
=
xtal_req_32k
Minute_udp
Hour_udp
Day_udp
11
Fig 11-5 xtal_req_32k block diagram
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03