rotary encoder using timer feature

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

Re: rotary encoder using timer feature

Postby ep.hobbyiest » Sun Nov 19, 2017 7:55 am

Great.
Which repository did you refer?
did you do any changes related to interrupt routine?

I merge following files.
aa.JPG
aa.JPG (13.55 KiB) Viewed 1373 times

wayne
Posts: 2
Joined: Sat Nov 18, 2017 9:03 pm

Re: rotary encoder using timer feature

Postby wayne » Mon Nov 20, 2017 2:00 am

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.

ep.hobbyiest
Posts: 94
Joined: Sun Jun 26, 2016 5:22 pm
Has thanked: 4 times
Been thanked: 1 time

Re: rotary encoder using timer feature

Postby ep.hobbyiest » Mon Nov 20, 2017 3:47 am

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.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 50 guests