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 369 of 730
Aug 05, 2011
18.3.6
Second Adjustment Function
Two functions are provided as second adjustment functions: reset adjustment and 30-second adjustment.
18.3.6.1
Reset Adjustment Function
The reset adjustment function initializes the TRESEC register and the internal counter. When 1 is written to the
RSTADJ bit in the TREIFR register while the BSY bit in the TRESEC register is 0 (data not being updated), the
TRESEC register is set to 00h after two or three cycles of the fC1 clock, and the internal counter is initialized
and the count restarts. When 1 is written to the RSTADJ bit while the BSY bit is 1 (data is being updated), the
TRESEC register is set to 00h when the data is updated, and the internal counter is initialized and the count
restarts.
The other timer RE2 data registers are not affected during reset adjustment. After writing 1 to the RSTADJ bit,
allow four cycles of the fC1 clock to elapse before writing to the TRESEC register.
Figure 18.17
Occurrence of Reset Adjustment
When reset adjustment occurs while the BSY bit in the TRESEC register = 0
1 s
BSY bit in
TRESEC register
RSTADJ bit in
TREIFR register
Internal counter
Registers
TRESEC + TREMIN
Count operation
Initialized and count restarts
03 min 48 s
03 min 47 s
03 min 00 s
03 min 01 s
BSY calculation result
TRESEC register + 1
Reset adjustment operation
TRESEC register is set to 00h,
Internal counter is initialized and restarts
2 or 3 cycles of fC1 clock
03 min 00 s
03 min 01 s
03 min 48 s
When reset adjustment occurs while the BSY bit in the TRESEC register = 1
1 s
BSY bit in
TRESEC register
RSTADJ bit in
TREIFR register
Internal counter
Registers
TRESEC + TREMIN
Count operation
Initialized and count restarts
BSY calculation result
TRESEC register + 1
Reset adjustment operation
TRESEC register is set to 00h
Internal counter is initialized
and restarts