TIMER CONTROL/STATUS REGISTER (TCSR)
7 - 6
DSP56002 TIMER AND EVENT COUNTER
MOTOROLA
the status of the INV bit is crucial to the timer’s function. Change it only when the
timer is disabled (TE=0).
7.4.4
Timer Control (TC0-TC2) Bits 3-5
The three TC bits control the source of the timer clock, the behavior of the TIO pin, and
the timer mode of operation. Table 7-1 summarizes the functionality of the TC bits.
A detailed description of the timer operating modes is given in Chapter 3.
The timer control bits are cleared by hardware RESET and software RESET (RESET instruction).
Note 1:
If the clock is external, the counter will be decremented by the transitions on the
TIO pin. The DSP synchronizes the external clock to its own internal clock. The
external clock’s frequency should be lower than the maximum internal frequency
divided by 4 (CLK/4).
Note 2:
The TC2-TC0 bits should be changed only when TE=0 (timer disabled) to ensure
proper functionality.
* - the GPIO function is enabled only if TC2-TC0 are all 0 (zero) and the GPIO bit is set.
7.4.5
General Purpose I/O (GPIO) Bit 6
If the GPIO bit is set (GPIO=1) and if TC2-TC0 are all zeros, the TIO pin operates as a
general purpose I/O pin, whose direction is determined by the DIR bit. If GPIO=0 the gen-
eral purpose I/O function is disabled. GPIO is cleared by hardware and software resets.
Note:
The case where TC2-TC0 are not all zero and GPIO=1 is undefined and should not
be used
7.4.6
Timer Status (TS) Bit 7
When the TS bit is set, it indicates that the counter has been decremented to zero.
Table 7-1 Timer/Event Counter Control Bits
TC2
TC1
TC0
TIO
CLOCK
MODE
0
0
0
GPIO*
Internal
Timer (Mode 0)
0
0
1
Output
Internal
Timer Pulse (Mode 1)
0
1
0
Output
Internal
Timer Toggle (Mode 2)
0
1
1
—
—
Reserved - Do Not Use
1
0
0
Input
Internal
Input Width (Mode 4)
1
0
1
Input
Internal
Input Period (Mode 5)
1
1
0
Input
External
Standard Time Counter (Mode 6)
1
1
1
Input
External
Event Counter (Mode 7)
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
.
..
Содержание DSP56002
Страница 380: ......
Страница 382: ......
Страница 390: ...Freescale Semiconductor I Freescale Semiconductor Inc For More Information On This Product Go to www freescale com nc...