Timer Compare Register (Tcpr) - Motorola DSP56367 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

13.3.6

TIMER COMPARE REGISTER (TCPR)

The TCPR is a 24-bit read/write register that contains the value to be compared to the counter
value. These two values are compared every timer clock after the TE bit in the TCSR is set.
When the values match, the timer compare flag (TCF) bit is set and an interrupt is generated if
interrupts are enabled (if the timer compare interrupt enable (TCIE) bit in the TCSR is set).
The programmer must initialize the TCPR to ensure correct operation in the appropriate timer
operating modes. The TCPR is ignored in measurement modes.
13.3.7
TIMER COUNT REGISTER (TCR)
The TCR is a 24-bit read-only register. In timer and watchdog modes, the counter's contents
can be read at any time by reading the TCR register. In measurement modes, the TCR is
loaded with the current value of the counter on the appropriate edge of the input signal, and its
value can be read to determine the width, period, or delay of the leading edge of the input
signal. When the timer is in measurement modes, the TIO0 signal is used for the input signal.
13.4
TIMER MODES OF OPERATION
Each timer has various operational modes that meet a variety of system requirements. These
modes are as follows:
Timer
– GPIO, mode 0: Internal timer interrupt generated by the internal clock
– Pulse, mode 1: External timer pulse generated by the internal clock
– Toggle, mode 2: Output timing signal toggled by the internal clock
– Event counter, mode 3: Internal timer interrupt generated by an external clock
Measurement
– Input width, mode 4: Input pulse width measurement
– Input pulse, mode 5: Input signal period measurement
– Capture, mode 6: Capture external signal
PWM, mode 7: Pulse Width Modulation
Watchdog
– Pulse, mode 9: Output pulse, internal clock
MOTOROLA
DSP56367
Timer/ Event Counter
Timer Modes of Operation
13-13

Advertisement

Table of Contents
loading

Table of Contents