AnsweredAssumed Answered

Timer encoder overflow interrupt

Question asked by Vineeth CN on Jun 20, 2017
Latest reply on Jun 20, 2017 by Zhitai Liu

Hi All ,

   I am interfacing a quadrature encoder to TIM4 in the Encoder Mode using STM Cube with STM32F103. I set up the timer and configure the counter to counter till 1000. The function HAL_TIM_IC_CaptureCallback() is called on every interrupt. I am excepting a call back on when the counter overflow happen ie, when the count reaches to 1000 pulses in this case.

I my application i know for 1mm travel i will be getting suppose 1000 pulses, so i will set 1000 as the pre load count value and if the encoder count reaches to 1000 count i should get an interrupt.

Please help me with a solution.

 

Thanks and Regards,

Vineeth

Outcomes