Encoder 48300180.eqep return onlu -1 or 1 or 0
Created by: mdlugosz
Describe the bug The encoder EQEP0 return only three values -1, 0, 1.
**Describe which image you are running (example: bone-debian-10.2-iot-armhf-2020-02-03-4gb.img.xz) ** bone-ubuntu-18.04.4-ros-iot-armhf-2020-05-18-6gb.img System is booted from SDCARD
Describe your hardware BeagleBone Blue
Describe any Capes Installed
Please run this built-in script
sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[029041f6866049997bbfd2c7667b3c6e8c95201c]
eeprom:[A335BNLTBLA21712EL002910]
model:[TI_AM335x_BeagleBone_Blue]
dogtag:[BeagleBoard.org ROS Image 2020-05-18]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g31a8ae0206]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblue.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
kernel:[4.19.94-ti-rt-r43]
nodejs:[v8.10.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.14.20200814.0-0bionic+20200814]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0bionic+20200813]
pkg:[kmod]:[24-1ubuntu3.5rcnee0bionic+20200810]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0bionic+20200716]
groups:[beagle : beagle root adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev i2c cloud9ide gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 42.330772] remoteproc remoteproc0: 4a334000.pru is available
[ 42.346759] remoteproc remoteproc1: 4a338000.pru is available
[ 154.575230] remoteproc remoteproc2: wkup_m3 is available
[ 154.592590] remoteproc remoteproc2: powering up wkup_m3
[ 154.592613] remoteproc remoteproc2: Booting fw image am335x-pm-firmware.elf, size 217168
[ 154.592894] remoteproc remoteproc2: remote processor wkup_m3 is now up
[ 282.595682] remoteproc remoteproc0: powering up 4a334000.pru
[ 282.604229] remoteproc remoteproc0: Booting fw image am335x-pru0-rc-encoder-fw, size 36040
[ 282.604275] remoteproc remoteproc0: remote processor 4a334000.pru is now up
[ 853.519686] remoteproc remoteproc0: stopped remote processor 4a334000.pru
dmesg | grep pru
[ 42.330772] remoteproc remoteproc0: 4a334000.pru is available
[ 42.330953] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[ 42.346759] remoteproc remoteproc1: 4a338000.pru is available
[ 42.346958] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
[ 282.595682] remoteproc remoteproc0: powering up 4a334000.pru
[ 282.604229] remoteproc remoteproc0: Booting fw image am335x-pru0-rc-encoder-fw, size 36040
[ 282.604275] remoteproc remoteproc0: remote processor 4a334000.pru is now up
[ 853.519686] remoteproc remoteproc0: stopped remote processor 4a334000.pru
dmesg | grep pinctrl-single
[ 1.065640] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 1.289110] pinctrl-single 44e10800.pinmux: pin PIN102 already requested by 48300180.eqep; cannot claim for ocp:P9_30_pinmux
[ 1.305932] pinctrl-single 44e10800.pinmux: pin-102 (ocp:P9_30_pinmux) status -22
[ 1.313470] pinctrl-single 44e10800.pinmux: could not request pin 102 (PIN102) from group pinmux_P9_30_spi_pin on device pinctrl-single
dmesg | grep gpio-of-helper
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END
To Reproduce Steps to reproduce the behavior:
- Connect quadrant encoder to eqep0
- Run rc_test_encoders or watch -n 0.1 cat /sys/devices/platform/ocp/48300000.epwmss/48300180.eqep/position
- Rotate shaft of encoder whith is connected to EQEP0 and see error, returned value is -1 or 0 or 1 Other encoders are working properly.
Expected behavior The encoder EQEP0 should work like other encoders and return valid values.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.