R01UH0823EJ0100 Rev.1.00 Page 804 of 1823
Jul 31, 2019
RX23W Group 28. Realtime Clock (RTCe)
28.6 Usage Notes
28.6.1 Register Writing during Counting
The following registers should not be written to during counting (while the RCR2.START bit = 1).
RSECCNT/BCNT0, RMINCNT/BCNT1, RHRCNT/BCNT2, RDAYCNT, RWKCNT/BCNT3, RMONCNT, RYRCNT,
RCR1.RTCOS, RCR2.RTCOE, RCR2.HR24
The counter must be stopped before writing to any of the above registers.
28.6.2 Use of Periodic Interrupts
The procedure for using periodic interrupts is shown in Figure 28.13.
The generation and period of the periodic interrupt can be changed by the setting of the RCR1.PES[3:0] bits. However,
since the prescaler, R64CNT, and RSECCNT/BCNT0 are used to generate interrupts, the interrupt period is not
guaranteed immediately after setting of the RCR1.PES[3:0] bits.
Furthermore, stopping/restarting or resetting counter operation, reset by RTC software, and the 30-second adjustment by
changing the RCR2 value affects the interrupt period. When the time error adjustment function is used, the interrupt
generation period after adjustment is added or subtracted according to the adjustment value.
Figure 28.13 Using Periodic Interrupt Function
28.6.3 RTCOUT (1-Hz/64-Hz) Clock Output
Stopping/restarting or resetting counter operation, reset by RTC software, and the 30-second adjustment by changing the
RCR2 value affects the period of RTCOUT (1-Hz/64-Hz) output. When the time error adjustment function is used, the
period of RTCOUT (1-Hz/64-Hz) output after adjustment is added or subtracted according to the adjustment value.
Set the RCR1.PES[3:0] bits and
write 1 to the RCR1.PIE bit
The set period elapses
Set the period and enable interrupt requests
Confirm generation of the first periodic interrupt*
1
Confirm generation of a periodic interrupt
The period
is not
guaranteed.
Interrupts
are
generated
with the
specified
period.
The first interrupt is generated
An interrupt is generated
Note 1. When a interrupt generation period is changed while the periodic interrupt is used, an interrupt
may be generated at the completion of the setting. If the interrupt is generated immediately after
the setting, the period is not guaranteed for two interrupts including the current interrupt.