AnsweredAssumed Answered

Encoder Interface with STM32F4

Question asked by tariq.furqan on Aug 8, 2014
Latest reply on Aug 11, 2014 by Clive One
I am trying to interface a quadrature encoder with my stm32f4. The code is almost the same as available on "micromouse" or many of the other forums.
The major problem I am facing is:

In debug mode I am able to see the counter of my Timer increase(or decrease) and I can see in real time that the previous and current counter values are slightly different. However, their difference is continually 0.
I then added an arbitrarily large delay between getting counter values and now I am able to observe a small constant difference. However, this is very crude and inaccurate.
Any suggestions on how I can get accurate difference between the counter values and then find speed from it?

Outcomes