Real-time Clock (RTC)
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
235
11.2.6
Day Threshold Program
The RTC provides day interrupt for users. To use day interrupt, DAY_THRES[8:0] must be programmed first in
DOVTHIE bit in RTC_CR to enable day over threshold interrupt.
11.3
Registers
The physical base address of RTC is 0x4800 4000.
Table 11-2 Register table of RTC
Name
Address Offset
Access
Description
0x00
R/W
RTC time register
0x04
R/W
RTC control register
0x08
R/W
RTC initialization and status register
0x0C
R/W
RTC prescaler register
0x10
R/W
RTC calibration register
0x14
R/W
RTC alarm1 register low
0x18
R/W
RTC alarm1 register high
0x1C
R/W
RTC write protection register
0x20
R/W
RTC 32K auto calibration register
11.3.1
RTC Time Register (RTC_TR)
Name:
RTC time register
Size:
32 bits
Address offset:
0x00
Reset value:
0x0000 0000
This register is the calendar time shadow register. This register is write protected, and must be written in initialization mode only.
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
DAY [8:0]
PM
HT[1:0]
HU[3:0]
R/W
R/W
R/W
R/W
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RSVD
MNT[2:0]
MNU[3:0]
RSVD
ST[2:0]
SU[3:0]
R/W
R/W
R/W
R/W
Bit
Name
Access
Reset
Description
31:23
DAY[8:0]
R/W
0
Day in binary format
22
PM
R/W
0
AM/PM notation
0: AM or 24-hour format
1: PM
21:20
HT[1:0]
R/W
0
Hour tens in BCD format
19:16
HU[3:0]
R/W
0
Hour units in BCD format
15
RSVD
N/A
-
Reserved
14:12
MNT[2:0]
R/W
0
Minute tens in BCD format
11:8
MNU[3:0]
R/W
0
Minute units in BCD format
7
RSVD
N/A
-
Reserved
6:4
ST[2:0]
R/W
0
Second tens in BCD format
3:0
SU[3:0]
R/W
0
Second units in BCD format
11.3.2
RTC Control Register (RTC_CR)
Name:
RTC control register
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03