Event Capture

Target Category: C2407, F281X, MSP430, STM32

Target Sub-Category: Capture

Description: The Event Capture block allows you to monitor an input pin (CAP1 ,CAP2, CAP3, CAP4, CAP5, CAP6) and capture a transition event (rising edge, falling edge, or both) by sampling the current value of a timer on occurrence of the event. The Event Capture block counts from 0 to 32,767 (hexadecimal 7FFF) and then wraps back. The Timer Rate Scaling parameter allows the base clock rate to be scaled down to up to 1/128 of the base rate. The output of the Event Capture block is a time interval delta t, which is the interval between two successive events. The Speed Calculator block can use this to determine the speed.

Additional information: Texas Instruments SPRU357 document.

Event Trigger: The choices are Rising Edge, Falling Edge, Both Edges, and Quadrature (pin 1 and 2).

Input Pin: Selects the input pin to monitor. Input pins CAP 1-3 are controlled by Event Manager 1; and input pins CAP 4-6 are controlled by Event Manager 2. The input pins CAP 1-2 and 4-5 can also be used as quadrature encoder inputs. CAP 1-3 can use either Timer 1 or 2 as the sampling base, and CAP 4-6 can use either timer 3 or 4 as the sampling base.

Mux Pin: Selects the physical pin on the device a given function is on.

Note: Some F280x and MSP430 devices have different functions for the same physical pin on the chip. This is referred to as multiplexing, or muxing, for short, and is done because pins are expensive. Because multiple functions compete for a given pin, you must choose what function a pin has. For flexibility, in some cases Texas Instruments provides multiple pins for a given function. For instance, the CANTXB function can be on pin 8, 12, or 16. Pin 8 is shared with ePWM5A and ADCSOCA0; pin 12 is shared with TZ1 and SPISIMOB; and pin16 is shared with SPISIMOA and TZ5. If you want ePWM5A on a pin, you cannot use pin 8 for CANTXB, but rather use pin 12 or 16.

Timer Rate Scaling: Select from available fractional time rate multipliers to reduce the timer rate. Fractional rates of up to 1/128th the basic rate are possible.

Timer Source: The available choices depend on the choice of the input pin. Input pins 1 – 3 can use either Timer 1 or Timer 2. Input pins 4 – 6 can use Timer 3 or Timer 4. Input pins 4 – 6 are available for C2407 only.