(newbie) PWM is missing in Debian 13.2 images

Now that I can turn on/off GPIO pins and builtin LEDs in BBB, I would like to try PWM next. Online search says something about “config-pin”, “/dev/bone/pwm”, and “/sys/class/pwm”. But,

whereis config-pin
ls /dev/bone/pwm
ls /sys/class/pwm

all return empty in the latest Debian 13.2 images,

  • am335x-debian-13.2-base-v5.10-ti-armhf-2025-11-18-4gb.img.xz
  • am335x-debian-13.2-base-v6.12-armhf-2025-11-18-4gb.img.xz
  • am335x-debian-13.2-base-v6.17-armhf-2025-11-18-4gb.img.xz

How do I enable PWM in BBB?

Here is output of “beagle-version” for 6.17.9-bone17 kernel.

eeprom:[A335BNLT0A5A1913BBBK2768]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Trixie Base Image 2025-11-18]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2022.04-gb4b56c73 (Oct 28 2025 - 17:45:28 +0000)]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack.dts]
kernel:[6.17.9-bone17]
/boot/uEnv.txt Settings:
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-customizations]:[1.20250808.0-0~trixie+20250808]
pkg:[bb-usb-gadgets]:[1.20250523.1-0~trixie+20250527]
pkg:[bb-wl18xx-firmware]:[1.20230703.0-0~trixie+20240703]
pkg:[kmod]:[34.2-2bbbio1~trixie+20250522]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input render netdev i2c bluetooth gpio admin tisdk weston-launch]
cmdline:[console=ttyS0,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 rootwait fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100]
dmesg | grep remote
[   17.349769] systemd[1]: Reached target remote-fs.target - Remote File Systems.
[   35.829970] remoteproc remoteproc0: wkup_m3 is available
[   35.975769] remoteproc remoteproc0: powering up wkup_m3
[   36.005453] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   36.045623] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   55.190740] remoteproc remoteproc1: 4a334000.pru is available
[   55.263798] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   47.544963] Modules linked in: 8021q snd_soc_ti_udma garp stp snd_soc_ti_edma llc mrp snd_soc_ti_sdma cfg80211 iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter snd_soc_hdmi_codec snd_soc_core bluetooth ecdh_generic rfkill ti_am335x_adc snd_compress kfifo_buf zram industrialio snd_pcm_dmaengine snd_pcm snd_timer snd soundcore at24 wkup_m3_rproc evdev nfnetlink ip_tables x_tables pruss pm33xx wkup_m3_ipc uio_pdrv_genirq uio
[   55.190740] remoteproc remoteproc1: 4a334000.pru is available
[   55.263798] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pinctrl-single
[    3.618521] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
dmesg | grep wlcore
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

What you’ve found is old and outdated information.

Unfortunately, the Internet is very good at perpetuate and amplify exactly that.

What you want is device-tree overlays. They should already be installed on your Beagle,
somewhere under /usr/share/… (search for .dtso files).

Which pwm pins do you need? You’ll find a few pre built overlays under /boot/

You will need to add overlays to the boot uEnv.txt file. I have an example PWM class for the Beaglebone Black here:

This is a portion of my /boot/uEnv.txt file, note the “Additional custom capes” section and the pins assigned by the prebuilt overlays.

uname_r=6.12.49-bone36
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation:
###Master Enable
enable_uboot_overlays=1

###Overide capes with eeprom
#uboot_overlay_addr0=.dtbo
#uboot_overlay_addr1=.dtbo
#uboot_overlay_addr2=.dtbo
#uboot_overlay_addr3=.dtbo

###Additional custom capes
uboot_overlay_addr4=/boot/dtbs/6.12.49-bone36/overlays/BB-EHRPWM1-P9_14-P9_16.dtbo
uboot_overlay_addr5=/boot/dtbs/6.12.49-bone36/overlays/BB-EHRPWM2-P8_13-P8_19.dtbo
#uboot_overlay_addr6=.dtbo
#uboot_overlay_addr7=.dtbo

###Custom Cape

Does anyone have a book to recommend for writing Device Trees for the Beaglebone boards. I have struggled for years for modifying the .dts files on the BBAI64. It seems to me that with every kernel change their is a shift towards re-configuring your own board. I started with Derek Mollys book with the original BBB years ago. I have purchased 2 books that have been of limited help. The problem is I simpily don’t speak the Device Tree Language and get lost quickly.

No reason to add the text.. ‘/boot/dtbs/6.12.49-bone36/overlays/’ that breaks kernel updates

What do you suggest. Yes it seems like everytime the kernel changes, my system breaks. Is their an alternative to adding the overlays, similar to the BBAI64?

u-boot knows where to look, remove the extra stuff..

uboot_overlay_addr4=BB-EHRPWM1-P9_14-P9_16.dtbo
uboot_overlay_addr5=BB-EHRPWM2-P8_13-P8_19.dtbo

Regards,

I got them from Cookbook, Chapter 3 and also from this Forum. Yes, they were all old.

