5108 CM5IO RS485-CANFD EN
Keywords
Raspberry Pi 5, Raspberry Pi 4B, CM5 Core board, CM4 Core board, RPiOS, ISO RS485, ISO CANFD, 40p-GPIO
I. Introduction
CM5IO_RS485-CANFD is a module that provides RS485 expansion and CANFD expansion based on a 40Pin port. It includes two isolated RS485 serial ports and two isolated CANFD ports.
II. Hardware Spec
1) It adopts the 40-pin GPIO of Raspberry Pi for expansion and is compatible with platforms such as Raspberry Pi 3B/4B/5/CM4/CM5.
2) 2*isolated RS485 serial ports, 3.81mm-3Pin ports.
3) 2*isolated CANFD ports, 3.81mm-3Pin ports.
4) Both RS485 and CANFD are equipped with 120Ω termination resistors. If the transmission distance is too long or the cable termination lacks the corresponding matching resistor, it is recommended to short the jumper.
5) Size: 56*65mm, The board material is UL-certified and RoHS-compliant, with a flammability rating of 94V-0.
6) The module is available in three versions: the RS485 version, the CANFD version, and the RS485-CANFD version.
Features of RS485 isolation module:
This module features an automatic flow-control high-speed RS485 isolation unit, integrating power isolation, signal isolation, RS-485 communication, and bus protection into a single RS-485 protocol transceiver module through IC integration technology. The module comes with a built-in constant voltage isolated power supply, capable of achieving 2500VDC electrical isolation withstand voltage protection. It can be connected as a slave device to an RS485 bus or function as a master device to receive and process information from various slave units.
- Supports connection of up to 64/128 nodes.
- Transmission rate up to 500Kbps.
- Extremely low electromagnetic interference (EMI).
- Operating temperature range: -40℃ to +85℃.
- Integrated power isolation, signal isolation, and bus ESD protection functions.
Features of CANFD isolation module:
This module features a built-in isolated power supply, capable of achieving 2500VDC electrical isolation between both ends. It retains the primary characteristics of an isolated CAN transceiver while enhancing data transmission performance, and complies with the ISO 11898-2 physical layer standard.
- Baud rate up to 5Mbps.
- The same network supports connection of at least 110 nodes.
- Operating temperature range: -40℃ - +105℃.
- Bus timeout protection.
III. Module test
When using this module, the serial port numbers for various versions of Raspberry Pi are different, as compared below:
| Port number | 1 | 2 | 3 | 4 |
| Port type | CANFD | CANFD | RS485 | RS485 |
| CM5, RPi 5 | CANFD0 | CANFD1 | UART2 | UART4 |
| CM4, RPi 4B | CANFD0 | CANFD1 | UART3 | UART5 |
Software: The version of Raspberry Pi OS is 2025-05-13-raspios-bookworm-arm64.img.xz
The download link is:
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
Hardware: CM5IO_RS485-CANFD paired with Raspberry Pi 5:
The schematic diagrams of the four ports are as follows (RS485-CANFD version, the other two versions only include the corresponding port):
3.1 RS485 test
Power up the OS, open the terminal and execute the following command:
sudo nano /boot/firmware/config.txt
Insert the following lines at the end of the file:
dtoverlay=uart2
dtoverlay=uart4
Saving and restarting the OS.
The installation command for CuteCom is:
sudo apt install cutecom
After installation, click on the Raspberry Pi icon in the top left corner of the desktop, and you will find a shortcut for CuteCom under "System Tools".
If you encounter insufficient permissions during use, please open the terminal and enter:
sudo cutecom
to execute CuteCom.
▶ Test data sending and receiving between ttyAMA2 and the PC:
Insert a USB-to-485 converter on the PC and connect it to the RS485 port (ttyAMA2, corresponding to UART2) on the module. Then, open serial port software on both sides for sending and receiving data. The results are as follows:
According to the tests, the baud rate can reach up to 2.01Mbps (Transmitted data must be free from garbled characters or loss.).
▶ Test data sending and receiving between ttyAMA4 and the PC:
Insert a USB-to-485 converter on the PC and connect it to the RS485 port (ttyAMA4, corresponding to UART4) on the module. Then, open serial port software on both sides for sending and receiving data. The results are as follows:
According to the tests, the baud rate can reach up to 2.01Mbps (Transmitted data must be free from garbled characters or loss.).
▶ Test data sending and receiving between ttyAMA2 and the ttyAMA4:
Connect the two RS485 ports (ttyAMA2 and ttyAMA4) on the module together. Then, open serial port software on both sides for sending and receiving data. The results are as follows:
According to the tests, the baud rate can reach up to 1.54Mbps (Transmitted data must be free from garbled characters or loss.).
3.2 CANFD test
CAN uses the SPI interface, the mcp251xfd is the CAN controller, spi0-0 and spi0-1 are different chip selects on the same SPI interface, and interrupt is the interrupt number of the MCP2518FD. All must correspond to the hardware.
Note: The 120Ω terminal resistor must be enabled on at least one end of the communication link (transmitter or receiver). If it is necessary to enable at the module end, use a jumper cap to short-circuit the 120Ω terminal resistor pin for the corresponding port.
First, update the OS by executing the following in the terminal:
sudo apt update
sudo apt upgrade
Add the CAN port configuration to config.txt and execute the following command:
sudo nano /boot/firmware/config.txt
Insert the following lines at the end of the file:
dtoverlay=spi1-3cs
dtoverlay=mcp251xfd,spi0-0,interrupt=25
dtoverlay=mcp251xfd,spi0-1,interrupt=24
In the GUI, follow the steps shown in the figure below to enable SPI:
Reboot the OS. In the terminal, execute dmesg | grep spi to check the SPI information. The highlighted message shows that can0 and can1 have been successfully recognized:
Install CAN software:
sudo apt-get install can-utils
Execute the following commands to enable CANFD(我们将波特率设置为bitrate:500000,dbitrate:2000000):
sudo ip link set can0 up type can bitrate 500000 dbitrate 2000000 restart-ms 1000 berr-reporting on fd on
sudo ip link set can1 up type can bitrate 500000 dbitrate 2000000 restart-ms 1000 berr-reporting on fd on
sudo ifconfig can0 txqueuelen 65536
sudo ifconfig can1 txqueuelen 65536
Note: both a bitrate of 1000000 (1M) and a dbitrate of 5000000 (5M) can work properly.
After completing the setup, execute ifconfig to check the CAN connections, and you will see can0 and can1:
Connect the USB CANFD transceiver between the module and the PC, and use the cangaroo software on the PC side for reception. Download cangaroo at:
http://www.mcuzone.com/wiki/5108_CM5IO_RS485-CANFD/cangaroo-win32-ccdcb64.zip
Set up the cangaroo as follows (Measurement - Setup...):
COM85 is the PC side monitoring port of the USB CANFD transceiver (varies by OS configuration). The Bitrate and CANFD Bitrate should correspond to the bitrate settings in the CANFD enable commands mentioned above.
Test sending data via CAN0:
Connect the USB CANFD transceiver to the CAN0 port of CM5IO_RS485-CANFD, then launch cangaroo on the PC (COM85) and begin listening (Measurement - Start Measurement).
cansend can0 123#0123456789ABCDEF
(Note: The part before "#" is the CAN device ID; the part after "#" is the transmission content, which is in hex format and can be customized.)
Can be executed multiple times:
Output the following for "cangaroo" to confirm proper sending and receiving:
Test receiving data via CAN0:
Execute in the terminal:
candump can0 -a
Note: The -a parameter indicates that the corresponding ASCII codes of hex digits will be displayed alongside the received results; if this parameter is not added, the ASCII codes will not be shown.
Within the Transmit View of cangaroo's main interface, configure the Address, DLC, and the data to be transmitted. The figure shows the hex ASCII code data for sending "MCUZONE!":
Then press the Send key (or the Send Repeat key to resend), and you will see the data sent from the cangaroo in the terminal:
Test sending data via CAN1:
Connect the USB CANFD transceiver to the CAN1 port of CM5IO_RS485-CANFD, then launch cangaroo on the PC (COM85) and begin listening (Measurement - Start Measurement).
Execute in the terminal:
cansend can1 123#0123456789ABCDEF
(Note: The part before "#" is the CAN device ID; the part after "#" is the transmission content, which is in hex format and can be customized.)
Can be executed multiple times:
Output the following for "cangaroo" to confirm proper sending and receiving:
Test receiving data via CAN1:
Execute in the terminal:
candump can0 -a
Note: The -a parameter indicates that the corresponding ASCII codes of hex digits will be displayed alongside the received results; if this parameter is not added, the ASCII codes will not be shown.
Within the Transmit View of cangaroo's main interface, configure the Address, DLC, and the data to be transmitted. The figure shows the hex ASCII code data for sending "MCUZONE!":
Then press the Send key (or the Send Repeat key to resend), and you will see the data sent from the cangaroo in the terminal:
Contact Us
Email: mcuzone@vip.qq.com
Tel: +86(0)13957118045
If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!
Copyright 2004-2025 Wildchip




QQ:8204136