0

As an example, to turn on one of the on-board LED's you need to update the text file "/sys/class/leds/beaglebone:green:usr0"

In writing some tests just turning on and off lights, it's very slow. I believe this is because it uses the file system instead of directly interfacing with the hardware via an API or memory addressing.

Just wondering if there is any other way other than the file system. I don't know if this is a Linux thing or a BeagleBone Black thing.

user3953989
  • 103
  • 1
  • 3

1 Answers1

1

An option is to use mmap (memory map) and then by utilizing GPIO registers, you can control GPIO pins with higher speed. However, PRU(Programmable Real-time Unit) may result in higher speeds even more than mmap method, but this high-speed control costs for assembly programming (However in Starterware you can write code for PRU in C). For more information about PRU you can refer to Technical Reference Manual of AM335x.

Take a look at this address for mmap example.