BBB UART does not work anymore: Set pin mode failed

try bs=1024.

I usually do bs=1M count =1 to zero first 1M but that is excessive

Sorry, wrong one, i’ll update…

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100

Regards,

Thanks, that’s it. How to proceed to get UARTs running?

edit uEnv.txt as above and load the overlays

One more thing: the attached display is very dim. I use Cloud9 now but that is less convenient.

You can just ssh in, no reason to use built in cloud9…

Looks all ok, but: …$ sudo config-pin -q p9.22: gives: pinmux state failed, No such file…

you don’t need to do that. the overlay sets the correct pinmux for the UART pins

Now with debian 10.x

sudo beagle-version

Regards,

I have image version 2023-07-01. sudo beagle-version gives: command not found. What is it supposed to do?

Odd, it should have been pre-installed:

debian@27-am335x-bbg:~$ dpkg -S /usr/bin/beagle-version 
bb-beagle-version: /usr/bin/beagle-version
sudo apt update ; sudo apt install bb-beagle-version

It tells us how your system is setup so we can help correct what you want to use it for.

Regards,

Here it is:
dd: unrecognized operand ‘size=1024’

debian@beaglebone:/var/lib/cloud9$ sudo beagle-version
[sudo] password for debian:
eeprom:[A335BNLT00C03919BBBK0053]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster LXQt Image 2023-07-01]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2019.04-g923f8b8 (Jan 02 2022 - 19:05:15 +0000)]:[location: dd MBR]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-g923f8b8]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0.kernel]
UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BONE-LCD4-01-00A1.kernel]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
UBOOT: Loaded Overlay:[BB-UART2-00A0]
UBOOT: Loaded Overlay:[BB-UART4-00A0]
kernel:[4.19.94-ti-r74]
nodejs:[v10.24.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=BB-UART2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=BB-UART4-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_pru=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>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821]
pkg:[bb-customizations]:[1.20230530.0-0~buster+20230530]
pkg:[bb-usb-gadgets]:[1.20230414.0-0~buster+20230414]
pkg:[bb-wl18xx-firmware]:[1.20230414.0-0~buster+20230414]
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 input render bluetooth netdev i2c gpio admin tisdk weston-launch cloud9ide]
cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-BONE-LCD4-01, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   77.350593] remoteproc remoteproc0: wkup_m3 is available
[   77.465124] remoteproc remoteproc0: powering up wkup_m3
[   77.465158] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   77.465448] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   82.980420] remoteproc remoteproc1: 4a334000.pru is available
[   83.022827] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   82.980420] remoteproc remoteproc1: 4a334000.pru is available
[   82.980582] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
[   83.022827] remoteproc remoteproc2: 4a338000.pru is available
[   83.023028] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
dmesg | grep pinctrl-single
[    1.252556] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    1.265685] gpio-of-helper ocp:cape-universal: ready
dmesg | grep wlcore
lsusb
Bus 001 Device 002: ID 1ea7:0066 SHARKOON Technologies GmbH [Mediatrack Edge Mini Keyboard]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

See, your UART’s are fully enabled…

No reason to touch config-pin…

Regards,

Ok, so you consider all ok?! Fine! For my application I need Dig I/O (GPIO), pwm I/O, two Uarts. How do I activate these without Adafruit in Python? Please?

GPIO: is easy, python supports libgpiod, free pins should be gpio mode, if they aren’t use config-pin to set them.
UART: done, just use python to talk to /dev/ttySx
PWM: which pin set are you using?

Serial works!!! Thank you so much. I need: P8-11, 12, 15 and 17, P9-25, and P8-14 and P8-26. UARTs 2 and 4 (already ok). PWM pins: P8-13 and P8-19. I can drop Adafruit altogether, that’s fine!

For GPIO there are at least 2 choices.

You can apt install python3-libgpiod

there is also a gpiod package that you can install via pip

Never used either and I don’t think they a can be used interchangeably, so you might want to have a look at both and see if one is easier than the other

OK, I will do that. Thanks a lot for all help. Is all this documented somewhere? I can not imagine I am the only one wrestling with this.

@yoder has been cleaning up the cookbook: Sensors — BeagleBoard Documentation

There are a ton of hints there, if you see anything we are missing, just ping us or @yoder ! :wink:

Regards,

Thanks both for your help in the first place. Curious: serial control is easier than with Adafruit, other I/O seems much more complex in my opinion. Need some time to digest. Maybe better in a different topic. But: I need pwm output to control a dc motor. That is not described by @yoder. Could that be added, please?
My best,
H