• sales

    +86-0755-88291180

Raspberry Pi CM4-to-Pi3-Adapter User Guide

Introduction

Onboard 4-ch USB ports, Gigabit Ethernet port, headphone jack and PoE pin, Raspberry Pi CM4 To 3B Adapter is an alternative solution for Raspberry Pi 3 Model B/B+.

Features

  • Onboard standard CM4 connector, support access to CM4 Lite / eMMc series boards with Quad Core Cortex A72 64-bit processor, more powerful performance.
  • Easily compatible with the interfaces of Raspberry Pi 3B / 3B+ boards.
  • Onboard headphone jack (extended from USB).
  • Onboard 4-ch USB ports, compatible with USB 2.0 / 1.1 transmission.
  • Onboard RJ45 Gigabit Ethernet port, 10 / 100 / 1000 M adaptive.
  • Onboard PoE header, for connecting PoE HATs.
  • DSI interface is DSI1.
  • Micro USB port is for power supply and for programming images USB SLAVE.
  • Please do not connect to other devices when programming the image by micro USB so as to ensure that CM4 can be powered on normally.
  • When using CM4, you need to provide 5V/4A to CM4. Otherwise, it may power off, lower frequency, etc.
  • USB 2.0 is close by default, if used dtoverlay=dwc2,dr_mode=host should be added in config.txt.
  • It only supports 5V fan. (12V is not supported.) Please check it before connecting the fan, and note that the speed of the 5V fan cannot be adjusted without a controller.

Dimensions

CM4-IO-BASE-B

Onboard Resource


LabelNameDescription
1micro USB5V/2.5A power supply, can also be used as eMMC programming interface.
2HDMI0 portHDMI port, supports 4K 30fps output.
3CAM InterfaceMIPI CSI Camera Interface.
4Audio Interface3.5mm Headphone Audio Interface, USB Audio Solution.
5Gigabit Ethernet portRJ45 Gigabit Ethernet port, support 10 / 100 / 1000M network access.
6FAN portConnect to a cooling fan, does not support speed regulation and speed measurement, only supports 5V fans.
7USB 2.0 interface4-way USB 2.0 interface, support various USB device insertion.
8POESupport POE HAT access.
940PIN GPIO interfaceEasy to connect various HAT modules.
10BOOTON: CM4 USB Type C boot boot
OFF: eMMC or SD card boot.
11DISP1 interfaceMIPI DSI display interface, DISP1 interface.
12LED IndicatorIndicates the working status of the Raspberry Pi.
13System function switchBT_DIS: Bluetooth disabled, only for CM4 version with antenna
WiFi_DIS: WiFi disabled, only for CM4 version with antenna
WP_DIS: EEPROM write protection.
14IO-VREF selectionCM4 IO logic voltage switch 3.3V or 1.8V.
15Functional pinRUN: CM4 running status pin
GL-EN: Power supply enable pin.
16CM4 ConnectorApplies to all versions of Compute Module 4.
17Micro SD card interfaceFor inserting Micro SD card with system, only for Lite version.

Introduction

Precautions

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

Writing Image

USB2.0

The USB port is disabled by default on the CM4 to save power. If you need to start, you need to add the following to the config.txt file:

dtoverlay=dwc2,dr_mode=host

After restarting

If you use the latest Raspberry Pi OS (image after October 30, 2021) USB2.0 is OTG mode by default, CM4 will report an error:

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

However, 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).

RTC FAN

  • Note: Before connecting, please confirm the fan voltage and the actual power supply (5V by default).

NOTE DSI and CSI are prohibited when using RTC.
I2C-10 is used by default.

RTC (PCF85063a) on i2c-10, address is 0x51 (7-bit address)

RTC

sudo nano /boot/config.txt
 #Add at the end
 dtparam=i2c_vc=on
 dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
 #Add # before dtparam=audio=on
 #dtparam=audio=on
 #Save and exit, restart
 sudo reboot

Hwclock

Synchronize System Clock -> Hardware Clock

sudo hwclock -w

Synchronize hardware clock -> system clock

sudo hwclock -s
 #Need to close the network, or disable the network to check the time, otherwise it will be changed back.

Set the hardware clock time:

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

View hardware clock

sudo hwclock -r

Display version information

sudo hwclock --verbose

Fan

The fan uses the GPIO18 (BCM) pin to control the switch

CSI DSI

Configuration Files

CSI and DSI is close by default. When using the camera and DSI, I2C-10, I2C-11 and I2C-0 are occupied. Execute the following commands after starting.

wget https://www.waveshare.com/w/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/
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
  #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 the CM4.

Recording test

Then connect the camera and DSI screen:
1: Please connect them when power off.
2: Connect to the power.
3: Wait a few seconds for the screen to start up.
4: If it fails to start, check whether /boot/dt-blob.bin exists, and restart 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 the enable camera, and then restart to save the changes.

Testing the Raspberry Pi Camera
View the camera image:

 sudo raspivid -t 0 -cs 0


New Version

If using the latest Raspberry Pi OS (Bullseye):

#The new system uses dual cameras
#Remove camera_auto_detect=1 in config.txt
#camera_auto_detect=1

#Add to
dtoverlay=imx219,cam1
dtoverlay=imx219,cam0

#where imx219 is the camera sensor model, and there are other sensors
dtoverlay=ov5647,cam0
dtoverlay=imx219,cam0
dtoverlay=ov9281,cam0
dtoverlay=imx477,cam0

#then restart
reboot

#open camera
libcamera-hello -t 0
or
libcamera-hello


#Other part of the command:
#Check if the camera is detected
libcamera-hello --list-cameras

#Open the corresponding camera
libcamera-hello --camera 1
libcamera-hello --camera 0

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

More instructions click me
Reference Raspberry Pi Manual