TIMER/EVENT COUNTER MODES OF OPERATION
MOTOROLA
DSP56002 TIMER AND EVENT COUNTER
7 - 13
7.5.6
Timer Mode 6 (Standard Time Counter Mode, External Clock)
Time Mode 6 is defined by TC2-TC0 equal 110.
With the timer enabled (TE=1) the counter is loaded with the 1’s complement of the value
contained by the TCR. The counter is incremented by the transitions on the incoming sig-
nal on the TIO input pin. After each increment, the counter value is loaded into the TCR.
Thus, reading the TCR will give the value of the counter at any given moment. At the tran-
sition following the point where the counter reaches 0, the TS bit in TCSR is set and, if
the TIE is set, an interrupt is generated.The counter will wrap around and the process is
repeated until the timer is disabled (TE=0). The INV bit determines whether 0-to-1 tran-
sitions (INV=0) or 1-to-0 transitions (INV=1) will increment the counter. Figure 7-12
illustrates Timer Mode 6 when INV=0. Figure 7-13 illustrates Timer Mode 7 when INV=1.
TE
TCR
Start Event
Clock
Counter
0
N-1
N
Interrupt
1
TIO
Start Event
0
Stop Event
N
Figure 7-8 Pulse Width Measurement Mode (INV=0)
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..