Nothing under /usr/. But, I found something under /boot and /opt,

  • /boot/dtbs/6.17.9-bone17/BB-EHRPWM1-P9_14-P9_16.dtbo
  • /boot/dtbs/6.17.9-bone17/BB-EHRPWM2-P8_13-P8_19.dtbo
  • /opt/source/dtb-6.17.x/src/arm/overlays/BB-EHRPWM2-P8_13-P8_19.dtso
  • /opt/source/dtb-6.17.x/src/arm/overlays/BB-EHRPWM1-P9_14-P9_16.dtso

Curiously, nothing on “PWM0”, though.

Thanks I get it now.

Thank you. I got an external LED blinking. For now, pre-defined

  • PWM1 – P9_14 (a), P9_16 (b)
  • PWM2 – P8_19 (a), P8_13 (b)

are good enough.

What happened to “PWM0” (P9_31, P9_29)?

Added… Commits · beagleboard/BeagleBoard-DeviceTrees · GitHub

cd /opt/source/dtb-6.17.x/
git pull

Then build:

./build_n_install.sh

and you can give it a test.. make sure you have hdmi audio disabled..

Regards,

What am I doing wrong I removed the full path /boot/dtbs/6.12.49-bone36/overlays as suggested.

Getting at boot time error message:

uboot_overlays: unable to find [mmc 0:3 BB-EHRPWM1-P9_14-P9_16.dtbo]

have you done

sudo find / -name BB-EHRPWM1-P9_14-P9_16.dtbo

to verify that it exists in /boot/.

and uEnv.txt should only need (as RCN indicated above)

uboot_overlay_addr4=BB-EHRPWM1-P9_14-P9_16.dtbo

Yes, “PWM0” works too, now.

What you mean by “disabled”?

  • BBB is running headless, bare bone “out of box”. So, nothing is plugged into microHDMI port. And, I don’t have any “cape”.
  • And, I haven’t done anything “audio” related. I wouldn’t know how.

I’m guessing, not to load other “dtbo” related to video/audio. That would mean,

###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

I tried both loaded and not loaded. PWM0 works both situations.

Can I see your full u-boot log

Yeah correct, by default HDMI video and audio is enabled, even without the HDMI plugged in

=\~=\~=\~=\~=\~=\~=\~=\~=\~=\~=\~= PuTTY log 2025.12.08 09:36:35 =\~=\~=\~=\~=\~=\~=\~=\~=\~=\~=\~=

U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4…
\*\* Unable to use mmc 0:1 for loading the env \*\*

U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4…
\*\* Unable to use mmc 0:1 for loading the env \*\*
Board: BeagleBone Black
 not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=\[A335BNLT\] …
board_rev=\[00C0\] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
btrfs_read_superblock: invalid checksum at superblock mirror 0
btrfs_read_superblock: invalid checksum at superblock mirror 1
btrfs_read_superblock: No valid BTRFS superblock found!
\*\* Unrecognized filesystem type \*\*
gpio: pin 55 (gpio 55) value is 1
2259 bytes read in 9 ms (245.1 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt…
gpio: pin 56 (gpio 56) value is 1
Running uname_boot …
loading /boot/vmlinuz-6.12.49-bone36 …
8790528 bytes read in 564 ms (14.9 MiB/s)
debug: \[enable_uboot_overlays=1\] …
debug: \[enable_uboot_cape_universal=\] …
debug: \[uboot_base_dtb_univ=am335x-boneblack-uboot.dtb\] …
uboot_overlays: \[uboot_base_dtb=am335x-boneblack-uboot.dtb\] …
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb …
loading /boot/dtbs/6.12.49-bone36/am335x-boneblack-uboot.dtb …
96616 bytes read in 40 ms (2.3 MiB/s)
uboot_overlays: \[fdt_buffer=0x60000\] …
uboot_overlays: unable to find \[mmc 0:3 BB-EHRPWM1-P9_14-P9_16.dtbo\]…
uboot_overlays: unable to find \[mmc 0:3 /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo\]…
uboot_overlays: unable to find \[mmc 0:3 /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo\]…
uboot_overlays: unable to find \[mmc 0:3 /lib/firmware/BB-ADC-00A0.dtbo\]…
uboot_overlays: unable to find \[mmc 0:3 AM335X-PRU-UIO-00A0.dtbo\]…
uboot_overlays: add \[enable_uboot_cape_universal=1\] to /boot/uEnv.txt to enable…
loading /boot/initrd.img-6.12.49-bone36 …
12361257 bytes read in 790 ms (14.9 MiB/s)
debug: \[console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100\] …
debug: \[bootz 0x82000000 0x88080000:bc9e29 0x88000000\] …

## Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8f436000, end 8ffffe29 … OK
Loading Device Tree to 8f41b000, end 8f435967 … OK

Starting kernel …

yeah… that’s very old…

sudo /opt/u-boot/bb-u-boot-am335x-evm/install.sh

The image was downloaded was BeagleBone Black Debian 13 2025-09-05 IoT (v6.12.x).