Timer Load Register (Tlr); Timer Compare Register (Tcpr); Timer Count Register (Tcr) - Freescale Semiconductor DSP56374 User Manual

24-bit digital signal
Table of Contents

Advertisement

Mode
INV = 0
6
Event is captured on the
rising edge of the signal
from the TIO signal.
7
9
10
9.4.5

Timer Load Register (TLR)

The TLR is a 24-bit write-only register. In all modes, the counter is preloaded with the TLR value after the TCSR[TE] bit is set and a first
event occurs.
In timer modes, if the TCSR[TRM] bit is set, the counter is reloaded each time after it reaches the value contained by the timer
compare register and the new event occurs.
In measurement modes, if TCSR[TRM] and TCSR[TE] are set, the counter is reloaded with the value in the TLR on each
appropriate edge of the input signal.
In PWM modes, if TCSR[TRM] is set, the counter is reloaded each time after it overflows and the new event occurs.
In watchdog modes, if TCSR[TRM] is set, the counter is reloaded each time after it reaches the value contained by the timer compare
register and the new event occurs. In this mode, the counter is also reloaded whenever the TLR is written with a new value while
TCSR[TE] is set.
In all modes, if TCSR[TRM] is cleared (TRM = 0), the counter operates as a free-running counter.
9.4.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 TCSR[TE] is set. When the values match, the timer compare flag bit is set and an interrupt is generated if interrupts are
enabled (that is, the timer compare interrupt enable bit in the TCSR is set). The TCPR is ignored in measurement modes.
9.4.7

Timer Count Register (TCR)

The TCR is a 24-bit read-only register. In timer and watchdog modes, the contents of the counter can be read at any time from 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 mode, the TIO signal
is used for the input signal.
Freescale Semiconductor
Table 9-4. Inverter (INV) Bit Operation (continued)
TIO Programmed as Input
INV = 1
Event is captured on the
falling edge of the signal
from the TIO signal.
DSP56374 Users Guide, Rev. 1.2
Triple Timer Module Programming Model
TIO Programmed as Output
INV = 0
Pulse generated by
Pulse generated by the
the timer has
timer has negative
positive polarity.
polarity.
Pulse generated by
Pulse generated by the
the timer has
timer has negative
positive polarity.
polarity.
Pulse generated by
Pulse generated by the
the timer has
timer has negative
positive polarity.
polarity.
INV = 1
9-25

Advertisement

Table of Contents
loading

Table of Contents