INTRODUCTION
MOTOROLA
DSP56002 TIMER AND EVENT COUNTER
7 - 3
7.1
INTRODUCTION
This section describes the timer/event counter module
*
. The timer can use internal or ex-
ternal clocking and can interrupt the processor after a number of events (clocks) specified
by a user program, or it can signal an external device after counting internal events.
The timer connects to the external world through the bidirectional TIO pin. When TIO is
used as input, the module is functioning as an external event counter or is measuring ex-
ternal pulse width/signal period. When TIO is used as output, the module is functioning as
a timer and TIO becomes the timer pulse. When the TIO pin is not used by the timer mod-
ule it can be used as a general purpose I/O (GPIO) pin.
Note:
When the timer is disabled, the TIO pin becomes three-stated. To prevent undes-
ired spikes from occurring, the TIO pin should be pulled up or down when it is not
in use.
7.2
TIMER/EVENT COUNTER BLOCK DIAGRAM
Figure 7-1 shows a block diagram of the timer module. It includes a 24-bit read-write Tim-
er Control and Status Register (TCSR), a 24-bit read-write Timer Count Register (TCR),
a 24-bit counter, and logic for clock selection and interrupt generation.
* The first version of the DSP56002 (mask number D41G) did not have the timer/event counter. Later versions of the DSP56002 which have
different mask numbers do have the timer/event counter. This mask number can be found below the part number on each chip.
24-bit Timer Count
GDB
24
24
24-bit Timer Control/
Status Register (TCSR)
24
24
Timer interrupt
Clock select
CLK/2
TIO
3
Figure 7-1 Timer/Event Counter Module Block Diagram
24-bit Counter
Register (TCR)
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
.
..