Period Measurement Mode, Trm = 1 - Motorola DSP56303 User Manual

24-bit digital signal processor
Table of Contents

Advertisement

Operating Modes
9.3.2.2 Measurement Input Period (Mode 5)
Bit Settings
TC3
TC2
TC1
0
1
0
In Mode 5, the timer counts the period between the reception of signal edges of the same
polarity across the
TIO
measured between consecutive low-to-high (0 to 1) transitions of
high-to-low (1 to 0) transitions of
selected. If INV is cleared, low-to-high signal transitions are selected. After the first
appropriate transition occurs on the
value. On the next signal transition of the same polarity that occurs on
and a compare interrupt is generated if the TCSR[TCIE] bit is set. The contents of the counter
load into the TCR. The TCR then contains the value of the time that elapsed between the two
signal transitions on the
is set, the TCSR[TE] bit is set to clear the counter and enable the timer. The counter is
repeatedly loaded and incremented until the timer is disabled. If the TCSR[TRM] bit is
cleared, the counter continues to increment until it overflows.
Mode 5 (internal clock): TRM = 1
N = write preload
M = write compare
TE
Clock
(CLK/2 or prescale CLK)
TLR
Counter
TCR
TIO pin
TCF (Compare Interrupt if TCIE = 1)
NOTE: If INV = 1, a 1-to-0 edge on TIO loads the counter, and a 0-to-1 edge on TIO
loads TCR with count and the counter with N.
9-16
TC0
Mode
1
5
signal. The value of the INV bit determines whether the period is
. If INV is set, high-to-low signal transitions are
TIO
input signal, the counter is loaded with the TLR
TIO
signal. After the second signal transition, if the TCSR[TRM] bit
TIO
first event
N
0
N
period being measured
Figure 9-13. Period Measurement Mode, TRM = 1
DSP56303 User's Manual
Mode Characteristics
Name
Function
Input period
Measurement
N + 1
M
TIO
Input
or between consecutive
TIO
, TCSR[TCF] is set,
TIO
N
Counter continues
counting, does
N + 1
M
not stop
Interrupt Service
reads TCR; period
= M - N clock
periods
Clock
Internal

Advertisement

Table of Contents
loading

Table of Contents