eCAP
7 - 38 C2000 Microcontroller Workshop - Control Peripherals
Some Uses for the Capture Module
Problem: At low speeds, calculation of speed
based on a measured position change at
fixed time intervals produces large estimate
errors
Alternative: Estimate the speed using a measured time interval
at fixed position intervals
Signal from one
quadrature
encoder channel
Low speed velocity estimation from incr. encoder:
Measure the time width of a pulse
v
k
≈
∆x
t
k
- t
k-1
v
k
≈
∆t
x
k
- x
k-1
∆x
Auxiliary PWM generation
eCAP Module Block Diagram – Capture Mode
32-Bit
Time-Stamp
Counter
Capture 1
Register
Event
Prescale
Polarity
Select 1
Polarity
Select 2
Polarity
Select 3
Polarity
Select 4
Capture 2
Register
Capture 3
Register
Capture 4
Register
Event Logic
ECAPx
pin
SYSCLKOUT
CAP1POL
CAP2POL
CAP3POL
CAP4POL
PRESCALE
The capture module features a 32-bit time-stamp counter to minimize rollover. Each module has
four capture registers. Polarity can be set to trigger on rising or falling edge, and trigger events