cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Rotary Encoder Pulse Count

JPanc.1
Associate II

Is it proper way to to count encoder pulses using rising/falling edge interrupt instead of using Timer in Encoder Mode??

Because in my application I need interrupt above 80000 pulse count. But here timer is of 16-bit (STM32F103C8T6) so it can only count up to 65535.

So please suggest me better option and help me to solve out this.

1 REPLY 1
Uwe Bonnes
Principal III

No. Use Encoder mode. Sample Encoder count so often that in all case less then 2^15 pulses have arrived. Use add difference to last count value to externak 32 bit variable.