How-To GPIO Header
Description
The Pi-Tron CM5 has a 40 pin GPIO header on the bottom of the PCB. This 40 pin GPIO header was originally introduced with the Raspberry Pi 2B and can still be found on the Raspberry Pi 5 today with the same pin assignments. See the how-to section below for information on the layout and a GPIO overview together with notes and usage recommendations concerning the GPIO header on the Pi-Tron CM5.
The Pi-Tron CM5 has by default only a placeholder with soldering pads for the 40 pin header, but does not come equipped with the actual header. Also this option is only available for the Board Line (BL) variant of Pi-Tron CM5. Contact our sales team for more details about this option.

Requirements
- No Requirements
How-To
Below is a table which lists all 40 pins of the Pi-Tron CM5s GPIO header. Also see the section Restrictions below for any notes on how to operate the GPIOs and which pins have restrictions and should not be used externally.
Pi-Tron CM5 GPIO header overview:
| Alternate | Name | Pin | Pin | Name | Alternate |
|---|---|---|---|---|---|
| 3.3V | 1 | 2 | 5V | ||
| SDA1 | GPIO 2 | 3 | 4 | 5V | |
| SCL1 | GPIO 3 | 5 | 6 | GND | |
| GPCLK0 | GPIO 4 | 7 | 8 | GPIO 14 | UART0 TXD |
| GND | 9 | 10 | GPIO 15 | UART0 RXD | |
| SPI1 CS1 | GPIO 17 | 11 | 12 | GPIO 18 | SPI1 CS0 |
| GPIO 27 | 13 | 14 | GND | ||
| GPIO 22 | 15 | 16 | GPIO 23 | ||
| 3.3V | 17 | 18 | GPIO 24 | ||
| SPI0 MOSI | GPIO 10 | 19 | 20 | GND | |
| SPI0 MISO | GPIO 9 | 21 | 22 | GPIO 25 | |
| SPI0 CLK | GPIO 11 | 23 | 24 | GPIO 8 | SPI0 CS0 |
| GND | 25 | 26 | GPIO 7 | SPI0 CS1 | |
| ID_SD | GPIO 0 | 27 | 28 | GPIO 1 | ID_SC |
| GPIO 5 | 29 | 30 | GND | ||
| GPIO 6 | 31 | 32 | GPIO 12 | PWM 0 | |
| PWM 1 | GPIO 13 | 33 | 34 | GND | |
| SPI1 MISO | GPIO 19 | 35 | 36 | GPIO 16 | SPI1 CS2 |
| GPIO 26 | 37 | 38 | GPIO 20 | SPI1 MOSI | |
| GND | 39 | 40 | GPIO 21 | SPI1 CLK | |
Restrictions
- SPI0 Chip Select 1 (Pin 26, GPIO 7) is connected to the on-board MCP251xFD CAN-Bus chip and should not be used. It is recommend to not use SPI0 at all, as external peripherals could render the CAN-Bus inoperable, however Chip Select 0 (GPIO 8, Pin 24) is unused.
- The I²C Bus 1 has many connected devices and some bus addresses are already taken. It is recommended to check the data sheet of any new device which is to be connected to this bus that it does not have the same address as an existing device. See the how-to I²C Addresses for an overview of used addresses.
Related documentation
- Covering all aspects of the Raspberry Pi, the official documentation: https://www.raspberrypi.com/documentation
- Documentation for the raspi-config tool: https://www.raspberrypi.com/documentation/computers/configuration.html
- Raspberry Pi SPI documentation: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#spi-overview
- Linux I2C-Tools package: https://i2c.wiki.kernel.org/index.php/I2C_Tools
- Manpages i2c-tools: https://manpages.debian.org/bullseye/i2c-tools/index.html