CM4-IO-BASE-A

From Waveshare Wiki
Jump to: navigation, search
CM4-IO-BASE-A
CM4-IO-BASE-A-1.jpg
Compute Module 4


Mini Base Board, Composite Breakout Board for Developing with Raspberry Pi CM4 / CM4L
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Mini Base Board (A) Designed For Raspberry Pi Compute Module 4.

Release Notes

Version: CM4-IO-BASE-A V4

 1: Fix the inconsistency between BT-DIS and WIFI-DIS silk screen and actual pins
2: DSI interface is changed from DSI0 to DSI1, high resolution is supported

Version: CM4-IO-BASE-A V3.1

 1: Fix the problem that some CM4 cannot be restarted
2: The power supply scheme is modified to improve the output capacity.

Note

1: DO NOT unplug any devices other than HDMI and USB when powering on.
2: FAN only supports 5V, and 12V is not supported. Confirm the fan voltage before connecting. This version of the fan does not have a controller and cannot be adjusted in speed.
3: The DSI display interface is the DSI0 interface, and the DSI1 display interface is not connected. (V4 version starts to display interface for DSI1)
4: A type C interface can be used for the power supply or a USB SLAVE interface for programming images.
5: To ensure the normal power supply of CM4, please do not connect other devices when using the Type C interface to flash the image.
6: When CM4 is in normal use, it needs to provide 5V/2A power supply for CM4. Otherwise, problems such as automatic shutdown, frequency reduction, etc. may occur.
7: When using the M.2 interface, please use the matching screws. Using screws of other lengths may cause the CM4 core to be damaged by the screws.
8: The module does not have any protection, please do not short-circuit the power supply.
9: USB2.0 is closed by default, if you need to open it, you need to add dtoverlay=dwc2,dr_mode=host.
10: If you want to use HDMI1 alone, you can purchase it separately if you need to use it HDMI Adapter.
11: Both USB 3/4 and HDMI1 need to be used, you can use adapter board to connect it out.
12: This expansion board does not support the POE function.
13: M.2 interface power supply is limited to 1.5A, if it causes problems such as slowing down of solid state or other equipment, it is recommended to buy version B. (V3 version has been fixed)

Dimension

CM4-IO-BASE-A:
CM4-IO-BASE-A-details-size.jpg
Compute_Module 4 Core board:
Compute Module 4 IO Board 5.png

What's on board

CM4-IO-BASE-A-details-intro.jpg

No. Component Description
1 CM4 connector Suitable for all versions of Compute Module 4
2 DC power supply/programming interface 5V/2.5A power supply, also can be used as an eMMC programming interface
3 DISP Interface MIPI DSI Display Interface
4 FAN header For connecting cooling fan, allows speed adjustment and measurement, only supports 5V fan.
5 CAM Interface Dual MIPI CSI camera interface
6 HDMI0 Interface HDMI Interface, Support 4K 30fps output
7 USB 2.0 Interface 2-channel USB 2.0 Interface, for connecting sorts of USB devices
8 Gigabit Ethernet Gigabit Ethernet RJ45 connector, with 10 / 100 / 1000M network support
9 M.2 indicator Indicating the operating status of M.2 interface
10 ACT indicator Raspberry Pi operating status indicator
11 PWR indicator Raspberry Pi power indicator
12 BOOT selection Jumper shorted: CM4 would be booted from USB-C interface
Jumper opened: CM4 would be booted from eMMC or TF card
13 40PIN GPIO header Conveniently connect various HAT modules
14 TF Card Slot For connecting a TF card with a pre-flashed image (Lite variant ONLY).
15 HDMI1 interface HDMI1 Interface, Support 4K 30fps output
16 USB 2.0 connector Can be connected through an adapter
17 FE1.1S USB HUB chip, expanding one USB port to 4x ports
18 M.2 Interface Supports sorts of NVME SSD, or communication modules with PCIE M.2 KEY-M interface

Precautions

Do not plug or unplug any device while it is powered on.

Writing Image

USB2.0

CM4 Error:

config failed, hub doesn't have any ports! (err -19)

However, the USB can still be used. If you want to remove this error, remove "otg_mode=1" in [cm4] of config.txt, and add "dtoverlay=dwc2, dr_mode=host" (USB cannot be recognized without adding it).
CM4 Burn EMMC 12.png
If the USB does not work, you need to add the following to the config .txt file:

dtoverlay=dwc2,dr_mode=host

Then reboot.

M.2

The M.2 interface type is M KEY, which only supports PCIE channel devices (including NVME solid state, etc.), and does not support SATA hard disks.

CM4-IO-BASE-A-1-4.jpg

Support some type of adapter cards by using the PCIE channel. Some types of cards cannot be driven by the official Raspberry Pi image, it needs to recompile the kernel.

FAN

The PWM pin of the FAN is connected to the GPIO18 of the CM4 board.
For an example of controlling the fan speed using the Pi GPIOs, see this page: https://www.waveshare.com/wiki/PI4-FAN-PWM#How_to_enable_it_via_Programming

