Trying to start PRU Programming

There are a lot of examples for PRU in the web, but most of them don’t work correctly with latest images .

Most occuring problem - setting up tree overlay for pru.

Are there any examples or tutorials , which would work with 4.14 kernel , Debian 9.5 2018-08-30?

First run:

sudo /opt/scripts/tools/version.sh

and dump the output to this email chain.. We will make sure you got
things working in the newish settings:

Then just follow the latest and greatest doc's...

https://markayoder.github.io/PRUCookbook/

Regards,

It’s pretty easy when you use the matching tools:

a) disable rproc
b) disable cape-universal

Instead

c) enable uio_pruss driver
d) install libpruio

Then do pinmuxing by function setPin(Top, Ball, Mode). Single source, no external pinmuxing, no device tree overlay,

It’s most likely that you can use some of the libpruio IO features (ADC, GPIO, TIMER. PWM, CAP, QEP). So PRU-0 for your firmware, PRU-1 for hardware driver libpruio. The first prove of concept can be done on ARM CPU, then switch to the PRU for the final shot (fast, hard real-time).

Ask for details if you’re interested.

Version.sh :

git:/opt/scripts/:[73593ebe3b7d3cc381eeb502d45ccb33a6ec5e78]
eeprom:[A335BNLT00C02814BBBK2738]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-08-30]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2015.10-00001-g143c9ee]:[location: dd MBR]
kernel:[4.14.67-ti-r73]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-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.4.20180803.0-0rcnee0~stretch+20180804]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
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 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.044626] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.045829] gpio-of-helper ocp:cape-universal: ready
END

The really old version of U-Boot in the eMMC is blocking overlays from
working properly..

Just run:

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

and reboot..

Regards,

I want to use PRU for Bitbanging and i wish i would try as much tools as i can for it. So i’m interested in it.

Got it :
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied
What it was? Now i can follow https://markayoder.github.io/PRUCookbook/ for some examples, right?

Got it :
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied
What it was?

Old version of u-boot, blocking the newer u-boot on the microSD from
doing the u-boot overlay method..

Now i can follow https://markayoder.github.io/PRUCookbook/ for some examples, right?

Correct..

Regards,

Thanks a lot

Hi Anton!

Thanks, i’ll try it today, hope it will work properly with last Kernel.

I tried some examples from this PRUCookbook and encountered a following problem:
https://github.com/MarkAYoder/PRUCookbook/issues/4

I’ll try to refactore code if there will be no answer for the issue. Maybe there some more examples for PRU for last Kernel?

I forgot to mention it (even in the documentation). You can find further information about the PRUSS and the prussdrv-like libpruio functions at the following link:

https://github.com/beagleboard/am335x_pru_package/tree/master/Documentation