This has been very helpful but I have a problem - the position counter only 
decrements in my python code. The signals from my AMT103-V capacitive 
encoder from CUI, Inc, look good on my oscilloscope but unplugging P2_33 
doesn't change a thing (position continues to decrement) while unplugging 
P2_24 stops eqep2 from counting. Reversing the two external signal wires 
produces the same output so this is consistent with P2_24 being the only 
active pin. 


###after bootup use config-pin:
config-pin -a p2_24 qep
config-pin -a p2_33 qep

###Code:
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP2
import time
myEncoder = RotaryEncoder(eQEP2)
while (1):
    cur_position = myEncoder.position
    print cur_position
    time.sleep(1)

###Output:
-1
-120
-239
-364
-486

### output of sudo /opt/scripts/tools/version.sh (note I also tried to 
enable eQEP0 as a test of the A/B signals but P1_31 in error)
git:/opt/scripts/:[e307a944e0be0610ff5296e0abe4ad31a6e70daa]
eeprom:[A335PBGL00A21736GPB20285]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 
2018.01-00002-ge9ff418fb8]:[location: dd MBR]
kernel:[4.9.82-ti-r102]
nodejs:[v6.13.0]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/bone_eqep0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/bone_eqep2-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180305.0-0rcnee0~stretch+20180305]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video 
plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep 
admin spi 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 quiet]
dmesg | grep pinctrl-single
[    1.424230] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 
568
[   19.138778] pinctrl-single 44e10800.pinmux: pin PIN104 already requested 
by ocp:P1_31_pinmux; cannot claim for 48300180.eqep
[   19.205338] pinctrl-single 44e10800.pinmux: pin-104 (48300180.eqep) 
status -22
[   19.257765] pinctrl-single 44e10800.pinmux: could not request pin 104 
(PIN104) from group pinctrl_eqep0_pins  on device pinctrl-single
dmesg | grep gpio-of-helper
[    1.432715] gpio-of-helper ocp:cape-universal: ready
END

###/boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.9.82-ti-r102
#uuid=
#dtb=


###U-Boot Overlays###
###Documentation: 
http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/bone_eqep0-00A0.dtbo
#uboot_overlay_addr1=/lib/firmware/bone_eqep1-00A0.dtbo
uboot_overlay_addr2=/lib/firmware/bone_eqep2-00A0.dtbo
#uboot_overlay_addr3=/lib/firmware/bone_eqep2a-00A0.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/07eea22b-305b-4544-a86c-98d7502fdd7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to