CSI DSI

The V4 version starts to use the DSI1 interface, select the corresponding command when compiling the corresponding file.

CSI DSI

New Version (Bookworm)

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

When using the official base board Compute Module 4 IO Board, note that the J6 jumper cap needs to be connected


DSI

#Add the following to the config.txt file:
sudo nano /boot/firmware/config.txt
#DSI0 (V1~V3)
dtoverlay=vc4-kms-dsi-7inch,dsi0
#DSI1 (V4)
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
    IMX296 dtoverlay=imx296,cam0 dtoverlay=imx296,cam1
    IMX708 dtoverlay=imx708,cam0 dtoverlay=imx708,cam1
  • Use the shortcut Ctrl+o to save the file, then press Enter
    CM4-NANO-B-CSI-03.png
  • Use the shortcut Ctrl+x to exit the editor
  • Reboot the device
    sudo reboot
  • Note:

    1. The single-port camera can only work on CAM0, that is, it is not possible to use CAM1 port alone. But you can use the CAM0 port alone, or connect the dual cameras
    2. If the device is recognized, and the startup prompt "Camera frontend has timed out!" appears, please update "sudo rpi-update"
    
    Test Camera
    1. Enter the camera detection command, and you can see that the camera has been detected
      libcamera-hello --list-cameras

      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
    


    #The new system uses dual cameras
    #Remove camera_auto_detect=1 in config.txt
    #camera_auto_detect=1
    
    #Add
    dtoverlay=imx219,cam1
    dtoverlay=imx219,cam0
    
    #Where imx219 is the camera sensor model and other sensors are supported
    dtoverlay=ov5647,cam0
    dtoverlay=imx219,cam0
    dtoverlay=ov9281,cam0
    dtoverlay=imx477,cam0
    dtoverlay=imx519,cam0
    
    #Then reboot
    reboot
    
    #Open camera
    libcamera-hello -t 0
    or
    libcamera-hello
    
    
    #Other instructions:
    #Check if the camera is detected
    libcamera-hello --list-cameras
    
    #Open the corresponding camera, preview for 5 seconds
    libcamera-hello  --camera 1
    libcamera-hello  --camera 0
    
    #Take photos
    libcamera-jpeg -o test.jpg
    
    #Shoot video
    libcamera-vid -t 10000 -o test.h264
    
    #You can add --camera to specify the camera
    #-t <duration> option allows the user to choose how long the window is displayed in milliseconds

    For more commands, you can click here.

    • Note: If using a DSI interface display there will be an HDMI disabled, even if just compiling the corresponding file without connecting a DSI screen.
    • Connecting either HDMI port will allow output of an image, regardless of which HDMI port is used. If two HDMI screens are connected, only HDMI0 has an image output.
    • To enable two HDMI ports, remove the configuration from config.txt:
    • And then reboot it.

    Please refer to Raspberry Pi manual.

    Old System Version (Buster and Bullseye)

    Configure Files

    CSI and DSI are disabled by default. When using the camera and DSI, three I2C devices, I2C-10, I2C-11, and I2C-0 will be occupied.
    Booting is performed as follows:

    wget https://files.waveshare.com/upload/7/75/CM4_dt_blob_Source.zip
     unzip -o CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source
     sudo chmod 777 -R CM4_dt_blob_Source
     cd CM4_dt_blob_Source/
     #Execute (for version V1~V3)
     sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
     #Execute (for version V4)
     sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
    
     Add the following to the config.txt file:
     sudo nano /boot/config.txt
     Change dtoverlay=vc4-kms-v3d to
     dtoverlay=vc4-fkms-v3d
    
     #When using any DSI, HDMI1 has no image output, even if you are not connected to the DSI screen, as long as you compile the corresponding file, then HDMI1 will have no output
     #If you need to restore, delete the corresponding dt-blob.bin: sudo rm -rf /boot/dt-blob.bin 
     #After execution, turn off the power and restart

    Record Test

    Connect to the camera and the DSI display:
    1. Please make sure it is connected under powering off.
    2. Connect to the power.
    3. The display will be booted after waiting for a few seconds.
    4. If it fails to boot, check whether /boot/dt-blob.bin exists, and reboot it if it exists.

    Old Version (Buster)

    The camera needs to run raspi-config, select Interfacing Options -> Camera -> Yes -> Finish -> Yes, reboot the system, open enable camera, and then restart to save the changes.

    Test the Raspberry Pi camera.
    Check the screen of the first connected camera:

    sudo raspivid -t 0 -cs 0
    

    Check the screen of the second connected camera:

    sudo raspivid -t 0 -cs 1
    


    Resource

    Document

    3D Drawing

    Demo codes

    Software

    FAQ

     Answer:
    • 1. Check whether dtparam -audio - on is blocked in /boot/config.txt
    • 2. Check whether the /boot/dt-blob.bin file exists, if it cannot be used, delete it.



     Answer:

    No, it does not support.

    {{{5}}}


    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)