Roadrunner technical documentation Buy

Manage the GPIO lines using the sysfs user interface (deprecated)

GPIO sysfs is the legacy way to manage the GPIO lines under Linux from user space. It uses the directory /sys/class/gpio to set or read any GPIO line. replaced with the GPIO character device.

Inside this directory there are two directories called:

  • export
  • unexport

To manage a GPIO line you have to know its kernel ID. The Kernel IDs of any Acme Systems SoM are available on:

Check the port available by typing this command:

sudo less /sys/kernel/debug/pinctrl/fc038000.pinctrl-atmel_pinctrl/pinconf-pins

The Microchip chips have the GPIO lines organized by 32 bit port called PA,PB, etc.

Before set or read a port you have to export it. Follow an example on how to set, reset and read the port PA1 (Kernel ID 1) from the command line:

Set the line status of GPIO line PA1

sudo sh -c "echo 1 > /sys/class/gpio/export"
sudo sh -c "echo out > /sys/class/gpio/PA1/direction"
sudo sh -c "echo 1 > /sys/class/gpio/PA1/value"

Reset the line status of GPIO line PA1

sudo sh -c "echo 0 > /sys/class/gpio/PA1/value"

Read the line status of GPIO line PA1

sudo sh -c "echo in > /sys/class/gpio/PA1/direction"
cat /sys/class/gpio/PA1/value

The official documentation about the GPIO Sysfs interface is available on:

Related products

RoadRunner D2

Info Doc Buy

  • CPU Microchip SAMA5D27
  • Cortex A5 @ 500 MHz
  • Very low power consumption:
    396mW in full speed mode
    198mW at Linux prompt
    17mW in standby mode
    10mW in suspend to RAM mode
  • Armhf architecture
  • DDR3L RAM 256 MB
  • QuadSPI 0/16/64/128MB
  • Size: 40x30 mm
  • Plug-in module
  • 200 pins 0.4 mm pitch
  • TFT parallel interface
  • Boot from internal Quad SPI or external uSD/eMMC
  • Linux Kernel 5.15 LTS
  • Debian, Buildroot and Yocto
  • Open source drivers

Info Doc Buy

  • Single Board Computer based on RoadRunner Linux SOM (Included)
  • Classic "Credit Card" form factor
  • Two USB Host 2.0 ports (one configurable as USB client on the USB-C connector)
  • One 10/100 Mbit/s Lan port
  • Two AcmeSensor ports
  • Double placements for 2.54mm pitch 20x2 pinstrips (not soldered) for GPIOS, SPI, I2C, Serial etc ports
  • Credit Card footprint

Info Buy

  • All the circuitries you need to test the RoadRunner SOM
  • USB host, USB device, Ethernet port, MicroSD socket
  • Test points for power consumption measurements
  • All the Roadrunner signals exposed on 2.54mm pitch pins
  • On-board supercap for RTC and backup memory circuit

Home page Roadrunner technical documentation Buy