
R8C/38T-A Group
18. Timer RE2
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 339 of 730
Aug 05, 2011
18.2.10 Timer RE2 Control Register (TRECR) in Real-Time Clock Mode
Notes:
1. When the RTCRST bit is set to 1, the TREYR register is set to 00b. As year 2000 is a leap year, the initial value
of the LFLAG bit is set to 1.
2. Set the RTCRST bit to 0 after setting it to 1.
Change this bit when the BSY bit in the TRESEC register is 0 (data not being updated) and the TADJSF bit in
the TREIFR register is 0 (no correction).
Change this bit when the RUN bit is set to 0 (count stops).
The LFLAG bit is set to 1 (leap year) when the value of the TREYR register is 00 or a multiple of four. When
the LFLAG bit is set to 1, the number of days in February becomes 29.
Read this bit when the BSY bit is 0 (data not being updated).
Address 00177h
Bit
b7b6
b5b4b3
b2b1b0
Symbol
After Reset
0
000
0100
After reset by
RTCRST bit in
TRECR register
0
0X
X1X0
Bit
Symbol
Bit Name
Function
R/W
b0
AADJE
Timer RE2 automatic correction
function enable bit
0: Automatic correction function disabled
(correction by software enabled)
1: Automatic correction function enabled
(correction by software disabled)
R/W
b1
TREOE
Timer RE2 output enable bit
0: TMRE2O output disabled
1: TMRE2O output enabled
R/W
b2
LFLAG
Leap year flag
0: Ordinary year
1: Leap year
R
b3
CCLR
Set to 0.
R/W
b4
RTCRST Timer RE2 reset bit
When this bit is set to 1, the registers and bits
listed in
Table 18.5 are initialized and the counter
control circuit is initialized.
R/W
b5
PM
a.m./p.m. bit
0: a.m.
1: p.m.
R/W
b6
HR24
Operating mode select bit
0: 12-hour mode
1: 24-hour mode
R/W
b7
RUN
Timer RE2 operation start bit
0: Count stops
1: Count starts
R/W