Use eQEP on 4.4.23-ti-r51 kernel

91 views
Skip to first unread message

Theodosis Ntegiannakis

unread,
Nov 13, 2016, 11:09:55 AM11/13/16
to BeagleBoard
Hello all,

I am trying to read a Quadrature Encoder with the Beaglebone Black using kenel  4.4.23-ti-r51 and Ubuntu.

I have enabled cape-universala
and also enabled pins P8_11 and P8_12 using
:
config-pin P8_11 qep
config-pin P8_12 qep

But i cannot find "position" or "period" in the /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/
Is there something wrong i have done?
How can i read the position using python?

Theodosis Ntegiannakis

unread,
Nov 13, 2016, 12:29:55 PM11/13/16
to BeagleBoard
Just updated kernel to 4.4.31-ti-r67.
now i can find position and period in the /sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/

but cat position keeps returning 0.

when trying to use other pins:
config-pin P8_33 qep  and
config-pin P8_35 qep
it returns invalid mode qep

the same in P8_41 and P8_42 ...

have anyone tried it? is it working?
I am not sure if it is not working or if i am looking wrong pins or my encoder doesnt work ok...
My encoder middle pin is hooked to GND and the other two pins in eqepA and eqepB respectively.

Theodosis Ntegiannakis

unread,
Nov 13, 2016, 1:44:06 PM11/13/16
to BeagleBoard
I am sorry for the multiple messages but I am finding new information every time!

eQEP just worked!
The only pins i could enable with config-pin though are P8_11, P8_12, P9_27, P9_92 (42B).
P8_33 and P8_35 still have the invalid mode qep.


Now my only problem is how to read position from python. Any help would be appreciated

Dennis Lee Bieber

unread,
Nov 13, 2016, 2:52:13 PM11/13/16
to beagl...@googlegroups.com
On Sun, 13 Nov 2016 10:44:05 -0800 (PST), Theodosis Ntegiannakis
<tntegi...@gmail.com> declaimed the
following:

>
>Now my only problem is how to read position from python. Any help would be
>appreciated
>

Unfortunately it appears PyBBIO is still tied to 3.x kernels. Since it
had a library just for rotary encoders...
https://github.com/graycatlabs/PyBBIO/milestone/5
https://github.com/graycatlabs/PyBBIO/wiki/RotaryEncoder

You might be able to cobble something up from the source code (the
sysfs functions are in C, you might use slower Python I/O to replace them;
and if you are setting up the eQEP channel externally, avoid the loading of
dtbo)


Adafruit_BBIO does not mention rotary encoders at all.

--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

William Hermans

unread,
Nov 13, 2016, 3:01:36 PM11/13/16
to beagl...@googlegroups.com
It's a simple read. Learn how to read a file in Python, and your problem will be solved.


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/mbgh2cldq7quniv7rq8ophkiche7poktn4%404ax.com.
For more options, visit https://groups.google.com/d/optout.

gibson.s...@outlook.com

unread,
Dec 12, 2017, 7:40:48 AM12/12/17
to BeagleBoard
Do you remember how you got eQEP to work? Ours just reads 0
Reply all
Reply to author
Forward
0 new messages