This is the documentation for the latest (main) development branch of mcuxpresso sdk. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

ftm_dual_edge_capture

Overview

The FTM project is a demonstration program of the SDK FTM driver’s dual-edge capture feature. This feature is available only on certain SoC’s. The example sets up a FTM channel-pair for dual-edge capture. Meanwhile, the capture mode is set up one-shot, using API FTM_SetupDualEdgeCapture(). Once the input signal is received and the second edge is detected, the interrupt flag will be cleared and the interrupt overflow will be disabled. The example gets the capture value of the input signal using API FTM_GetInputCaptureValue(). And this example will print the capture values and period of the input signal on the terminal window.

If high level input is detected on the channel when FTM timer starts, FTM will generate a capture event incorrectly although there is no rising edge. So this example ignore first pluse and measure second pluse. Need to ensure to input least two pluse into the channel, a pwm signal is recommended.

Supported Boards