CHAPTER 13 Real‐Time BeagleBone Interfacing

In this chapter you are introduced to real‐time interfacing with the BeagleBone. Linux is by default a nonpreemptive OS, which means that it has difficulty performing certain real‐time interfacing tasks, such as generating or sampling bit patterns on GPIOs at high speeds. The BBB has two programmable real‐time units (PRUs) that can be used for certain real‐time operations, and these are the focus of this chapter, which describes input and output examples that help explain the operation of the PRUs and their encompassing industrial communication subsystem (PRU‐ICSS). Finally, the real‐time capabilities of the BBB are demonstrated using two applications—the first generates a custom waveform on a GPIO, and the second uses a low‐cost ultrasonic distance sensor that requires precise timing in order to communicate the distance to an obstacle.

Equipment Required for This Chapter:

  • BeagleBone Black
  • LED, FET (e.g., BS270), push button, capacitors, and resistors
  • Oscilloscope (optional, but useful)
  • HC‐SR04 ultrasonic sensor and logic‐level translator board

Further resources for this chapter are available at

Real‐Time BeagleBone

The advantages of integrating the Linux OS with an embedded system are described throughout this book. The quantity and quality of device drivers, software packages, programming languages, and software APIs available for the Linux platform is immense. However, certain features ...

Get Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.