AnsweredAssumed Answered

inputcaute cannotwork?how can I do

Question asked by 博 姜 on Jul 2, 2017

ftm_state_t inputftmStateStruct;
ftm_state_t ftmStateStruct;
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_FORCIBLE);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);

FTM_DRV_Init(INST_FLEXTIMER2, &flexTimer2_InitConfig,&ftmStateStruct);
FTM_DRV_InitPwm(INST_FLEXTIMER2, &flexTimer2_PwmConfig);
// FTM_DRV_UpdatePwmChannel(INST_FLEXTIMER2, 0U, FTM_PWM_UPDATE_IN_DUTY_CYCLE, 8000, 0U, true);

FTM_DRV_Init(INST_FLEXTIMER1, &flexTimer1_InitConfig,&inputftmStateStruct);
FTM_DRV_InitInputCapture(INST_FLEXTIMER1, &flexTimer1_InputCaptureConfig);
while(1)
{

count = FTM_DRV_GetInputCaptureMeasurement(INST_FLEXTIMER1,0U);
exit_code++;

}

 

this is my code ,but can not work count always is 57428

Outcomes