I observed some strange behavior on the hal_arm335xQEP component.
If I boot the bbb the hal_arm335xQEP won't load.
I do config-pin by cli as well as loading the components in halrun by hand
cat ./epconfig.sh
#!/bin/bash
/usr/bin/config-pin P9.27 qep
/usr/bin/config-pin P9.91 qep
/usr/bin/config-pin P9.92 qep
machinekit@beaglebone:~/machinekit/configs/qep_bug$ ./epshow.sh
P9_27 Mode: default Direction: in Value: 0
P9_91 Mode: default Direction: in Value: 1
P9_92 Mode: default Direction: in Value: 0
machinekit@beaglebone:~/machinekit/configs/qep_bug$ ./epconfig.sh
machinekit@beaglebone:~/machinekit/configs/qep_bug$ ./epshow.sh
P9_27 Mode: qep
P9_91 Mode: qep
P9_92 Mode: qep
machinekit@beaglebone:~/machinekit/configs/qep_bug$ halrun -I
msgd:0 stopped
rtapi:0 stopped
rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0
--rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288
rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
--debug=1
halcmd: loadusr -w ./setup.sh
Waiting for /sys/class/uio/uio0 OK
halcmd: loadrt hal_arm335xQEP encoders=eQEP0
<stdin>:2: insmod failed, returned -1:
rtapi_rpc(): reply timeout
halcmd: quit
So I have a look at the encoder
machinekit@beaglebone:~/machinekit/configs/qep_bug$ cat
/sys/devices/platform/ocp/48300000.epwmss/48300180.position
0
turn the encoder shaft a few times and look again
machinekit@beaglebone:~/machinekit/configs/qep_bug$ cat
/sys/devices/platform/ocp/48300000.epwmss/48300180.position
-416
machinekit@beaglebone:~/machinekit/configs/qep_bug$ cat
/sys/devices/platform/ocp/48300000.epwmss/48300180.position
1665
machinekit@beaglebone:~/machinekit/configs/qep_bug$ cat
/sys/devices/platform/ocp/48300000.epwmss/48300180.position
-2125
machinekit@beaglebone:~/machinekit/configs/qep_bug$ cat
/sys/devices/platform/ocp/48300000.epwmss/48300180.position
-2125
perfect
back to halrun, now the component loads and runs flawless
machinekit@beaglebone:~/machinekit/configs/qep_bug$ halrun -I
msgd:0 stopped
rtapi:0 stopped
rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0
--rtmsglevel=1 --usrmsglevel=1 --debug=1 --halsize=524288
rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
--debug=1
halcmd: loadusr -w ./setup.sh
Waiting for /sys/class/uio/uio0 OK
halcmd: loadrt hal_arm335xQEP encoders=eQEP0
halcmd: show pin
Component Pins:
Comp Inst Type Dir Value
Name Epsilon Flags linked to:
78 s32 OUT 0
eQEP0.capture-dir-changes --l-
78 s32 OUT 0
eQEP0.capture-overflows --l-
78 s32 OUT 0
eQEP0.capture-period --l-
78 u32 IN 0x00000000
eQEP0.capture-prescaler --l-
78 s32 IN 100
eQEP0.capture-threshold --l-
78 bit I/O FALSE
eQEP0.counter-mode --l-
78 s32 I/O 0
eQEP0.counts --l-
78 bit I/O FALSE
eQEP0.index-enable --l-
78 bit I/O FALSE
eQEP0.invert-A --l-
78 bit I/O FALSE
eQEP0.invert-B --l-
78 bit I/O FALSE
eQEP0.invert-Z --l-
78 float IN 1
eQEP0.min-speed-estimate 0.000010 --l-
78 s32 OUT 0
eQEP0.phase-errors --l-
78 float OUT 0
eQEP0.position 0.000010 --l-
78 float OUT 0
eQEP0.position-interpolated 0.000010 --l-
78 float I/O 1
eQEP0.position-scale 0.000010 --l-
78 s32 OUT 0
eQEP0.rawcounts --l-
78 bit I/O FALSE
eQEP0.reset --l-
78 float OUT 0
eQEP0.velocity 0.000010 --l-
78 bit I/O FALSE
eQEP0.x2-mode --l-
78 s32 OUT 0
eqep.update.time ----
78 s32 I/O 0
eqep.update.tmax ----
78 bit OUT FALSE
eqep.update.tmax-inc ----
halcmd: quit
Strange observation 2 same case:
I have to do the
cat /sys/devices/platform/ocp/48300000.epwmss/48300180.position
on the same terminal as I run halrun
If I do the cat from another terminal, the component will fail to load.
Anybody any idea?
Ju
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github:
https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/machinekit/49e35d59-a65a-4972-b1f6-5554ebe6d8cc%40googlegroups.com.