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}}}

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 on board

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


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

ACT: Raspberry Pi working status indicator

3 TF CARD Interface TF CARD card for access belt 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 sorts of 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 CR1220 button cell can be connected
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 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 HAT access

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

Use the old version (buster) system to load the configuration file and restart to identify, the new version (bullseye) system needs to add the additional modification files

Load Configuration File

When using the camera and DSI, it will occupy three I2C devices: I2C-10, I2C-11, I2C-0
Execute as follows:

wget https://www.waveshare.net/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-disp0-double_cam.dts
# After execution, turn off the power and restart the CM4

Buster

Note: On December 2, 2021, the Raspberry Pi OS for Raspberry Pi split into two branches, 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, uses open source libraries and new interfaces.
If you are using the Buster branch of the system
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.
After loading the above bin file and restarting, the image can be output directly
View the first connected camera screen:

sudo raspivid -t 0 -cs 0

View the picture of the second camera connected:

sudo raspivid -t 0 -cs 1

Bullseye

If you are using the Bullseye branch of the system, refer to the following content

Show

Comment the following statements in the config.txt file (the config file is located in the root directory of the TF card, namely /boot):

#camera_auto_detect=1
#dtoverlay=vc4-kms-v3d

Add the following statement below [all]:

dtoverlay=vc4-fkms-v3d


After saving, restart the Raspberry Pi

sudo reboot

Camera

libcamera-hello -t 0
or
libcamera-hello

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

#where ov5647 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

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

#open camera
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

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;