Outline

1. PRU Cookbook

Mark A. Yoder <Mark.A.Yoder@Rose-Hulman.edu> v2.0 beta

2. Outline

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

  1. Case Studies

    • ✓ Robotics Control Library

    • ✓ BeagleLogic

    • ✓ LEDscape

    • ✓ Falcon Player

  2. 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

  3. Running a Program; Configuring Pins

    • ✓ Getting Code Example Files

    • ✓ Compiling with clpru and lnkpru

    • ✓ Making sure the PRUs are configured

    • ✓ Compiling and Running

    • ✓ Stopping and Starting the PRU

    • ✓ The Standard Makefile

    • ✓ The Linker Command File - AM335x_PRU.cmd

    • ✓ Loading Firmware

    • ✓ Configuring Pins for Controlling Servos

    • ✓ Configuring Pins for Controlling Encoders

  4. Debugging and Benchmarking

    • ✓ Debugging via an LED

    • ✓ dmesg –Hw

    • ✓ prudebug - A Simple Debugger for the PRU

    • ✓ UART

  5. 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

    • ✓ Sychronizing 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

  6. Accessing More I/O

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

    • ✓ Accessing gpio

  7. More Performance

    • ✓ Calling Assembly from C

    • ✓ Returning a Value from Assembly

    • ✓ Using the Built In Counter for Timing

    • ✓ Xout and Xin - Transfering Between PRUs

  8. Moving to the BeagleBone AI

    • ✓ Moving from two to four PRUs

    • ✓ Seeing how poins are configured

    • ✓ Configuring pins on the AI via device trees

    • ✓ Using the PRU pins