Timer Load Register (Tlr); Timer Compare Register (Tcpr); Timer Count Register (Tcr) - Motorola DSP56305 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

9.3.4

Timer Load Register (TLR)

The Timer Load Register (TLR) is a twenty-four bit write-only register. In all modes, the
counter is preloaded with the TLR value after the TE bit (TCSR Bit 0) is set and a first
event occurs.
If the TRM bit is set:
• In Timer modes(0-3), the counter is reloaded each time after it has reached the
value contained by the Timer Compare Register and the new event occurs.
• In Measurement modes (4-5), if the TE bit is also set, the counter is reloaded with
the TLR value on each appropriate edge of the input signal.
• In the PWM mode (7) the counter is reloaded each time after it has overflowed
and the new event occurs.
• In Watchdog (9-10) modes, the counter is reloaded each time after it has reached
the value contained in the Timer Compare Register (TCPR) and the new event
occurs. In these modes, the counter is also reloaded whenever the TLR is written
with a new value while the TE bit is set.
If the TRM bit is cleared, in all modes the counter operates as a free-running counter.
9.3.5

Timer Compare Register (TCPR)

The Timer Compare Register (TCPR) is a twenty-four bit read/write register that
contains the value to be compared with the counter value. These two values are
compared every timer clock after the TE bit (TCSR Bit 0) is set. When the values match,
the Timer Compare Flag (TCF) bit (TCSR Bit 21) is set and an interrupt is generated if
interrupts are enabled (i.e., the Timer Compare Interrupt Enable (TCIE) bit (TCSR Bit 2)
is set). The TCPR is ignored in Measurement modes.
9.3.6

Timer Count Register (TCR)

The Timer Count Register (TCR) is a twenty-four bit read-only register. In Timer and
Watchdog modes, the counter's contents can be read at any time by reading the TCR. 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 TIO signal is used for the input signal.
MOTOROLA
DSP56305 User's Manual
Timer/Event Counter
Timer Architecture
9-17

Advertisement

Table of Contents
loading

Table of Contents