Difference between revisions of "Template:CM4-DUAL-ETH-WIFI6-BASE User guide"

From Waveshare Wiki
Jump to: navigation, search
Line 47: Line 47:
 
sudo hwclock --verbose
 
sudo hwclock --verbose
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
==CSI DSI==
===RTC===
+
===Configure File===
RTC chip: PCF85063A<br/>
+
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.<br/>
Default I2C: I2C1<br/>
+
Booting is performed as follows:<br/>
I2C address: 0x51<br/>
 
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
sudo nano /boot/config.txt
+
wget https://www.waveshare.com/w/upload/7/75/CM4_dt_blob_Source.zip
   #Add at the end
+
   unzip -o CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source
   dtparam=i2c_vc=on
+
   sudo chmod 777 -R CM4_dt_blob_Source
  dtoverlay=i2c-rtc,pcf85063a
+
   cd CM4_dt_blob_Source/
   #Add # in front of dtparam=audio=on
+
   #Execute if two cameras and DSI0 are used
  #dtparam=audio=on
+
   sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
   #Save and exit, restart
+
  #Execute if using two cameras and DSI1
   sudo reboot
+
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
</syntaxhighlight>
+
   #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
====Hwclock====
+
  #If you need to restore, delete the corresponding dt-blob.bin: sudo rm -rf /boot/dt-blob.bin
Synchronize system clock -> hardware clock.<br/>
+
  #Execution is complete, turn off the power and restart CM4
<syntaxhighlight lang="python">
 
sudo hwclock -w
 
</syntaxhighlight>
 
Synchronize hardware clock -> system clock.<br/>
 
<syntaxhighlight lang="python">
 
sudo hwclock -s
 
   #Need to close the network, or close the network time, otherwise it will be changed back.
 
</syntaxhighlight>
 
Set the hardware clock time:<br/>
 
<syntaxhighlight lang="python">
 
sudo hwclock --set --date="9/8/2021 16:45:05"
 
</syntaxhighlight>
 
View hardware clock.<br/>
 
<syntaxhighlight lang="python">
 
sudo hwclock -r
 
</syntaxhighlight>
 
Show version information.<br/>
 
<syntaxhighlight lang="python">
 
sudo hwclock --verbose
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
===Record Test===

Revision as of 03:52, 2 December 2022

User Guide

Note

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

Image Programming

RTC FAN

Fan

As shown in the figure, switch the FAN voltage according to the position of the resistor, and the default is 12V.
CM4-DUAL-ETH-WIFI6-BASE User guide01.png
The fan PWM pin is controlled by GPIO18.

RTC

RTC chip: PCF85063A
Default I2C: I2C1
I2C address: 0x51

sudo nano /boot/config.txt
  #Add at the end
  dtparam=i2c_vc=on
  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

Show version information.

sudo hwclock --verbose

CSI DSI

Configure File

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://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/
  #Execute if two cameras and DSI0 are used
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
  #Execute if using two cameras and DSI1
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
  #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
  #Execution is complete, turn off the power and restart CM4

Record Test