CHAPTER 9 TIMER/COUNTER FUNCTION
380
User’s Manual U15195EJ5V0UD
9.4.6 Operation
(1) Count operation
Timer 3 can function as a 16-bit free-running timer or as an external signal event counter. The setting for the
type of operation is specified by timer control register 3n (TMC3n) (n = 0, 1).
When it operates as a free-running timer, if the CC30 or CC31 register and the TM3 count value match, an
interrupt signal is generated and the timer output signal (TO3) can be set or reset. Also, a capture operation
that holds the TM3 count value in the CC30 or CC31 register is performed, synchronized with the valid edge
that was detected from the external interrupt request input pin as an external trigger. The capture value is
held until the next capture trigger is generated.
Caution When using the INTP30, TI3, and TCLR3 pins as TI3 and TCLR3, either mask the interrupt
signal to INTP30 or set the CC3n register to compare mode (n = 0 or 1).
Figure 9-89. Basic Operation of Timer 3
0001H
0000H
0002H 0003H
FBFEH FBFFH
0001H 0002H
0000H
TM3
Count clock
∆
Count disabled
TM3CE
←
0
∆
Count start
TM3CE
←
1
∆
Count start
TM3CE
←
1