Commit c559ab33 authored by Jake Read's avatar Jake Read

add pru

parent ca6d180a
Pipeline #3218 passed with stage
in 1 second
pre code {
background-color: #eee;
border: 1px solid #999;
display: block;
padding: 20px;
<h1>BeagleBoard PRU</h1>
<img src='ring.jpg' height=50%>
<figcaption>Ring oscillator with the BeagleBoard's PRU</figcaption>
<p>The crowned champion of the ring test, the PRU hits 16.6MHz</p>
<p>This ring oscillator runs on the beagleboard's PRU -> 'Programmable Realtime Unit'. The PRU is especially insteresting for the ring test because it (a 200MHz cpu) shares memory with the Beagleboards' larger onboard processor. This is probably exciting when we run big (and asychronous) software on the large processor, (i.e. an OS, which processes operations in a queue) and want to do tightly controlled realtime work at the same time. Memory sharing means we can pass messages between these contexts quickly.</p>
<a href="">Here's a link to the source code on github, along with other beagleboard pru examples</a>
* Build and run with:
* make -C /var/lib/cloud9/examples/extras/pru PRUN=pru0 TARGET=ring
* Makefile source at:
#include <stdint.h>
#include <pru_cfg.h>
#include <pru_ctrl.h>
#include <stddef.h>
#include <rsc_types.h>
volatile register unsigned int __R30;
volatile register unsigned int __R31;
struct my_resource_table {
struct resource_table base;
uint32_t offset[1]; /* Should match 'num' in actual definition */
#pragma DATA_SECTION(pru_remoteproc_ResourceTable, ".resource_table")
#pragma RETAIN(pru_remoteproc_ResourceTable)
struct my_resource_table pru_remoteproc_ResourceTable = {
1, /* we're the first version that implements this */
0, /* number of entries in the table */
0, 0, /* reserved, must be zero */
0, /* offset[0] */
#pragma DATA_SECTION(init_pins, ".init_pins")
#pragma RETAIN(init_pins)
const char init_pins[] =
"/sys/devices/platform/ocp/ocp:P2_30_pinmux/state\0pruout\0" \
"/sys/devices/platform/ocp/ocp:P2_32_pinmux/state\0pruin\0" \
void main(void) {
/* Read GPIO input 2 and invert to GPIO output 3 */
while(1) {
if(__R31 & (1<<2))
__R30 = 0;
__R30 = (1<<3);
<p><a href='../../index.html'>Back</a></p>
\ No newline at end of file
......@@ -64,6 +64,16 @@
{ "name":"Beagleboard PRU",
"dev_board_sales link":"",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment