Template: CM4 Duino Guide

From Waveshare Wiki
Revision as of 11:19, 15 March 2022 by Eng20 (talk | contribs) (Created page with " ==Writing Image== *Write Image for Compute Module Boards eMMC version *Wrote Image for Compute Module Boards Lite version ==USB2.0== The USB port is disabled by def...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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



CSI DSI

CSI and DSI are disabled by default. I2C-10、I2C-11、I2C-0 should be used for Camera and DSI displays.
Open a terminal and run the following commands:

 sudo apt-get install p7zip-full
 wget https://www.waveshare.com/w/upload/4/41/CM4_dt_blob.7z
 7z x CM4_dt_blob.7z -O./CM4_dt_blob
 sudo chmod 777 -R CM4_dt_blob
 cd CM4_dt_blob/
 #If you want to use both cameras and DSI0
 sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
 #If you want to ue both cameras and DSI1
 sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
 #HDMI1 is disabled if you use DSI interfaces for displayin. HDMI1 cannot work even thought you just built the file without connecting DSI display, please note it.
 #If you want to enable the HDMI1, please remove the dt-blob.bin file with the command: '''sudo rm -rf /boot/dt-blob.bin'''
 #Turn off IO Board and re-power the CM4

Connect Cameras and DSI display
1: Please first disconnect power off the IP Board when connecting.
2: Use CM-DSI-ADAPTER to connect Compute Module 4 PoE Board and DSI displays
3: UseCSI adapter cable to connect Compute Module 4 PoE Board and CSI cameras.
3: Connect the power adapter
4: Wait for booting.
5: If the DSI display cannot work, please check if you have added /boot/dt-blob.bin and reboot.
6: Please enable camera by raspi-config, choose Interfacing Options->Camera->Yes->Finish-Yesand reboot

Reference:

Test RPi Camera:
Test video0:

sudo raspivid -t 0 -cs 0

Test video1:

sudo raspivid -t 0 -cs 1