AnsweredAssumed Answered

ADC trigger via FTM channels Rising edge or Falling edge

Question asked by yu wu on Dec 16, 2018
Latest reply on Dec 18, 2018 by Kerry Zhou

Hi, Now I have a problem that I can't solve.I want to use the FTM channel pin to trigger the ADC acquisition, such as FTM0-> CH0,FTM1-> CH0 or FTM0-> CH0,If the channels  have a Rising edge or Falling edge,it can trigger ADC,if channels have no edge,it do not trigger ADC;but now if I add FTM1->EXTTRIG |=FTM_EXTTRIG_INITTRIGEN_MASK;It will trigger automatically and do not stop;I want to know if the FTM channel can trigger ADC like that?  Thank you!

Here's FTM1 initialization.

 

SIM->SCGC6 |= SIM_SCGC6_FTM1_MASK;
FTM1->MOD = period -1;
FTM1->CNTIN =0;
FTM1->CNT =0;
FTM1->SC= FTM_SC_CLKS(1)|FTM_SC_PS(7);

//FTM1->EXTTRIG |=FTM_EXTTRIG_CH1TRIG_MASK;

FTM1->EXTTRIG |=FTM_EXTTRIG_INITTRIGEN_MASK;

Outcomes