298
Chapter 10
Timer
Preliminary User’s Manual U15839EE1V0UM00
(1)
Timer D counter Register (TMDn) (n = 0, 1)
Timer Dn is a 16-bit timer. It is mainly used as an interval timer for software (n = 0, 1).
Starting and stopping TMDn is controlled by the CE bit of the Timer Dn control register (TMCDn).
A division by the prescaler can be selected for the count clock from among f
PCLK
/2 and f
PCLK
/256
in 8 steps by the CS2 to CS0 bits of the TMCDn register.
TMDn is read-only in 16-bit units.
Figure 10-19:
Timer Dn counter register (TMDn) (n = 0, 1)
The conditions for which the TMDn register becomes 0000H are shown below.
• Reset input
• CAE bit = 0
• CE bit = 0
• Match of TMDn register and CMDn register
• Overflow
Cautions: 1. If the CAE bit of the TMCDn register is cleared to "0", a reset is performed
asynchronously.
2. If the CE bit of the TMCDn register is cleared to "0", a reset is performed,
synchronized with the internal clock. Similarly, a synchronized reset is performed
after a match with the CMDn register and after an overflow.
3. The count clock must not be changed during a timer operation. If it is to be
overwritten, it should be overwritten after the CE bit is cleared to "0".
4. Up
to f
PCLK
/2 clocks are required after a value is set in the CE bit until the set
value is transferred to internal units. When a count operation begins, the count
cycle from 0000H to 0001H differs from subsequent count cycles.
5. After a compare match is generated, the timer is cleared at the next count clock.
Therefore, if the division ratio is large, the timer value may not be zero even if the
timer value is read immediately after a match interrupt is generated.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Address
Initial
value
TMD0
FFFF F540H 0000H
TMD1
FFFF F550H 0000H
Summary of Contents for mPD703128
Page 6: ...6 Preliminary User s Manual U15839EE1V0UM00 ...
Page 20: ...20 Preliminary User s Manual U15839EE1V0UM00 ...
Page 32: ...32 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 154: ...154 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 238: ...238 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 356: ...356 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 522: ...522 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 600: ...600 Preliminary User s Manual U15839EE1V0UM00 MEMO ...
Page 610: ...610 Preliminary User s Manual U15839EE1V0UM00 ...
Page 612: ......