🛠 Interfacing GPIO and Peripherals on CM3588
Objectives
This tutorial aims to master low-level access to the CM3588 module's input/output interfaces. You will learn to identify available pins on the four 100-pin connectors, configure GPIOs via Linux, and test simple interaction with an external device. Understanding this layer is essential to exploit the 81 GPIOs exposed by the module, distinct from dedicated interfaces like 2.5 GbE Ethernet or USB 3.1 ports.
Required Materials
- CM3588 Module (Standard or Plus version)
- Compatible Carrier Board exposing 100-pin connectors
- Installed Linux OS (Ubuntu/Debian for Rockchip)
- Multimeter or Oscilloscope (optional for verification)
- Electronics kit: resistors, LED, push button
- Connecting cables (Dupont)
- Root or sudo access on the terminal
Steps
- Pin Identification : Consult the schematic of your carrier board. The four 100-pin connectors of the CM3588 expose the RK3588 SoC resources. Note that pins are shared with other functions (PCIe, MIPI). For this tutorial, identify a free GPIO not used by the system (e.g., a GPIO associated with an unused port).
- Tool Installation : Open a terminal and install GPIO utilities if necessary.
sudo apt update
sudo apt install gpiod-tools
- List Available GPIOs : Use
gpiodetectto list available GPIO controllers on the system.
gpiodetect
Identify the controller corresponding to your physical pin.
- Configure an Output : Suppose you identified GPIO
gpiochip0line15. Configure it as output to light an LED.
gpioset gpiochip0 15=1
- Read an Input : To read the state of a button connected as input, use
gpioget.
gpioget gpiochip0 15
- Automation Script : Create a simple bash script to blink an LED.
#!/bin/bash
while true; do
gpioset gpiochip0 15=1
sleep 1
gpioset gpiochip0 15=0
sleep 1
done
Verification
Verify that the LED turns on and off according to the script. If nothing happens, check physical connections and ensure the pin is not reserved by the kernel (check /sys/kernel/debug/gpio). Ensure the module power supply (5-20VDC) is stable and consumption remains below the 20W maximum.
Going Further
Explore the use of MIPI CSI/DSI interfaces via the same connectors to connect high-definition cameras or displays, exploiting the 8K@60Hz capability of HDMI 2.1 outputs. You can also configure PCIe lines (up to 4 lanes) to add NVMe or network extension cards.