CM4-DISP-BASE-5A

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


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

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

I am a Raspberry Pi CM4 kit with a 5 inch touch screen all-in-one machine. The PoE pin Gigabit Ethernet port supports 4K output, onboard four-way USB2.0, 5-inch touch screen, etc. The all-in-one kit is convenient for users.

Note

1. Do not plug and unplug any device except USB and HDMI while the baseboard is working.
2. If the fan needs to be replaced, please confirm the fan voltage and then power on.
3. The USB SLAVE interface is used to burn the image and cannot be used as an OTG interface.
4. In normal use, it is necessary to provide at least 5V 2.5A power supply for CM4. Otherwise, there may be problems such as automatic shutdown, frequency reduction and so on.
5. Onboard default 4-way USB 2.0 interface.
6. Support POE pins, additional POE HAT is required if POE function is required.
7. This screen needs to add a driver to work.

Dimension

CM4-DISP-BASE-5A
CM4-DISP-BASE-5A.png

What's Onboard

CM4-IO-BASE-5a-details.png


No. Component Description
1 Power supply/programming interface 5V/2.5A power supply, can also be used as the eMMC programming interface
2 CM4 Indicator PWR: Raspberry Pi power indicator

ACT: Raspberry Pi working status indicator

3 TF card slot for installing TF card with system, only for Lite version
4 HDMI0 Interface HDMI interface, support 4K 30fps output
5 USB 2.0 Interface 4-channel USB 2.0 Interface, for connecting USB devices
6 Gigabit Ethernet Gigabit Ethernet RJ45 connector, with 10 / 100 / 1000M network support
7 CAM Interface Dual MIPI CSI camera interface
8 CM4 Connector for All versions of Compute Module 4
9 BOOT Button ON: Compute Module 4 boots to the USB Type-C port

OFF: Compute Module 4 boots to eMMC or Micro SD card

10 FAN Interface Access cooling fan, support speed regulation and speed measurement, only support 5V fan
11 RTC battery socket Support CR1220 button cell
12 M.2 Interface Suitable for NVIE SSD, or communication module supporting PCIE M.2 M KEY interface
13 40PIN GPIO Interface easy to connect to various HAT modules
14 System functions WF-DIS: WIFI disabled

BT-DIS: Bluetooth disabled
WP-DIS: Boot firmware write protection

15 FAN power supply options Optional 5V (default) or 12V voltage to drive the fan
16 I2C bus selection for RTC/FAN SDA0/SCL0: shared by I2C-10 and CSI/DSI (default)

GPIO3/2: shared by I2C-1 and 40PIN

17 RTC interrupt pin toggle GL-EN: RTC trigger interrupt CM4 power off

PI-RUN: RTC trigger interrupt CM4 restart
D16: RTC trigger interrupt D16 pin (default)

18 IO-VREF selection CM4 IO logic voltage switch 3.3V (default) or 1.8V
19 PoE Pin Support PoE HATs

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 demo 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).
CM4 Burn EMMC 12.png

Enable Screen & Camera

Bullseye & Bookworm

Display

Comment the following statement in the config.txt file (the config file is located in the root directory of the TF card, i.e. in /boot or in /boot/firmware/):
Add the following statement below [all]:

dtoverlay=vc4-kms-dsi-7inch

Reboot the Raspberry Pi after saving:

sudo reboot

Camera

libcamera-hello -t 0
Or
libcamera-hello

#The default camera model is ov5647, if you need to change other cameras, you can modify it by yourself
#Add:
dtoverlay=ov5647,cam1
dtoverlay=ov5647,cam0

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

#And then reboot
reboot

#Other commands:
#Check whether the camera is detected  
libcamera-hello --list-cameras

#Open the camera
libcamera-hello  --camera 0

#Take photo
libcamera-jpeg -o test.jpg
#Add --camera to specify the camera

For more commands, you can refer to this link.
Click here to see Raspberry Pi user manual

Buster

I2C-10, I2C-11 and I2C-0 devices are used when using the camera and DSI. Run the following commands:
Run the following commands:

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/
sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
#After running, turn off the power and reboot the CM4

Note: On December 2, 2021, the Raspberry Pi OS for Raspberry Pi: the Buster branch, and the Bullseye branch.

The Buster branch is a continuation of the old system and is more stable. The Bullseye branch adds some new features and uses open-source libraries and new interfaces.

If you use the Buster branch system, you need to run raspi-config, select Interfacing Options -> Camera -> Yes -> Finish -> Yes, and "enable camera", and reboot it to save the settings.
Load the above bin file and reboot, the image can be directly output. View the first connected camera screen:
View the first connected camera screen:

sudo raspivid -t 0 -cs 0

View the second connected camera screen:

sudo raspivid -t 0 -cs 1

POE

As the POE pin headers are aligned with Raspberry Pi 4B/3B+, you can directly connect it to POE HAT.
PoE HAT (B)
PoE HAT (C)
PoE HAT (D)
PoE HAT (E)

RTC FAN

RTC FAN.png

  • Note: Please connect the fan before turning on the power of the base board and then complete the test. Please do not connect the fan after the base board is powered on, because the fan control chip has been powered on, otherwise the chip will be burned!
  • Note: Before connecting, please confirm whether the rated voltage of the fan is consistent with the voltage actually connected to the fan.

Please note that 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)
FAN ( EMC2301 ) on i2c-10, address is 0x2f (7-bit address)

If you need to add it to your program instead of the kernel, you can refer to the C and Python demo reference click here

RTC

sudo nano /boot/config.txt
#Add at the end
dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
#dtoverlay=i2c-rtc,pcf85063a
#Add # in front of 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 close the network 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 the version information

sudo hwclock --verbose



Fan

When powered on, the fan will spin for 1 second, stop for 2 seconds, and then spin again, this is a normal phenomenon.
There is currently no official configuration method for fans, there is a third-party configuration method: https://github.com/neg2led/cm4io-fan
This method is published by a third party, and we are not responsible for any problems!
This method is only available on I2C-10

mkdir -p ~/src
cd ~/src
git clone https://github.com/neg2led/cm4io-fan.git
cd cm4io-fan
sudo chmod 777 install.sh
sudo ./install.sh
#The following is a description of config.txt
#############################
Name: cm4io-fan
Info: Raspberry Pi Compute Module 4 IO Board fan controller
Load: dtoverlay=cm4io-fan,<param>[=<val>]
Params: minrpm RPM target for the fan when the SoC is below
                           mintemp (default 3500)
       maxrpm RPM target for the fan when the SoC is above
                           maxtemp (default 5500)
       midtemp Temperature (in millicelcius) at which the fan
                           begins to speed up (default 50000)
       midtemp_hyst Temperature delta (in millicelcius) below mintemp
                           at which the fan will drop to minrpm (default 2000)
       maxtemp Temperature (in millicelcius) at which the fan
                           will be held at maxrpm (default 70000)
       maxtemp_hyst Temperature delta (in millicelcius) below maxtemp
                           at which the fan begins to slow down (default 2000)
 #############################
Or directly refer to the following:
dtoverlay=cm4io-fan,minrpm=500,maxrpm=5000,midtemp=45000,midtemp_hyst=2000,maxtemp=50000,maxtemp_hyst=2000
The temperature is higher than 45 degrees Celsius and starts to accelerate, and the highest speed is higher than 50 degrees Celsius

Resources

Document

3D Drawing

Demo codes

Software

FAQ

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


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)