I’m told BeagleBone Black has 2 PRU, and I want to learn something about it, especially since I already paid for it.
I’m going through PRU Cookbook right now. Is there other documentation, suitable for “newbie”?
I’m told BeagleBone Black has 2 PRU, and I want to learn something about it, especially since I already paid for it.
I’m going through PRU Cookbook right now. Is there other documentation, suitable for “newbie”?
I believe the PRU Cookbook is the best.
I’m hoping we can just point to this project.. it’s under development right now.. GitHub - TexasInstruments/open-pru: Open PRU
Hmm, you know, their examples refer to directories I don’t have, use files I don’t have, call commands I don’t have. So, obviously, they don’t compile. I’m using Debian 13.2, kernel 6.17.10-bone18 (latest, at the moment).
But, still, going through it…
the PRU cookbook assumes 5.10.x-ti…
Thanks. I had to go back all the way to Debian 11.7 (5.10.168-ti-r71), because none of the later images had /usr/lib/ti that the “Cookbook” is referring to.
Lot of pins mentioned in the “Cookbook” don’t work. So, I had to substitute with another one. Finding “working” pins took most of my time. Anyways, I got simple output programs working:
all of which I can already do from OS side. I suspect input programs would be along the same line. But, didn’t pursue.
PRU programs are very finicky. If you run a program twice consecutively, they don’t behave the same. You have to “reset” the pins, before running.
Not sure about “Open PRU”, since they don’t include am335x. And, I don’t think I would be going out, to buy TI’s PRU, Raspberry’s Pico, or Arduino. For me, dedicated module would be more my style, like ADC, PWM, eQEP, DAC, etc. Let the special hardwares do their stuffs, and I just read/write to them.
Glad to hear there another person interrested in the PRU’s. For me, it was this tutorial that helped me understand. Programming the BeagleBone PRU-ICSS
After i understood this one, the PRUCookbook, came jn very handy.
Best of luck!
Thanks for the link. Basics is there, but it’s old. Who knows, it may be evolve into something useful for “general public”.
Yes. Its old. But for the 3358, its still valid. Also, the basics are there for the mewer boards. Just need to update some processes. Like memory addresses, and device trees.
When I said “old”, I meant “lots of wrong info”. Both “Programming the BeagleBone” and “PRU Cookbook” mentions P9_31. That pin doesn’t work. I had to replace it with P9_14 or P9_16.
Maybe my image (Debian 11.7) was missing something. Newer images (Debian 12 and 13) don’t include PRU stuffs. So, that tells you something. I looked into BBB’s PRU, only because I already paid for it.
Understood. Yeah. In that sense youre right. It is a bit dated.
In my humble opinion, i love the PRU’s. They might be complicated and tedious, but the ability to reprogram the firmware via linux, offers tremendous upside.
Not to mention be able to work on the code from afar, things that could not be done if you had a microcontroller commected to a raspberry pi via a serial connection.
I always recommend to learn how to use them. Also they are very reliable, and you have 2 of them, already included in your board.
Which image/kernel are you using? For PRU programming, I mean.
I’ve been working with the PRU and PRU-ICSS for nearly 10 years now, I’m using Debian 9, Kernel 4.14.108-ti-r104.
Using CCS 9.3.0 and the PRU support package (RPMSG stuff, etc) from 2016.
It works, I see no reason to change.
Currently working on getting debian BBB Trixie using 5.10 to work with my motor controller. Bullseye and Bookworm worked well with 5.10. The PRU has the ability for direct register access to most of the BBB peripereals which can be used for simple real time control applications.
That would be bone-debian-9.9-iot-armhf-2019-08-03-4gb.img.xz, or slightly earlier. So, will the examples in “PRU Cookbook” work with this image? I was focused on finding v5.10 kernels, so I didn’t consider v4.x.