Page 2 of 2
Re: rotary encoder using timer feature
Posted: Sun Nov 19, 2017 7:55 am
by ep.hobbyiest
Great.
Which repository did you refer?
did you do any changes related to interrupt routine?
I merge following files.

- aa.JPG (13.55 KiB) Viewed 2112 times
Re: rotary encoder using timer feature
Posted: Mon Nov 20, 2017 2:00 am
by wayne
I used the driver you posted. Manually merged them into a test environment.
I did not modify any code.
I ran into the same issues you appeared to have.
Normally I use the qei driver with the community overlay. Have not had any issues.
The overlay initializes the used drivers.( See hal_community.c )
Since you are not using the community overlay the qeiInit() does not get called.
In my opinion, I would use the community overlay.
Having said that, this way sure forces you to understand some of what's going on.
Re: rotary encoder using timer feature
Posted: Mon Nov 20, 2017 3:47 am
by ep.hobbyiest
Thanks Wayne.
i tried same example again and found that i didn't called init function. Now it is working fine.
Now, i am figuring out debounce for rotary encoder. B'coz after rorate 1 tick of encoder it is giving value between 1-4.