
ML51/ML54/ML56
Sep. 01, 2020
Page
638
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
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)
0x06 (AM06)
0x18 (PM06)
0x06 (AM06)
0x26 (PM06)
0x07 (AM07)
0x19 (PM07)
0x07 (AM07)
0x27 (PM07)
0x08 (AM08)
0x20 (PM08)
0x08 (AM08)
0x28 (PM08)
0x09 (AM09)
0x21 (PM09)
0x09 (AM09)
0x29 (PM09)
0x10 (AM10)
0x22 (PM10)
0x10 (AM10)
0x30 (PM10)
0x11 (AM11)
0x23 (PM11)
0x11 (AM11)
0x31 (PM11)
Table 6.18-212/24 hour Time Scale Selection
6.18.4.6 Day of the Week Counter
The RTC controller provides day of week in WEEKDAY bits (RTCWEEKDAY[2:0]). The value is
defined from 0 to 6 to represent Sunday to Saturday respectively.
6.18.4.7 Periodic Time Tick Interrupt
The periodic time tick interrupt has 8 period interval options 1/128, 1/64, 1/32, 1/16, 1/8, 1/4, 1/2 and 1
second that are selected by TICK bits (RTCTICK[2:0]). When Periodic Time Tick interrupt is enabled
by setting TICKIEN (RTCINTEN[1]) to 1, the Periodic Time Tick interrupt is requested periodically in
the period selected by RTCTICK[2:0] settings.
6.18.4.8 Alarm Interrupt
When the real time and calendar message in RTCTIMESEC, RTCTIMEMIN, RTCTIMEHR,
RTCCALDAY, RTCCALMON and RTCCALYEAR registers are equal to alarm time and calendar
values in RTCTALMSEC, RTCTALMMIN, RTCTALMHR, RTCCALMDAY, RTCCALMMON and
RTCCALMYEAR registers, the RTC alarm interrupt flag ALMIF (RTCINTSTS[0]) is set to 1 and the
RTC alarm interrupt signal assert if the alarm interrupt enable ALMIEN (RTCINTEN[0]) is enabled.
The RTC controller provides time alarm mask register (RTCTAMSK register) and Calendar Alarm
Mask Register (RTCCAMSK register) to mask the specified digit and generate periodic interrupt
without changing the alarm match condition in RTCTALM and RTCCALM registers in each alarm
interrupt service routine.
6.18.4.9 Application Note
1. All data in RTCTALMSEC, RTCTALMMIN, RTCTALMHR,RTCCALMDAY, RTCCALMMON,
RTCCALMYEAR, RTCTIMESEC, RTCTIMEMIN, RTCTIMEHR, RTCCALDAY, RTCCALMON
and RTCCALYEAR registers are all expressed in BCD format.
2. User has to make sure that the loaded values are reasonable. For example, Load
RTCCALYEAR as 201a (year), RTCCALMON as 13 (month), RTCCALDAY as 00 (day), or
RTCCAL (year, month, day) does not match with RTCWEEKDAY, etc.
3.
In RTCCALYEAR and RTCCALMYEAR, only 2 BCD digits are used to express “year”. The 2
BCD digits of xy means 20xy, rather than 19xy or 21xy.
4. Example of 12-Hour Time Setting
If current RTC time is PM12:59:30 in 12-Hour Time Scale mode, the RTCTIME( hour, minute,
second) setting as:
HOUR:
RTCTIMEHR[5:0]: 0x32 (0x12+0x20) combined by TENHR (RTCTIMEHR[5:4]) is 0x3, HR