5.11.1 Enhanced Capture (eCAP)
The Type 1 enhanced capture (eCAP) module is used in systems where accurate timing of external events is important.
Applications for the eCAP module include:
- Speed measurements of rotating machinery (for example, toothed sprockets sensed through Hall sensors)
- Elapsed time measurements between position sensor pulses
- Period and duty cycle measurements of pulse train signals
- Decoding current or voltage amplitude derived from duty cycle encoded current/voltage sensors
The eCAP module includes the following features:
- 4-event time-stamp registers (each 32 bits)
- Edge polarity selection for up to four sequenced time-stamp capture events
- CPU interrupt on any one of the four events
- Independent DMA trigger
- Single-shot capture of up to four event timestamps
- Continuous mode capture of timestamps in a 4-deep circular buffer
- Absolute time-stamp capture
- Difference (Delta) mode time-stamp capture
- 128:1 input multiplexer
- Event Prescaler
- When not used in capture mode, the eCAP module can be configured as a single channel PWM output.
The capture functionality of the Type-1 eCAP is enhanced from the Type-0 eCAP with the following added features:
- Event filter reset bit
- Writing a 1 to ECCTL2[CTRFILTRESET] will clear the event filter, the modulo counter, and any pending interrupts flags. This is useful for initialization and debug.
- Modulo counter status bits
- The modulo counter (ECCTL2[MODCTRSTS]) indicates which capture register will be loaded next. In the Type-0 eCAP, it was not possible to know the current state of modulo counter.
- DMA trigger source
- eCAPxDMA was added as a DMA trigger. CEVT[1–4] can be configured as the source for eCAPxDMA.
- Input multiplexer
- ECCTL0[INPUTSEL] selects one of 128 input signals.
- EALLOW protection
- EALLOW protection was added to critical registers.
The Input X-BAR must be used to connect the device input pins to the module. The Output X-BAR must be used to connect output signals to the OUTPUTXBARx output locations. See Section 4.4.3 and Section 4.4.4.
Figure 5-54 shows the eCAP block diagram.
A. The HRCAP submodule is not available on all eCAP modules; in this case, the high-resolution muxes and hardware are not implemented.Figure 5-54 eCAP Block Diagram