AnsweredAssumed Answered

How to use TIM1 [Encoder interface mode]

Question asked by lu.zeyan on Nov 5, 2012
I want capture signal like

encoder.png


I want capture how many times yellow signal is high on the falling edge of blue signal in 1 second 

my code is 

TIM1_TimeBaseInit(0, TIM1_CounterMode_Up, 50000, 0);
     
TIM1_EncoderInterfaceConfig(TIM1_EncoderMode_TI1,
     TIM1_ICPolarity_Rising,TIM1_ICPolarity_Falling);

TIM1_Cmd(ENABLE);


but the counter always 0 , after 1 second 
Is there any guide for use TIM1 encoder interface mode.

Outcomes