Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Сигнальный МП Motorola DSP56002.pdf
Скачиваний:
16
Добавлен:
26.05.2014
Размер:
2.28 Mб
Скачать

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

TIMER CONTROL/STATUS REGISTER (TCSR)

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.4Timer 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 RESETand 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.

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)

 

 

 

 

 

 

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

7.4.5General 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 general 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.6Timer Status (TS) Bit 7

When the TS bit is set, it indicates that the counter has been decremented to zero.

7 - 6 DSP56002 TIMER AND EVENT COUNTER MOTOROLA

For More Information On This Product, Go to: www.freescale.com

Соседние файлы в предмете Радиоприемные устройства