beautypg.com

Motorola DSP96002 User Manual

Page 815

background image

MOTOROLA

33

the status of the INV bit is crucial to the timer’s function. Change it only when the timer is
disabled (TE=0).

6.2.4

Timer Control (TC2-TC0) Bits 28-26

The three TC bits control the source of the timer clock, the behavior of the TIO pin, and
the timer mode of operation. Table 2 summarizes the functionality of the TC bits.

A detailed description of the timer operating modes is given in Section 6.4 on page 35.

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 the timer is disabled (TE=0) to
ensure proper functionality.

* - the GPIO function is enabled only if TC2-TC0 are all 0 (zero) and the GPIO bit is set.

6.2.5

General Purpose IO (GPIO) Bit 25

If the GPIO bit is set (GPIO=1) and if TC2-TC0 are all zeros, the TIO pin operates as a
general purpose IO pin, whose direction is determined by the DIR bit. If GPIO=0 the gen-
eral purpose IO 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

Table 2 TC Bit Functionality

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

Undefined

1

1

1

Input

External

Event Counter (Mode 7)