AnsweredAssumed Answered

FTM Dual-Edge Input Capture

Question asked by Jeff Freeman on Aug 1, 2019
Latest reply on Aug 2, 2019 by Jeff Freeman

I am using the frdm-KV11Z board and I am specifically using the FTM to do some measurements.

 

I have an application where I need to sample 6 inputs consecutively with dual-edge capture mode so that I can measure the pulse width.

 

I have been able to get three by doing some pin muxing between each measurement. I leveraged the following code from the SDK dual-edge example:

 

edgeParam.mode                        = kFTM_Continuous;
edgeParam.currChanEdgeMode = kFTM_RisingEdge;
edgeParam.nextChanEdgeMode = kFTM_FallingEdge;
FTM_SetupDualEdgeCapture(FTM0, kFTM_Chnl_1, &edgeParam, 0);
FTM_EnableInterrupts(FTM0, kFTM_Chnl2InterruptEnable);
FTM_EnableInterrupts(FTM0, kFTM_Chnl3InterruptEnable);

 

Above, I am using 3 channels (1, 2, 3) to do the dual-edge capture.

 

However, I found that I cannot extend this to other channels combinations for FTM0 (for example: 0,1,2 or 2,3,4).

 

Any advice?

 

Jeff

Outcomes