English
Language : 

M16C65 Datasheet, PDF (808/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
31. Precautions
31.18.4 Time Reading Procedure of Real-Time Clock Mode
In real-time clock mode, read time data bits (1) when the BSY bit in the RTCSEC register is 0 (not while
data is updated).
When reading multiple registers, if data is rewritten between reading registers, an errant time will be
read.
In order to prevent this, use the reading procedure shown below.
• Using an interrupt
Read necessary contents of time data bits in the real-time clock interrupt routine.
• Monitoring by a program 1
Monitor the IR bit in the RTCTIC register by a program and read necessary contents of time data
bits after the IR bit in the RTCTIC register becomes 1 (periodic interrupt request generated).
• Monitoring by a program 2
(1)Monitor the BSY bit.
(2)Monitor until the BSY bit becomes 0 after the BSY bit becomes 1 (the BSY bit is set to 1 for
approximately 62.5 ms).
(3)Read necessary contents of time data bits after the BSY bit becomes 0.
• Using read results if they are the same value twice
(1)Read necessary contents of time data bits.
(2)Read the same bit as (1) and compare the contents.
(3)Recognize as the correct value if the contents match. If the contents do not match, repeat until
the read contents match with the previous contents.
Also, when reading several registers, read them as continuously as possible.
Note:
1. Time data bits are shown below.
Bits SC12 to SC10 and SC03 to SC00 in the RTCSEC register
Bits MN12 to MN10 and MN03 to MN00 in the RTCMIN register
Bits HR11 to HR10 and HR03 to HR00 in the RTCHR register
Bits WK2 to WK0 in the RTCWK
The RTCPM bit in the RTCCR1 register
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 773 of 791