Datasheet
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
Application of the ECAP Module
www.ti.com
32.3.3 Example 3 - Time Difference (Delta) Operation Rising Edge Trigger
Figure 32-11 shows an example of 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 FFFFFFFF (maximum value), before the next event, it wraps around to 00000000 and
continues, a CNTOVF (counter overflow) Flag is set, and an Interrupt (if enabled) occurs. The advantage
of Delta-time Mode is that the CAPx contents directly give timing data without the need for CPU
calculations: Period1 = T
1
, Period2 = T
2
,…etc. As shown in the diagram, 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 32-11. Capture Sequence for Delta Mode Time-stamp and Rising Edge Detect
1658
Enhanced Capture (eCAP) Module SPNU562–May 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated