This module allows you to interface your Node.js code with programs executing on the BeagleBones Programmable Realtime Units (PRUs). The BeagleBone has 2 PRUs which are separate to the main CPU and run at 200MHz with access to 16 GPIOs each. The benefits of executing code on the PRU are guaranteed realtime execution (outside of the OS) with no load on the primary CPU. The PRUs are coded in TIs own assembly instruction set and can communicate with code running within the OS via interrupts and shared memory space.
This README does not aim to be a complete guide to setting up the PRUs and using them from Node.js. As it is mostly built on the AM335x_PRU Drivers, the Python PRU bindings and the BBB PRU setup guide, you can refer to these sources for more information about the PRUs.
This package is essentially a Node.js bindings for the AM335x_PRU Drivers.
To use this code you need to load uio_pruss and (possibly) configure an appropriate device tree fragment. Here I assume you know how to do this.
Working with device tree, loading kernel modules, installing PASM tool are outside the scope of this document. This code does (some of the) functions of the AM335x_PRU Drivers, that, essentially allow reading/writing the PRU memory, loading and executing PRU firmware, and working with PRU interrupts.
To install the module simply type
npm install prussdrv
This code is a fork of node-pru. Since the latter repository seem to be abandoned, I renamed it (so that it can be pushed to npm registry), cleaned up, simplified, and added few new functions (and possibly few bugs).