PRU Cookbook

Announcing rev 0.1.0 of PRU Cookbook


Live view: PRU Cookbook
Source: GitHub - MarkAYoder/PRUCookbook: This is a cookbook of the Programmable Realtime Unit on the BeagleBoard
Report issues: Issues · MarkAYoder/PRUCookbook · GitHub


A cookbook for programming the PRUs in C using remoteproc and
compiling on the Beagle

Case Studies

✓ Robotics Control Library

✓ BeagleLogic

✓ LEDscape

✓ Falcon Player

❏ MachineKit

❏ ArduPilot

Getting started

✓ Selecting a Beagle

✓ Installing the Latest OS on Your Bone

✓ Flashing a Micro SD Card

✓ Cloud9 IDE

✓ Getting Example Code

✓ Blinking an LED

Running a Program; Configuring Pins

✓ Getting Code Example Files

✓ Compiling and Running

✓ Stopping and Starting the PRU

✓ The Standard Makefile

✓ Compiling with clpru and lnkpru

✓ The Linker Command File - AM335x_PRU.cmd

✓ Loading Firmware

✓ Configuring Pins for Controlling Servos

✓ Configuring Pins for Controlling Encoders

Debugging and Benchmarking [1]

✓ Debugging via an LED

✓ dmesg –Hw

✓ prudebug - A Simple Debugger for the PRU


Building Blocks – Applications

✓ Memory Allocation

✓ Auto Initialization of Built in LED Triggers

✓ PWM Generator

✓ Controlling the PWM Frequency

✓ Loop Unrolling for Better Performance

✓ Making All the Pulses Start at the Same Time

✓ Adding More Channels via PRU 1

✓ Sychronziing Two PRUs

✓ Reading an Input at Regular Intervals

✓ Analog Wave Generator

✓ WS2812 (NeoPixel) driver

✓ Setting NeoPixels to Different Colors

✓ Controlling Arbitrary LEDs

✓ Controlling NeoPixels Through a Kernel Driver

✓ RGB LED Matrix - No Integrated Drivers

✓ Compiling and Inserting rpmsg_pru

Accessing More I/O [2]

✓ /boot/uEnv.txt to access P8 I/O

✓ Accessing gpio

More Performance

✓ Calling Assembly from C

✓ Returning a Value from Assembly

✓ Using the Built In Counter for Timing

✓ Xout and Xin - Transfering Between PRUs