After receiving my BBB earlier this week, I was absolutely keen on using the Programmable Real-time (execution) Unit (or PRU), which is included in the main ARM-CPU of the BBB. But I soon realized that this is absolutely not a fun topic to start with, especially, if you are new to programming or embedded architectures. PRU programming can be pretty frustrating in the beginning and there is almost no community support or tutorials. But I’ll try to cover the topic as good as I can. Let’s get started!

What you will need
Well, a BeagleBone Black you might say, and yes, you will need one. But you will also need some (at least rudimental) C skills (or a good skillset in a similar language) and you should know what assembler is. You’ll also need some basic Linux skills (nothing too special).
Goals
What I want to do in this series is to provide a good starting point to PRU programming and to get you up and running so you can create your own real-time applications without having to read hundreds of pages. But this will be a very basic guide and I will not cover how the hardware works. I will just show you how to get your first real-time application running. So by the end of this series you should be able to write simple realtime applications.
About the hello world example
I’ll guide you through the steps of creating a basic waveform generator. While this might sound like too much for a hello world example, I couldn’t think of a better way of showing you what it means to work with a realtime system. And this example might also be extended so you can build your own hardware function generator for testing and prototyping.
Table of contents
Part 0 – Introduction (You are here)
Part 1 – About device trees and overlays
Part 2 – Programming

What do you like more personally? Raspberry Pi, Arduino or BeagleBone? I like the Arduino Uno most, because it’s cheaper than the Pi and for me easier to use and set up. You dont have to configure linux and everything just Arduino studio on a computer
LikeLike
I have some Raspberry PIs laying around at home. Actually I almost have them all, except for the 3 and the Zero. I also have a BBB (obviously 😀 ) and an Arduino Uno and I have to say that I like them all equally. There is no best one here. Each one is good on it’s own. For example the Raspberry Pi is good if you use it as a media center, because it comes with everything you need already on it, the Arduino is not so good for a mediacenter. The BBB is great for realtime applications and I like to look at it as an improved PI, which costs a bit more. The Arduino Uno is cheaper and has a lower power consumption than the two other boards and you can directly program the microcontroller if you want to. So they are all great dev boards, it just depends on what you want to use them for!
Cheers
LikeLike
Could you do a similar series on the Arduino or the Raspberry Pi (2 or 3)? I would love to read it!
LikeLiked by 1 person
Hi!
I’m currently working on an Arduino series, but unfortunately I haven’t received all the parts I need, yet. But I’ll upload the series as soon as I receive the final parts 😀
There is a similar article for the Raspberry Pi: https://nerdhut.de/2016/05/09/using-hardware-pwmclk-to-get-exact-timings-on-a-raspberry-pi/
Cheers!
LikeLike
Thanks for the feedback! I’ll try to upload more pictures to future articles
LikeLike