CHAPTER 9 TIMER/COUNTER FUNCTION
400
User’s Manual U15195EJ5V0UD
9.5.4 Control register
(1) Timer control register 4 (TMC4)
The TMC4 register controls the operation of timer 4.
This register can be read/written in 8-bit or 1-bit units.
Caution The TM4CAE0 bit and other bits cannot be set at the same time. Be sure to set the
TM4CAE0 bit and then set the other bits and the other registers of TM4.
7
0
TMC4
6
CS2
5
CS1
4
CS0
3
0
2
0
<1>
TM4CE0
<0>
TM4CAE0
Address
FFFFF544H
After reset
00H
Bit position
Bit name
Function
Selects the TM4 count clock.
CS2 CS1 CS0
Count
clock
0 0 0
f
XX
/4
0 0 1
f
XX
/8
0 1 0
f
XX
/16
0 1 1
f
XX
/32
1 0 0
f
XX
/64
1 0 1
f
XX
/128
1 1 0
f
XX
/256
1 1 1
f
XX
/512
6 to 4
CS2 to CS0
Caution Do not change the CS2 to CS0 bits during timer operation. If they
are to be changed, they must be changed after setting the TM4CE0
bit to 0. If the CS2 to CS0 bits are overwritten during timer
operation, the operation is not guaranteed.
1 TM4CE0
Controls the operation of TM4.
0: Count disabled (timer stopped at 0000H and does not operate)
1: Count operation performed
Caution The TM4CE0 bit is not cleared even if a match is detected by the
compare operation. To stop the count operation, clear the TM4CE0
bit.
0 TM4CAE0
Controls the internal count clock.
0: Entire TM4 unit asynchronously reset. Base clock (f
CLK
) supply to TM4 unit
stopped.
1: Base clock (f
CLK
) supplied to TM4 unit.
Cautions 1. When TM4CAE0 = 0 is set, the TM4 unit can be reset
asynchronously.
2. When TM4CAE0 = 0, the TM4 unit is in a reset state. To operate
TM4, first set TM4CAE0 = 1.
3.
When the TM4CAE0 bit is changed from 1 to 0, all the registers
of the TM4 unit are initialized. When again setting TM4CAE0 =
1, be sure to then set all the registers of the TM4 unit again.
Содержание PD703114
Страница 2: ...2 User s Manual U15195EJ5V0UD MEMO ...