CEVT1
CEVT2
CEVT1
FFFFFFFF
CTR[0−31]
00000000
CAPx pin
t
MOD4
CTR
CAP1
CAP2
CAP3
CAP4
Capture registers [1−4]
CEVT3
CEVT4
0
1
2
3
0
1
XX
XX
t
2
XX
t
3
XX
t
4
T
1
T
2
T
3
T
4
CTR value at CEVT1
t
1
All capture values valid
(can be read) at this time
Polarity selection
Enhanced Capture (eCAP) Module
15.3.3.3 Time Difference (Delta) Operation Rising Edge Trigger Example
shows how the eCAP module can be used to collect Delta timing data from pulse train
waveforms. Here Continuous Capture mode (TSCTR counts-up without resetting, and Mod4 counter
wraps around) is used. In Delta-time mode, TSCTR is Reset back to Zero on every valid event. Here
Capture events are qualified as Rising edge only. On an event, TSCTR contents (time-stamp) is captured
first, and then TSCTR is reset to Zero. The Mod4 counter then increments to the next state. If TSCTR
reaches FFFF FFFFh (maximum value), before the next event, it wraps around to 0000 0000h and
continues, a CNTOVF (counter overflow) Flag is set, and an Interrupt (if enabled) occurs. The advantage
of Delta-time Mode is that the CAPn contents directly give timing data without the need for CPU
calculations: Period1 = T
1
, Period2 = T
2
,…etc. As shown in
, the CEVT1 event is a good
trigger point to read the timing data, T
1
, T
2
, T
3
, T
4
are all valid here.
Figure 15-111. Capture Sequence for Delta Mode Time-Stamp, Rising Edge Detect
1623
SPRUH73H – October 2011 – Revised April 2013
Pulse-Width Modulation Subsystem (PWMSS)
Copyright © 2011–2013, Texas Instruments Incorporated