ML51/ML54/ML56
Sep. 01, 2020
Page
637
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
Register
INIR = 0
RWENF = 1
RWENF = 0
RTCCAMSK
Not available
R/W
R
Table 6.18-1 RTC Read/Write Enable
6.18.4.3 Frequency Compensation
The RTCFREQADJ0 and RTCFREQADJ1 registers allow user to make digital compensation to a
clock input. Please follow the example and formula below to write the actual frequency of 32k crystal
to RTCFREQADJ0 and RTCFREQADJ1 registers. Following are the compensation examples for
higher or lower than 32768 Hz.
Example 1:
Frequency counter measurement : 32773.65 Hz
Integer Part: 32773 => RTCFREQADJ1[4:0] = 0x15, Refer the INTEGER(RTCFREQADJ1[4:0]) to get
detail setting value.
Fraction Part: 0.65 X 64 = 41.6(0x2A) => RTCFREQADJ0[5:0]=0x2A
Example 2:
Frequency counter measurement : 32763.25 Hz
Integer part: 32763=> RTCFREQADJ1[4:0] = 0x0B, Refer the INTEGER(RTC_FREQADJ1[4:0]) to get
detail setting value.
Fraction part: 0.25 X 64 = 16(0x10) => RTCFREQADJ0[5:0] = 0x10
Note:
The value of RTCFREQADJ1 register will be the default value (0x10) and RTCFREQADJ0 will
be (0x00) while the compensation is not executed. User can utilize a frequency counter to measure
RTC clock source via clock output function in manufacturing. In the meanwhile, user can use clock
output function to check the result of RTC frequency compensation.
6.18.4.4 Time and Calendar Counter
RTCTIMESEC, RTCTIMEMIN, RTCTIMEHR, RTCCALDAY, RTCCALMON and RTCCALYEAR are
used to load the real time and calendar. RTCTALMSEC, RTCTALMMIN, RTCTALMHR,
RTCCALMDAY RTCCALMMON and RTCCALMYEAR are used for setup alarm time and calendar.
6.18.4.5 12/24 hour Time Scale Selection
The 12/24 hour time scale selection depends on 24HEN (RTCCLKFMT[0]). When RTC runs as 12-
hour time scale mode, RTCTIMEHR[5] (the high bit of TENHR[1:0]) means AM/PM indication, if
RTCTIMEHR[5] is 1, it indicates PM time message and RTCTIMEHR[5] is 0 indicates AM time
message.) shows RTCTIMEHR mapping table of 12/24 hour time scale selection.
Note: The Hour Value Write Into RTCTIMEHR[5:0], Messages Are Expressed In BCD Format.
24-Hour Time Scale
(24HEN = 1)
12-Hour Time Scale (PM Time + 0x20)
(24HEN = 0) (PM Time + 0x20)
0x00 (AM12)
0x12 (PM12)
0x12 (AM12)
0x32 (PM12)
0x01 (AM01)
0x13 (PM01)
0x01 (AM01)
0x21 (PM01)
0x02 (AM02)
0x14 (PM02)
0x02 (AM02)
0x22 (PM02)
0x03 (AM03)
0x15 (PM03)
0x03 (AM03)
0x23 (PM03)
0x04 (AM04)
0x16 (PM04)
0x04 (AM04)
0x24 (PM04)
0x05 (AM05)
0x17 (PM05)
0x05 (AM05)
0x25 (PM05)