BBB PRU Input Example
This is a complete example on how to use the Beaglebone Black's PRU to poll for an input signal. The code can be found on GitHub.
This program runs on PRU1 and waits for P8.28 to go high and then pulls P8.29 high.
A switch should be placed between the 3.3V and P8.28. An LED should be placed in series with a 1k resistor between P8.29 and ground.
An updated device tree compiler may be needed:
wget -c https://raw.githubusercontent.com/RobertCNelson/tools/master/pkgs/dtc.sh; chmod +x dtc.sh; ./dtc.sh
The PRU Drivers must also be installed.
The HDMI must be disabled by adding the following line to
The following will compile all the code for the PRU and main cpu:
Compile the device tree overlay and enable it:
cd device-tree make enable