Renesas R5S72621 User Manual

Page of 2152
 
Section 14   Realtime Clock 
 
 
Page 704 of 2108 
 
R01UH0134EJ0400  Rev. 4.00 
 
 Sep 
24, 
2014 
SH7262 Group, SH7264 Group
14.5
 
Usage Notes 
14.5.1
 
Register Writing during Count 
The following registers cannot be written to during a count (while bit 0 = 1 in RCR2). 
RSECCNT, RMINCNT, RHRCNT, RDAYCNT, RWKCNT, RMONCNT, RYRCONT 
The count must be stopped before writing to any of the above registers. 
14.5.2
 
Use of Realtime Clock Periodic Interrupts 
The method of using the periodic interrupt function is shown in figure 14.5. 
A periodic interrupt can be generated periodically at the interval set by bits PES2 to PES0 in 
RCR2. When the time set by bits PES2 to PES0 has elapsed, the PEF is set to 1. 
The PEF is cleared to 0 upon periodic interrupt generation or when bits PES2 to PES0 are set. 
Periodic interrupt generation can be confirmed by reading this bit, but normally the interrupt 
function is used. 
Set PES2 to PES0
and clear PEF to 0
in RCR2
Clear PEF to 0
Set PES, clear PEF
Elapse of time set by PES
Clear PEF
 
Figure 14.5   Using Periodic Interrupt Function 
14.5.3
 
Transition to Standby Mode after Setting Register 
When a transition to standby mode is made after registers in this module are set, sometimes 
counting is not performed correctly. After making register settings, do not fail to perform a 
dummy read of the registers to which settings were made before entering the standby state.