Operating Modes
9
-16
DSP56303 User’s Manual
9.3.2.2 Measurement Input Period (Mode 5)
In Mode 5, the timer counts the period between the reception of signal edges of the same
polarity across the
TIO
signal. The value of the INV bit determines whether the period is
measured between consecutive low-to-high (0 to 1) transitions of
TIO
or between consecutive
high-to-low (1 to 0) transitions of
TIO
. If INV is set, high-to-low signal transitions are
selected. If INV is cleared, low-to-high signal transitions are selected. After the first
appropriate transition occurs on the
TIO
input signal, the counter is loaded with the TLR
value. On the next signal transition of the same polarity that occurs on
TIO
, TCSR[TCF] is set,
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
TIO
signal. After the second signal transition, if the TCSR[TRM] bit
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.
Bit Settings
Mode Characteristics
TC3
TC2
TC1
TC0
Mode
Name
Function
TIO
Clock
0
1
0
1
5
Input period
Measurement
Input
Internal
Figure 9-13. Period Measurement Mode, TRM = 1
Mode 5 (internal clock): TRM = 1
N = write preload
M = write compare
TE
Clock
(CLK/2 or prescale CLK)
TLR
TCR
Counter
first event
M
0
N
N + 1
M
N
N + 1
N
NOTE: If INV = 1, a 1-to-0 edge on TIO loads the counter, and a 0-to-1 edge on TIO
TCF (Compare Interrupt if TCIE = 1)
TIO pin
period being measured
loads TCR with count and the counter with N.
Interrupt Service
reads TCR; period
= M - N clock
periods
Counter continues
counting, does
not stop
Содержание DSP56303
Страница 1: ...DSP56303 User s Manual 24 Bit Digital Signal Processor DSP56303UM AD Revision 1 January 2001 ...
Страница 52: ...JTAG OnCE Interface 2 22 DSP56303 User s Manual ...
Страница 114: ...General Purpose Input Output GPIO 5 10 DSP56303 User s Manual ...
Страница 212: ...GPIO Signals and Registers 8 26 DSP56303 User s Manual ...
Страница 268: ...Interrupt Equates A 22 DSP56303 User s Manual ...
Страница 306: ...Programming Sheets B 38 DSP56303 User s Manual ...
Страница 320: ...Index 14 DSP56303 User s Manual ...