r5f21368sdfp Renesas Electronics Corporation., r5f21368sdfp Datasheet - Page 384

no-image

r5f21368sdfp

Manufacturer Part Number
r5f21368sdfp
Description
Renesas Mcu R8c Family / R8c/3xt-a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
r5f21368sdfp#V0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
Under development
R8C/36T-A Group
R01UH0240EJ0001 Rev.0.01
Apr 28, 2011
Figure 18.7
18.3.3.2
If the data of seconds, minutes, hours, days of the week, days, months, and years is updated while reading the
time, a correct time will not be obtained, so the time must be read again. Figure 18.7 shows an Example when
Correct Time is not Obtained. In this example, only the TRESEC register is read after the data is updated,
resulting an error of approximately 1 minute.
There are the following four methods for reading a correct time:
• Monitoring method by a program 1
• Monitoring method by a program 2
(1) Enable a periodic interrupt.
(2) Monitor the RTCF bit in the TREIFR register.
(3) Confirm the RTCF bit is set to 1 (interrupt requested).
(4) Check the BSY bit is 0 (data not being updated).
(5) Read the above data registers.
• Using an interrupt
• Using the values read only if they are the same value twice
Check the BSY bit in the TRESEC register, and read the data registers of seconds, minutes, hours, days of the
week, days, months, and years after the BSY bit changes from 1 to 0. After the BSY bit is set to 1, the registers
are updated after approximately 15.625 ms, and this bit is set to 0.
Read the data registers of seconds, minutes, hours, days of the week, days, months, and years in the following
order:
Read the required contents of the data registers of seconds, minutes, hours, days of the week, days, months,
and years in the timer RE2 interrupt routine.
Read the data registers of seconds, minutes, hours, days of the week, days, months, and years consecutively
twice, and use the data if the read data is the same.
[Before update]
BSY bit = 0 (data not being updated)
Read the year data register
Read the month data register
Read the day data register
Read the day-of-the week data register 05h
Read the hour data register
Read the minute data register
Read the second data register
BSY bit = 1 (data being updated)
[After update]
BSY bit = 0 (data not being updated)
Read the second data register
TREYR register = 06h, TREMON register = 07h, TREDY register = 28h, TREWK register = 05h,
TREHR register = 09h, TREMIN register = 53h, TRESEC register = 59h
TREYR register = 06h, TREMON register = 07h, TREDY register = 28h, TREWK register = 05h,
TREHR register = 09h, TREMIN register = 54h, TRESEC register = 00h
Preliminary document
Specifications in this document are tentative and subject to change.
Time Reading Procedure
Example when Correct Time is not Obtained
59h
00h
06h
07h
28h
09h
53h
Page 353 of 725
18. Timer RE2

Related parts for r5f21368sdfp