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

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

TIMER CONTROL/STATUS REGISTER (TCSR)

the signal coming in on the TIO pin, depending on the timer mode. See Sections 7.5.4 and 7.5.5 for detailed descriptions of Timer Modes 4 and 5.

7.4TIMER CONTROL/STATUS REGISTER (TCSR)

The 24-bit read/write TCSR controls the timer and verifies its status. The TCSR can be accessed by normal move instructions and by bit manipulation instructions. The control and status bits are described in the following paragraphs.

7.4.1Timer Enable (TE) Bit 0

The TE bit enables or disables the timer. Setting the TE bit (TE=1) will enable the timer, and the counter will be loaded with the value contained in the TCR and will start decrementing at each incoming event. Clearing the TE bit will disable the timer. Hardware RESET and software RESET (RESET instruction) clear TE.

7.4.2Timer Interrupt Enable (TIE) Bit 1

The TIE bit enables the timer interrupts after the counter reaches zero and a new event occurs. If TCR is loaded with n, an interrupt will occur after (n+1) events.

Setting TIE (TIE=1) will enable the interrupts.When the bit is cleared (TIE=0) the interrupts are disabled. Hardware and software resets clear TIE.

7.4.3Inverter (INV) Bit 2

The INV bit affects the polarity of the external signal coming in on the TIO input and the polarity of the output pulse generated on the TIO output.

If TIO is programmed as an input and INV=0, the 0-to-1 transitions on the TIO input pin will decrement the counter. If INV=1, the 1-to-0 transitions on the TIO input pin will decrement the counter.

If TIO is programmed as output and INV=1, the pulse generated by the timer will be inverted before it goes to the TIO output pin. If INV=0, the pulse is unaffected.

In Timer Mode 4 (see Section 7.5.4 Timer Mode 4 (Pulse Width Measurement Mode)), the INV bit determines whether the high pulse or the low pulse is measured to determine input pulse width. In Timer Mode 5 (see Section 7.5.5 Timer Mode 5 (Period Measurement Mode)), the INV bit determines whether the period is measured between leading or trailing edges.

In GPIO mode, the INV bit determines whether the data read from or written to the TIO pin shall be inverted (INV=1) or not (INV=0).

INV is cleared by hardware and software resets.

Note: Because of its affect on signal polarity, and on how GPIO data is read and written,

MOTOROLA DSP56002 TIMER AND EVENT COUNTER 7 - 5

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

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