can't enable PRU with kernel 4.4.113-ti-r145

Hi!,

I’m follow this tutorial, but I can’t enable the PRU output

http://jkuhlm.bplaced.net/beaglebone-433mhz-transmitter/

root@beaglebone:~/rfsend# config-pin p8.11 pruout
P8_11 pinmux file not found!
Pin has no cape: P8_11

After some research in the forum I think maybe it’s a problem with the kernel version, but I have no clue

In /boot/uEnv.txt this is line is uncomment
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

This is my system (beaglebone green wireless)

sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[70edebd65fe6ea7de16ea8efe3c48b2a4062034a]
eeprom:[A335BNLTGW1ABBGW16050761]
model:[TI_AM335x_BeagleBone_Green_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-02-01]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.01-00002-g9aa111a004]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.03-00002-gd12b1519b4]:[location: dd MBR]
kernel:[4.4.113-ti-r145]
nodejs:[v0.12.18]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180322.0-0rcnee0~jessie+20180322]
pkg:[bb-wl18xx-firmware]:[1.20180328-0rcnee2~jessie+20180328]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~jessie+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal netdev i2c bluetooth cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.154434] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.155146] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[ 1.155293] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[ 1.155305] gpio-of-helper ocp:cape-universal: ready
END

regards,
Sebastián

The old version of u-boot in the eMMC is blocking u-boot overlays from
working correctly..

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

Then reboot and it'll work just fine..

Regards,

Okay that was weird, i'll retest that tomorrow at work..

4.4.125-bone22 + u-boot overlays should work..

<weird>
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
failed on fdt_overlay_apply(): FDT_ERR_BADMAGIC
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
</end>

They were compiled with -@ wonder what failed...

Regards,

I burn a new microSD card with the same image and now the linux it’s boot

bone-debian-8.10-seeed-iot-armhf-2018-02-01-4gb.img

Try again and now this is the otuput

config-pin p8.11 pruout

P8_11 pinmux file not found!
bash: /sys/devices/platform/ocp/ocpP8_11_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp
P8_11_pinmux/state

here the new sytem info

sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[ad016da40de5805f1a6f981cbb6c454b1a7f244b]
eeprom:[A335BNLTGW1ABBGW16050761]
model:[TI_AM335x_BeagleBone_Green_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-02-01]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.01-00002-g9aa111a004]
kernel:[4.4.113-ti-r145]
nodejs:[v0.12.18]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~jessie+20180126]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~jessie+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~jessie+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal netdev i2c bluetooth cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
dmesg | grep pinctrl-single
[ 1.212781] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.213903] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
[ 1.214074] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
[ 1.214218] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2
[ 1.214357] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3
[ 1.214497] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4
[ 1.214630] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5
[ 1.214762] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6
[ 1.214902] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7
[ 1.215048] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8
[ 1.215192] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9
[ 1.215327] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10
[ 1.215466] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11
[ 1.215609] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12
[ 1.215746] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13
[ 1.215882] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14
[ 1.216023] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15
[ 1.216634] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16
[ 1.216813] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17
[ 1.217031] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18
[ 1.217194] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19
[ 1.217341] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20
[ 1.217481] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21
[ 1.217619] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22
[ 1.217763] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23
[ 1.217902] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24
[ 1.218040] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25
[ 1.218193] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26
[ 1.218338] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27
[ 1.218486] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28
[ 1.218627] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29
[ 1.218769] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30
[ 1.218916] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31
[ 1.219057] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32
[ 1.219197] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33
[ 1.219349] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34
[ 1.219494] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35
[ 1.219643] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36
[ 1.219791] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37
[ 1.219933] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38
[ 1.220317] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39
[ 1.220485] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40
[ 1.220631] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41
[ 1.220785] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42
[ 1.220933] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43
[ 1.221079] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44
[ 1.221210] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45
[ 1.221221] gpio-of-helper ocp:cape-universal: ready
END

thanks you for your time

regards,
Sebastián

now config-pin p9.25 pruout it’s working now but I need to use p8.11 as PRU

root@beaglebone:~/rfsend# cat /sys/devices/platform/ocp/ocp:P9_25_pinmux/state
pruout

how I can use p8.11 as PRU ?

List of avaliable pins

Okay firgured this out, you have the
"model:[TI_AM335x_BeagleBone_Green_Wireless]"

You'll need to make a choice:

PRU or WIFI...

P8.11 is gpmc_ad13.mmc2_dat1

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BBGW-WL1835-00A0.dts#L25

You can kill wifi via:

disable_uboot_overlay_wireless=1

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays

Regards,

Correction, here's a hack (1), we can stick the wl18xx into 1 bit mode:

debian@test-bbb-2:~$ cd /opt/source/bb.org-overlays/
debian@test-bbb-2:/opt/source/bb.org-overlays$ git pull
debian@test-bbb-2:/opt/source/bb.org-overlays$ cp
src/arm/BB-BBGW-WL1835-1BIT-00A0.dts src/arm/BB-BBGW-WL1835-00A0.dts
debian@test-bbb-2:/opt/source/bb.org-overlays$ make
debian@test-bbb-2:/opt/source/bb.org-overlays$ sudo make install

1: https://github.com/beagleboard/bb.org-overlays/commit/093227e24835b73d95090fa4d0c17ea13ae322db

Regards,

NM, this "BB-BBGW-WL1835-1BIT-00A0.d hack" will only work with
v4.16.0, which should be out in a few days..

Regards,

Thanks Robert for the script.

If wifi is in 1-bit mode, does it affect its operation ?.
I’ve already had problems with wifi and the beaglebone green wireless seeedstudio, I do not want to get worse.

I think it’s best to modify the 433 mhz tutorial script to use another PRU pin.

In the tutorial (step 3) this is installed, will it be necessary?
git: //github.com/beagleboard/am335x_pru_package

Thanks Robert for the script.

If wifi is in 1-bit mode, does it affect its operation ?.

In theory it's be 25% as fast...

I've already had problems with wifi and the beaglebone green wireless
seeedstudio, I do not want to get worse.

Grab a newer image, it took a while to figure out all the bugs in the
bbgw hardware design..

I think it's best to modify the 433 mhz tutorial script to use another PRU
pin.

I would..

In the tutorial (step 3) this is installed, will it be necessary?
git: //github.com/beagleboard/am335x_pru_package

follow the tutorial...

Regards,

thanks Robert, I’ll try this 1-bit mode

about the PRU now it’s working. I change to kernel 4.9.88-ti-r108 and then apt-get upgrade

I recommend this updated guide to understand PRU
https://gist.github.com/jonlidgard/1d9e0e92b4f219f3f40edfed260b851e

regards,
Sebastián