Compute Module 5 IO Board

From Waveshare Wiki
Jump to: navigation, search

Overview

Compute Module 5 IO Board


Onboard interfaces: DSI, CSI, HDMI, USB2.0/3.0,

I2C, I2S, SPI, UART, RPi, Ethernet

{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

The Compute Module 5 IO Board is a baseboard officially released by Raspberry Pi that can be used with Raspberry Pi Compute Module 5, which can be used as a development system for Compute Module 5 and integrated into end products as an embedded circuit board, and can also be used to quickly create a system using off-the-shelf components such as Raspberry Pi expansion board and M.2 hard disk. Its primary interfaces are located on the same side, making it convenient for users and simplifying the design of the casing.

Features and precautions

1. Do not plug or unplug any device other than USB and HDMI when the device is powered on
2. Type C is used as the burning port and power supply port
3. Onboard 2 USB 3.2 Gen1 ports
4. Supports 4 screens to display different contents, adds MIPI DSI driver, regardless of whether a screen is connected, the system will default to connect, the screen will display in split-screen mode (related to the system version)
5. Do not connect other devices when using Type C to burn. Insufficient power supply for burning will cause the device to be unrecognized

Dimensions

Core board size

500px-Compute-Module-5-1-1.png

Baseboard size

800px-Compute-Module-5-IO-Board-size.jpg

Image Burning

How to enter burning mode

Enter burning mode
1. Connect the jumper cap to BOOT

Click here for EMMC version
Click here for LITE version

POE

There is no POE module on board, only POE pins, and the position is compatible with PI5, so you can use PI5's POE module
Waveshare POE

PoE HAT (F)
PoE HAT (G)

NVME

Mount

1. Enable PCIE interface

Add to /boot/firmware/config.txt:
dtparam=pciex1

2. PCIE is gen2 by default, if you need to enable PCIE gen3, then add following to /boot/firmware/config.txt:

dtparam=pciex1_gen=3

3. After the modification, restart the PI5, and the device can be recognized.

As shown in the figure below, SM2263 is identified as my SSD solid state drives, and the other PI5 is the RPI chip
PCIe TO M.2 HAT+ W 1.png

4. Partition, skip this step if you have partitioned and formatted on other platforms (Note: partitioning will delete all data on the SSD, proceed with caution)

Lsblk     This command is executed to view the disk (if you want to see the details, run the sudo fdisk -l command)
PCIe TO M.2 HAT+ W 2.png
Partition: 
sudo fdisk /dev/nvme0n1    The device number is the total device number, do not add p1, that is just a partition
How to use the partitioning tool fdisk:
n New partition
q Quit without saving
p Print the partition table
m Print the selection menu
D Delete the partition
w Save and exit
t Modify the ID number
Add the partition and execute n, then save and exit with w

5. Format

sudo mkfs.     Execute the command and press Tab key, you will see a lot of different suffixes, and the different suffixes are the formats you need to format
PCIe TO M.2 HAT+ W 3.png
If I want to format it in ext4 file format, then execute the command:
sudo mkfs.ext4 /dev/nvme0n1p1
Wait a moment, once all "done" appear as below, it indicates that the formatting is completed
PCIe TO M.2 HAT+ W 4.png

6. Mount

Create a mount directory
sudo mkdir toshiba
Mount the device
sudo mount /dev/nvme0n1p1 ./toshiba
Check the disk status
df -h

Read/Write test

Enter the directory where the disk is mounted

cd toshiba
  • Free up the memory
sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
  • Copy Raspberry Pi memory content to the hard disk (write)
sudo dd if=/dev/zero of=./test_write count=2000 bs=1024k

PCIe TO M.2 HAT+ W 5.png

  • Copy the hard drive content to the Raspberry Pi memory (/etc/fstab read )
 sudo dd if=./test_write of=/dev/null count=2000 bs=1024k

Pcie-m2-6new.png

  • Note: The test results vary for different cards and environments. The Raspberry Pi is significantly affected. If you want to test accurate performance, use a PC for the test

Auto mount

Test shows there's no issue. If it's not required to be used as a system disk, but only for expanding the disk, set it to auto-mount

sudo nano /etc/fstab

#Add at the end
/dev/nvme0n1p1  /home/pi/toshiba  ext4  defaults  0  0
#/dev/nvme0n1p1 is the device name, /home/pi/toshiba refers to mounting to a directory, ext4 is the file system type, defaults uses the default mount option
#Make the changes take effect (reboot only after testing, otherwise it will fail to mount and boot)
sudo mount -a

#Then reboot
Check the device with lsblk

NVMe SSD boot

Boot the Raspberry Pi with a TF card or EMMC first, mount and test it, and make sure the hardware can work properly

Choose one of the following methods

Method 1

1. Run the following command:

sudo raspi-config

PCIE NVME BOOT-1.png

2. Reboot Raspberry Pi

If you find you can't modify it multiple times, please reconnect to the network and then try to modify it (wait for the network to self-calibrate), or modify the file after setting the correct time

3. Burn the system to NVME, then connect the NVME to the expansion board, remove the TF card and power it on again

Method 2

1. Modify the BOOT_ORDER in the Raspberry Pi boot loader configuration:

sudo rpi-eeprom-config --edit 
Modify BOOT_ORDER=0xf41 to BOOT_ORDER=0xf416
PCIe TO M.2 HAT+ W 6.png
For more information, please refer to BOOT_ORDER 

2. Reboot Raspberry Pi

If you find you can't modify it multiple times, please reconnect to the network and then try to modify it (wait for the network to self-calibrate), or modify the file after setting the correct time

3. Burn the system to NVME, then connect the NVME to the expansion board, remove the TF card and power it on again

Fan control

The PI5 fan defaults to starting when the temperature reaches 50 degrees. If you want to control it at other temperatures, you can do so by adding specific content to /boot/firmware/config.txt, for example:

dtparam=fan_temp0=36000,fan_temp0_hyst=2000,fan_temp0_speed=90
dtparam=fan_temp1=40000,fan_temp1_hyst=3000,fan_temp1_speed=150
dtparam=fan_temp2=52000,fan_temp2_hyst=4000,fan_temp2_speed=200
dtparam=fan_temp3=58000,fan_temp3_hyst=5000,fan_temp3_speed=255

Among them:

fan_temp0/1/2/3       Indicates the temperature (36000 means 36℃)
fan_temp0/1/2/3_speed Indicates the corresponding rotational speed (value up to 255)
fan_temp0/1/2/3_hyst Indicates the hysteresis temperature

For more details, refer to here

Notice: There are only 4 temperatures, 0, 1, 2 and 3, and it's not possible to set other temperatures. The hysteresis temperature must not exceed the step range between two temperatures

MIPI

Support dual MIPI, customers can freely choose CSI or DSI connections

The cables are divided into DSI cable and CSI cable, which are not interchangeable. For details, please refer to CSI camera cable and DSI display cable

The DSI screen is 800x480 resolution screen by default, please refer to the corresponding WIKI for other resolution screens

To use the MIPI1 interface, you need to connect a jumper cap

Compute Module 5 IO Board 1 1.png

DSI

#Add the following to the config.txt file:
sudo nano /boot/firmware/config.txt
#DSI1 
dtoverlay=vc4-kms-dsi-7inch,dsi0
#DSI0 
dtoverlay=vc4-kms-dsi-7inch,dsi1

CSI

  • Add the following to the config.txt file:
  • sudo nano /boot/firmware/config.txt
    Mode CAM0 setup statement CAM1 setup statement
    OV9281 dtoverlay=ov9281,cam0 dtoverlay=ov9281,cam1
    IMX290/IMX327 dtoverlay=imx290,clock-frequency=37125000,cam0 dtoverlay=imx290,clock-frequency=37125000,cam1
    IMX378 dtoverlay=imx378,cam0 dtoverlay=imx378,cam1
    IMX219 dtoverlay=imx219,cam0 dtoverlay=imx219,cam1
    IMX477 dtoverlay=imx477,cam0 dtoverlay=imx477,cam1
    IMX708 dtoverlay=imx708,cam0 dtoverlay=imx708,cam1

    Allow one connection to DSI and one connection to CSI, for example, use IMX219 to connect to MIPI1
    For example, if you want to connect a DSI display to MIPI0, add the following to the config.txt file

    dtoverlay=imx219,cam1
    dtoverlay=vc4-kms-dsi-7inch,dsi0
    
  • Use the shortcut Ctrl+o to save the file, then press Enter
    600px-CM4-NANO-B-CSI-03.png
  • Use the shortcut Ctrl+x to exit the editor
  • Reboot the device
    sudo reboot
  • Test the camera
    1. Enter the camera detection command, and you can see that the camera has been detected
      libcamera-hello --list-cameras

      600px-CM4-NANO-B-CSI-01.png
    2. Display the camera screen to the desktop
      libcamera-hello -t 0
    3. Take a photo
      libcamera-jpeg -o test.jpg
    4. Record a 10s video
      libcamera-vid -t 10000 -o test.h264

    Other commands
    Check if the camera is detected

    libcamera-hello --list-cameras
    

    Open the corresponding camera

    libcamera-hello  --camera 1
    libcamera-hello  --camera 0
    

    Take a photo

    libcamera-jpeg -o test.jpg
    #You can add --camera to specify the camera
    

    Real-Time Clock (RTC)

    There is no battery by default, and an additional RTC battery is required

    Software debugging

    The default device is /dev/rtc0

    Regarding time, by inputting "date" in the command line, you can see the current time. Connecting the Raspberry Pi system to the network will automatically synchronize the time. If the default RTC device is connected and functioning properly, the RTC time will be updated after the automatic network synchronization

    sudo hwclock -r Read the RTC time, if there are multiple RTC devices, you can use -f to select the corresponding devices (for example: sudo hwclock -f /dev/rtc1 -r)

    Hwclock

    System clock -> Hardware clock (RTC)

    sudo hwclock -w

    Synchronize hardware clock (RTC) -> System clock

    sudo hwclock  -s
     #Need to turn off the network, or disable network time synchronization, otherwise it will be changed back

    Set the hardware clock time (RTC):

    sudo hwclock --set --date="9/8/2023 16:45:05"

    View the hardware clock (RTC)

    sudo hwclock -r

    Show version information.

    sudo hwclock --verbose

    Automated wakeup

    To support a low-power mode for wake-up alarms, add the configuration:

    sudo -E rpi-eeprom-config --edit
    #Add the following 2 lines as needed:
    POWER_OFF_ON_HALT=1
    WAKE_ON_GPIO=0
    #Restart the device after adding (if you connect to the serial port log, you can see that there are update related logs)
    sudo reboot
    #You can use the following methods to test the function:
    echo +600 | sudo tee /sys/class/rtc/rtc0/wakealarm
    sudo halt  or  sudo poweroff
    #10 minutes later, it will be awakened and restarted

    RTC battery charging

    Note: Before adding this, make sure your RTC battery allows charging and check the maximum allowable voltage

    sudo nano /boot/firmware/config.txt
    #Add
    dtparam=rtc_bbat_vchg=3000000
    #Among these, 3,000,000 represents the maximum voltage. Charging will stop when it reaches 3V, and the charging will restart with a trickle charge when the voltage drops below 3V

    FAQ


     Answer:

    CM5 requires the latest version of Raspberry Pi OS Bookworm (2024-11-19 or later).


    Support




    Technical Support

    If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
    Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)