ISD91200 Series Technical Reference Manual
Release Date: Sep 16, 2019
- 202 -
Revision 2.4
Table 5-76 RTC Frequency Compensation Example
Example 1:
Frequency Counter Measurement : 32773.65Hz ( > 32768 Hz)
Integer Part: 32773 = 0x8005
RTC_FREQADJ. INTEGER= (32773 – 32761) = 12 = 0x0C
Fractional Part: 0.65 X 60 = 39 = 0x27
RTC_FREQADJ. FRACTION= 0x27
Example 2
Frequency counter measurement : 32765.27Hz ( < 32768 Hz)
Integer part: 32765 = 0x7ffd
RTC_FREQADJ.INTEGER = (32765 – 32761) = 4 = 0x04
Fractional part: 0.27 x 60 = 16.2 = 0x10
RTC_FREQADJ.FRACTION = 0x10
5.8.3.5
Time and Calendar counter
RTC_TIME and RTC_CAL are used to load the time and calendar. RTC_TALM and RTC_CALM are
used to set the alarm. They are all represented by a BCD format, see register descriptions for digit
assignments.
5.8.3.6
12/24 hour Time Scale Selection
RTC can be selected to report time in either a 12 or 24hour time scale. If 12 hour mode is selected then
AM/PM indication is provided by the hour digit being >=2, see register description RTC_CLKFMT for
details. The 12/24 hour time scale selection depends on RTC_CLKFMT.24HEN.
5.8.3.7
Day of the week counter
The RTC unit provides day of week in Day of the Week Register (RTC_WEEKDAY). The value is
defined from 0 to 6 to represent Sunday to Saturday respectively.
5.8.3.8
Periodic Time Tick Interrupt
The periodic interrupt has 8 period option 1/128, 1/64, 1/32, 1/16, 1/8, 1/4, 1/2 and 1 second which are
selected by RTC_TICK.TICKSEL[2:0]. When periodic time tick interrupt is enabled by setting
RTC_INTEN.TICKEN to 1, the Periodic Time Tick Interrupt is requested as selected by RTC_TICK
register.
5.8.3.9
Alarm Time Interrupt
When RTC counter in RTC_TIME and RTC_CAL is equal to alarm setting in RTC_TALM and
RTC_CALM the alarm interrupt flag (RTC_INTSTS.ALMIF) is set. If alarm interrupt is enabled
(RTC_INTEN.ALMIEN=1) the alarm interrupt is also requested.
5.8.3.10
Additional Notes
1. RTC_TALM, RTC_CALM, RTC_TIME and RTC_CAL registers are all BCD counter.
2. Programmer has to make sure that values loaded are reasonable. For example, some invalid
RTC_CAL values would be 201a (year), 13 (month), 00 (day).
3. Reset state :
Register
Reset State
RTC_RWEN
0
RTC_CAL
05/1/1 (year/month/day)
RTC_TIME
00:00:00 (hour : minute : second)
RTC_CALM
00/00/00 (year/month/day)