I’m new to embedded Linux and Beaglebones, so I have a lot to learn. I want to use the Beaglebone Black to control 3 closed-loop stepper motors. Connecting the 'bone to A4988 step sticks is fairly easy, but I’m having trouble reading the encoders. I read this topic: “Getting EQEP2 to work on the PocketBeagle”, so it looks like I should be able to set up the eqeps just using “config-pin p8.12 qep”, but I just get the following error:
bash: /usr/local/bin/config-pin: No such file or directory
if I use the “maintainable” version of config-pin, or
/usr/local/bin/config-pin: 1489: echo: echo: I/O error
Cannot write pinmux file: /sys/devices/platform/ocp/ocp:P8_12_pinmux/state
if I use the shell script version. Is this a Debian Buster issue? Do I need to use a Device Tree Overlay? Help!
Here’s the output of version.sh:
git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
eeprom:[A335BNLT00C02125SBB10004]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g07d5700e21]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g31a8ae0206]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.bb.org-overlays]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0.bb.org-overlays]
kernel:[4.19.94-ti-r71]
nodejs:[v10.24.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.20210821.0-0~buster+20210821]
pkg:[bb-wl18xx-firmware]:[1.20211222.2-0~buster+20211222]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
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
[ 43.687360] remoteproc remoteproc0: wkup_m3 is available
[ 44.122522] remoteproc remoteproc0: powering up wkup_m3
[ 44.122552] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[ 44.122814] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 47.147976] remoteproc remoteproc1: 4a334000.pru is available
[ 47.163659] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[ 47.147976] remoteproc remoteproc1: 4a334000.pru is available
[ 47.148166] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[ 47.163659] remoteproc remoteproc2: 4a338000.pru is available
[ 47.163812] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[ 0.954504] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[ 0.968176] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END