r5s77631ay266bgv Renesas Electronics Corporation., r5s77631ay266bgv Datasheet - Page 845

no-image

r5s77631ay266bgv

Manufacturer Part Number
r5s77631ay266bgv
Description
Renesas 32-bit Risc Microcomputer Superhtm Risc Engine Family Sh-4a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
22.5.2
Figure 22.3 shows examples of the 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 figure
22.3 (a), and the procedure using carry interrupts in figure 22.3 (b). The method without using
interrupts is normally used to keep the program simple.
Time Reading Procedures
Yes
Yes
(a) Reading time without using interrupts
Figure 22.3 Examples of Time Reading Procedures
(b) Reading time using interrupts
Disable carry interrupts
Disable carry interrupts
Enable carry interrupts
Read counter register
Read counter register
Interrupt generated?
Clear carry flag
Clear carry flag
Clear carry flag
Carry flag = 1?
No
No
Clear RCR1.CIE to 0.
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared).
Read RCR1 register and check CF bit.
Set RCR1.CIE to 1.
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared).
Clear RCR1.CIE to 0.
Rev. 1.00 Oct. 01, 2007 Page 779 of 1956
Section 22 Realtime Clock (RTC)
REJ09B0256-0100

Related parts for r5s77631ay266bgv