English
Language : 

HD6417750RF240DV Datasheet, PDF (383/1132 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH™ RISC engine Family / SH7750 Series
SH7750, SH7750S, SH7750R Group
Section 11 Realtime Clock (RTC)
Disable carry interrupts
Clear carry flag
Read counter register
Clear RCR1.CIE to 0
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Yes
Carry flag = 1?
No
Read RCR1 register and check CF bit
(a) Reading time without using interrupts
Clear carry flag
Enable carry interrupts
Clear carry flag
Read counter register
Set RCR1.CIE to 1
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Yes
Interrupt generated?
No
Disable carry interrupts
Clear RCR1.CIE to 0
(b) Reading time using interrupts
Figure 11.3 Examples of Time Reading Procedures
If a carry occurs while the time is being read, the correct time will not be obtained and the read
must be repeated. The procedure for reading the time without using interrupts is shown in (a), and
the procedure using carry interrupts in (b). The method without using interrupts is normally used
to keep the program simple.
R01UH0456EJ0702 Rev. 7.02
Sep 24, 2013
Page 331 of 1076