![Hitachi H8/3152 Hardware Manual Download Page 64](http://html.mh-extra.com/html/hitachi/h8-3152/h8-3152_hardware-manual_140481064.webp)
60
to TCNT in the 4-kbyte area defined by TCWA. Any value can be specified as an operand (write
data) of the reloading instruction; the initially written data is always reloaded to TCNT.
In sleep mode, or during EEPMOV instruction execution, TCNT suspends counting without being
initialized.
5.2.2
Timer Control/Status Register (TCSR)
TCSR is an 8-bit readable and writable register that controls the WDT, for example, when
selecting the clock input to TCNT.
TCSR is initialized to H'2C at reset, but not reset in sleep mode. The CS1 and CS0 bits can be
written to only once after reset. Once written to, they cannot be written to again until the chip is
reset by a low-level input to the
RES
pin.
Bit:
7
6
5
4
3
2
1
0
UDF
EWE
—
HLT
—
—
CS1
CS0
Initial value:
0
0
1
0
1
1
0
0
Read/Write:
R
R/W*
R
R/W
R
R
R/W
R/W
Note:
Only 1 can be written to bit 6 to set the flag.
Bit 7—Underflow Flag (UDF): Indicates that a UDF interrupt was issued due to TCNT
underflow (H'00
→
H'FF).
Bit 7: UDF
Description
0
[Clearing condition]
When RTE instruction is executed while UDF = 1
(Initial value)
1
[Setting condition]
When TCNT underflow occurs (H'00
→
H'FF)
Bit 6—ECR Write Enable (EWE): Enables writing to ECR before writing to EEPROM. An
EWE interrupt is issued when 1 is written to this bit. When the EWE bit is 0, writing to ECR is
ignored. Regardless of the EWE bit setting, ECR can always be read.
Bit 6: EWE
Description
0
[Clearing condition]
When EEPMOV instruction execution ends
(Initial value)
1
[Setting condition]
When 1 is written to this bit while it is 0