Skip to content
Pratim Ugale edited this page Aug 14, 2019 · 27 revisions

PRU User Space API

This is a Google Summer of Code 2019 project under BeagleBoard.org aimed at providing:

  1. An API for different programming languages to load/unload firmware, start/stop the PRUs and communicate with them from the Linux User Space using the RemoteProc, RPMsg drivers.
  2. Sample PRU firmware and User Space software to demonstrate the use of the project.

Project Details:

Code: https://www.github.com/pratimugale/PRUSS-Bindings
Mentors: Kumar Abhishek, Zubeen Tolani(ZeekHuge), Patryk Mężydło.
GSoC Project Page: https://summerofcode.withgoogle.com/projects/#5163407328673792
Introduction Video explaining about the project: https://www.youtube.com/watch?v=3Z2PxDIoCpE
Final Video: TBA

Introduction

PRU_ICSS_1
Starting with the PRU, a Programmable Real-Time Unit (PRU) is a low-latency microcontroller subsystem present on BeagleBoard devices, which provides real-time processing capability lacking in Linux. PRUs are part of the PRU-ICSS, “Industrial Communications SubSystem”. They are free from running on an operating system, so can be dedicated to a single function.
The PRU cores were created to be non-pipelined, single-cycle execution engines. This means that all instructions (except for memory reads and writes) complete in a single cycle. Since there is no pipeline, the PRU cores are completely deterministic: the PRU cores will not rearrange instructions during execution.
The PRU-ICSS can also read from or write to external pins in a single cycle using a PRU core register (R30). With a PRU core running at 200 MHz, this means that an external signal change can be detected in as little as 5 nanoseconds. This also means that the PRU can toggle external pins with a frequency of 5 nanoseconds. PRU_ICSS_2

About the project and how it simplifies things

Although the PRUs are extremely useful for offloading deterministic tasks, using these processors has quite a learning curve.

How to develop firmware

RemoteProc

The RemoteProc Linux driver is responsible for taking the PRU firmware from the Linux filesystem, parsing it for any resources that it must provide for the PRU (for example, interrupts or shared memory), loading the firmware into PRU instruction memory and data memory, and then start running the PRUs and stop them as required.

The resource table is necessary for the RemoteProc driver to work, even if it is empty.

RPMsg

User applications can require communication between the PRUs and the Arm core. Linux provides a method for this communication called RemoteProc Messaging (RPMsg). RPMsg fits into the RemoteProc framework.

Installation

Work that can further be done

Conclusion and Acknowledgement

Additional Details

Clone this wiki locally