3 ms·
The PRU is the unsung gem of the BeagleBone. I used it to prototype an optical control system that needed sub-100ns timing. As the article hints, it's not an
by curveship 10y ago
The PRU is the unsung gem of the BeagleBone. I used it to prototype an optical control system that needed sub-100ns timing. As the article hints, it's not an easy beast to get started with, but it offers crazy realtime abilities.
- seren 10y agoThat's pretty interesting, could you detail a little bit what was executed by the PRU and what was executed by the CPU ?
- curveship 10y agoThe CPU loaded a bytecode program into the PRU's memory and told it to run. The PRU ran a bytecode execution engine that was handcoded in assembly. The core of the engine was a loop: - perform the routine for the current bytecode - when the routine finished, spin on the PRU's embedded timer (the IEP) until 256 ticks (1.28us) had passed since the start of the cycle - advanced to the next bytecode and repeated External devices were connected either via I2C (those that didn't need super-tight timing) or to the pins controlled by the PRU. Some of the bytecodes controlled execution flow like loops while others were specific to the application, things like turn light on, move lens, trigger camera, etc. There were a few more bells and whistles, like memory locations where flags were set by the engine to let the CPU know how progress was going. It was a fun project. Unfortunately, the manufacturer of one of the core devices decided to stop making it, so that start-up had to go in a different direction.