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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

TIMER/EVENT COUNTER MODES OF OPERATION

7.5.7 Timer Mode 7 (Standard Timer Mode, External Clock)

Timer Mode 7 is defined by TC2-TC0 equal 111.

With the timer enabled (TE=1), the counter is loaded with the value contained by the TCR. The counter is decremented by the transitions of the signal coming in on the TIO input pin. At the transition that occurs after the counter has reached 0, the TS bit in TCSR is set and, if the TIE is set, the timer generates an interrupt. The counter is reloaded with the value

Start Event

Stop Event

Start Event

TE

Clock

TCR xxx

 

 

 

 

N

Counter yyy

0

1

N-1

N

0

Interrupt

TIO

Figure 7-9 Pulse Width Measurement Mode (INV=1)

7 - 14 DSP56002 TIMER AND EVENT COUNTER MOTOROLA

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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

TIMER/EVENT COUNTER BEHAVIOR DURING WAIT and STOP

contained by the TCR, and the entire process is repeated until the timer is disabled (TE=0). The INV bit determines whether 0-to-1 transitions (INV=0) or 1-to-0 transitions (INV=1) will decrement the counter. Figure 7-14 illustrates Timer Mode 7 when INV=0, and Figure 7-15 illustrates Timer Mode 7 when INV=1.

7.6TIMER/EVENT COUNTER BEHAVIOR DURING WAIT and STOP

During the execution of the WAIT instruction, the timer clocks are active and the timer activity continues undisturbed. If the timer interrupt is enabled when the final event occurs, an interrupt will be generated and serviced.

It is recommended that the timer be disabled before executing the STOP instruction because during the execution of the STOP instruction, the timer clocks are disabled and the timer activity will be stopped. If, for example, the TIO pin is used as input, the changes

Periodic Event (First Event)

Periodic Event

TE

 

 

 

 

 

 

Clock

 

 

 

 

 

 

TCR N

 

N + 1

 

M

 

 

Counter

N

N+1

N+2

M-1 M

M+1

M+2

Interrupt

 

 

 

 

 

 

TIO

Figure 7-10 Period Measurement Mode (INV=0)

MOTOROLA DSP56002 TIMER AND EVENT COUNTER 7 - 15

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

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