Quadrature Encoder, Device Trees and Machinekit issue

Skip to first unread message

Paulo Sherring

Sep 25, 2018, 5:25:32 PM9/25/18
to BeagleBoard
Hi, everybody!
I am having trouble trying to use machinekit, config-pin and a non default pinmux state.
What I want to do is to configure P9_27 and P9_92 to be used by the quadrature encoder peripheral and leave P9_25 alone.
If I use config-pin to configure it to qep, it disables by default pull up, which I need, since I didn't include it in my custom PCB.
If I use a custom device tree to setup QEP, all pins are claimed and I cant use P9_25 throgh machinekit, as IO.
I guess I could use a memdev like program to enable it by hand. I did it in the past, but, I feel that it is the cheaters way to do it.
I never really understood device tree, it was always trial and error or raw memory RW with me :/

In help is very welcome.
Thanks in advance.
Paulo Sherring.


Sep 26, 2018, 10:42:16 AM9/26/18
to BeagleBoard
Hi Paolo!

You could use libpruio for pinmuxing. It also provides QEP features (A freq only, AB speed and position, as well as ABI impulse synced speed and position). Find installation instructions in the on-line documentation.

Best regards.

Paulo Sherring

Sep 28, 2018, 1:36:49 PM9/28/18
to BeagleBoard
Hi, TJF! Thanks for your reply, I wasn't aware of such a lib. Will definitely look into it.
As for my issue, after a whole day trying, I  found out that there were major differences between 3.8 and 4.0+ kernel versions regarding how it deals with device tree overlays and addressing of GPIO. I was mixing dts files for the newer kernel and the older kernel. I manage to get it fully working by making a clean install of machinekit, as described in https://machinekoder.com/machinekit-debian-stretch-beaglebone-black/ .
Thanks for your input!

Best Regards.
Paulo Sherring.
Reply all
Reply to author
0 new messages