Difference between revisions of "Template:CM-STEREO-VISIOn-BOARD-manual"

From Waveshare Wiki
Jump to: navigation, search
(Created page with " ==<font color=blue>2 烧录镜像</font>== ===<font color=blue>2.1 烧写镜像到Compute Module 3/Compute Module 3+</font>=== 如果你使用的是树莓派 Compute Module...")
 
Line 1: Line 1:
  
==<font color=blue>2  烧录镜像</font>==
+
==<font color=blue>2  Write image</font>==
===<font color=blue>2.1 烧写镜像到Compute Module 3/Compute Module 3+</font>===
+
===<font color=blue>2.1 Write image for Compute Module 3/Compute Module 3+</font>===
如果你使用的是树莓派 Compute Module 3 或者 Compute Module 3+。这几款带有 eMMC的计算模块的话,使用的时候需要把镜像烧写到计算模块上的eMMC内,否则无法使用。<br/>
+
If you use Compute Module 3 or Compute Module 3+, you should write an image to the internal eMMC<br/>
烧录到eMMC的步骤如下:<br />
+
The steps of writing eMMC:<br />
1)电脑上运行[http://www.waveshare.net/w/upload/f/f3/Rpiboot_setup.zip RPiboot_Setup]软件,安装树莓派 USB 驱动,安装前建议先关掉杀毒软件。安装成功后,在开始文件夹下会有一个 rpiboot.exe软件,如下图所示:<br/>
+
1)Run the [https://www.waveshare.com/w/upload/f/f3/Rpiboot_setup.zip RPiboot_Setup] software to install the driver. You will get a rpiboot.exe file in the installation directory:<br/>
 
[[File:Compute_Module_PoE_Board_User_Manual-4.png|800px]]<br />
 
[[File:Compute_Module_PoE_Board_User_Manual-4.png|800px]]<br />
2)将STEREO扩展板上的USB SLAVE ENABLE 开关切换到EN一端 <br />
+
2)Turn the USB SLAVE ENABLE switch into EN <br />
3)接上计算模块(带eMMC的计算模块)<br />
+
3)Connect the Compute Module 3 or Compute Module 3+<br />
4)将STEREO扩展板上的USB接口通过USB线连接至PC<br />
+
4)Connect the USB interface of STEREO board to PC <br />
6)此时,<font color="#ff0000">以管理员权限打开软件rpiboot.exe</font>,PC将自动识别计算模块内的eMMC为U盘<br />
+
6)<font color="#ff0000"Run rpiboot.exe as administrator</font>, PC will recognize eMMC of Compute module as a portable drive.<br />
7)运行[http://www.waveshare.net/w/upload/7/76/Win32DiskImager.zip Win32DiskImager-烧录镜像软件],选择镜像,将镜像烧录到eMMC中<br />
+
7)Run [http://www.waveshare.net/w/upload/7/76/Win32DiskImager.zip Win32DiskImage] software to write image to eMMC<br />
注:如果原来已经烧录过镜镜,可以先用[http://www.waveshare.net/w/upload/d/d7/Panasonic_SDFormatter.zip Panasonic_SDFormatter-SD卡格式化软件]进行格式化后,在烧录。<br />
+
Note: If you wrote image to the eMMC before, you need to format it firstly by [https://www.waveshare.com/w/upload/d/d7/Panasonic_SDFormatter.zip Panasonic_SDFormatter] software<br />
8)烧录完成后,断开连接USB线。断开电源后,重新接上电源到STEREO扩展板的PWR接口,即可从eMMC启动系统<br />
+
8)After writing, you can disconnect the USB cable, and re-power the STEREO board to start the CM3/CM3+ by connecting 5V power adapter to PWR interface<br />
<font color="#ff0000">注意:
+
<font color="#ff0000">Note:
*在烧写过程中,PC机不要另外对其他USB设备进行读写操作,避免出现冲突;<br />
+
*While writing the image, DO NOT write other portable storage drives to avoid conflicting.<br />
*树莓派官方提供的镜像,默认的帐号是:pi 密码是:Raspberry。
+
*The default user name and password of the image of Raspberry are pi and raspberry.
*由于CM3的eMMC只有4G(最新的 CM3+扩大了eMMC的容量,可以支持正常的树莓派镜像了),所以烧录的镜像大小不可以超过4G。因此,如果烧录Raspbian,只能使用Lite版本的镜像。如果想要GUI的。可以在安装完成后运行下面的指令安装 GUI:
+
*The EMMC of CM3+ is extended, which allows CM3+ to install a common desktop image. However, the eMMC of CM3 is only 4G, therefore if you want to write an image to CM3, please choose Raspbian Lite. You can also install GUI for Lite image separately by commands below (network is required):
 
</font>
 
</font>
 
<pre>
 
<pre>
Line 22: Line 22:
 
  sudo apt-get install raspberrypi-ui-mods
 
  sudo apt-get install raspberrypi-ui-mods
 
</pre>
 
</pre>
<font color="#ff00ff">如果你使用STEREO扩展板没办法正常烧录程序,请尝试以下步骤:
+
<font color="#ff00ff">If you cannot write a image to eMMC successfully, you can try the following steps:
*使用WIN10系统进行烧录,多数客户反馈WIN7或linux系统烧录不稳定。
+
*Use Windows 10 PC instead of Windows 7 or Linux.
*确定你的CM3/CM3+版本是否正常,eMMC背面会多一颗IC。只有eMMC版本的,才可以通过当前方式烧录。不带eMMC的,请参考"烧写镜像到Compute Module 3 Lite或Compute Module 3+ Lite"。
+
*Make sure that the Compute module you use is the eMMC version which has one more chip on the backside.
 
[[File:Compute_Module_PoE_Board_User_Manual_FAQ10.jpg|400px]]
 
[[File:Compute_Module_PoE_Board_User_Manual_FAQ10.jpg|400px]]
*注意PWR接口需要接入5V电源适配器。
+
*You should connect a 5V power adapter to the PWR interface.
*更换一条USB数据线。
+
*Change another USB cable for a try.
*更换一个PC机的USB接口。
+
*Change to other USB port of PC for a try.
*尝试重启PC机。
+
*Try to restart your PC.
*尝试重新拔插CM3/CM3+
+
*Try to reset the CM3/CM3+ board.
*尝试在另一台电脑烧录。
+
*Try with other PC.
 
</font>
 
</font>
  
===<font color=blue>2.2 烧写镜像到Compute Module 3 Lite或Compute Module 3+ Lite</font>===
+
===<font color=blue>2.2 Write image for Compute Module 3 Lite/Compute Module 3+ Lite</font>===
烧写镜像到Lite的操作为:<br />
+
The steps for writing image for Lite version::<br />
1、下载好像烧录的镜像。<br />
+
1、Donwload image from Raspberry Pi website.<br />
2、将TF卡用读卡器插到电脑,TF卡最低要求8G(建议使用16G或32G)。<br />
+
2、Insert TF card to host PC by card reader, the size of the TF card should at least be 8G.<br />
3、打开[http://www.waveshare.net/w/upload/7/76/Win32DiskImager.zip Win32DiskImager-烧录镜像软件],选择第1步准备的镜像烧录。(同烧录树莓派镜像一样)<br />
+
3、Run [https://www.waveshare.com/w/upload/7/76/Win32DiskImager.zip Win32DiskImager] software for writing, it just the same as how you write an image for Raspberry Pi board.<br />
4、烧录成功后,把TF卡插到STEREO扩展板板的TF卡卡槽,上电即可。<br />
+
4、After writing, insert the TF card to the card slot of STEREO Board.<br />
  
==<font color=blue>3 连接DSI屏幕</font>==
+
==<font color=blue>3 Connect DSI display</font>==
本次实验采用的DSI屏幕型号为:4.3inch DSI LCD,亦可采用树莓派基金会提供的树莓派屏幕<br />
+
Here we use 4.3inch DSI LCD for example, you can also use official 7inch LCD.<br />
*1: 确保断电状态下操作
+
*1: Power off the STEREO Board
*2: 将15Pin FPC线连接STEREO扩展板的DISP1接口和DSI屏幕
+
*2: Connect 15Pin FPC cable to STEREO Board and DSI display
*3: 连接电源
+
*3: Connect the power adapter to STEREO Board
*4: 等待几秒后屏幕启动
+
*4: Wait for several seconds to start Raspbian
<font color="#ff0000">注意:
+
<font color="#ff0000">Note:
*如果使用官方的镜像,需要将dt-blob.bin复制到/boot目录下才可以正常使用。<br />
+
*If you use Raspberry Pi official image, you need to compy dt-blob.bin file to /boot directory<br />
[[:File:DTS_BIN.7z|设备树源文件及其二进制文件]]<br />
+
[[:File:DTS_BIN.7z|DTS_BIN file]]<br />
 
[[File:Compute_Module_PoE_Board01.jpg]]
 
[[File:Compute_Module_PoE_Board01.jpg]]
 
</font>
 
</font>
  
==<font color=blue>4 连接HDMI屏幕</font>==
+
==<font color=blue>4 Connect HDMI display</font>==
本次实验采用的HDMI屏幕型号为:[http://www.waveshare.net/shop/7inch-HDMI-LCD-H-with-Holder.htm 7inch HDMI LCD (H) (带外壳)]<br/>
+
Here we use the [https://www.waveshare.com/7inch-HDMI-LCD-H-with-Holder.htm 7inch HDMI LCD (H) (with case)] as example<br/>
1、取下DSI屏幕,将HDMI转接板接入到STEREO的HDMI接口<br />
+
1、Remove the DSI display, and connect the HDMI adapter board to HDMI interface of STEREO Board<br />
2、接上HDMI屏幕,(如果HDMI屏幕与DSI屏幕一起接入,那么树莓派将仅驱动DSI屏幕)<br />
+
2、Connect the HDMI display(Raspbian default to use DSI display if both HDMI display and DSI display are connected at the same time)<br />
3、更改TF卡中的config.txt文件修改分辨率,针对此次使用的屏幕型号[http://www.waveshare.net/shop/7inch-HDMI-LCD-H-with-Holder.htm 7inch HDMI LCD (H) (带外壳)],需要在config.txt最后添加如下语句:<br />
+
3、Modify config.txt file of TF card, for [https://www.waveshare.com/7inch-HDMI-LCD-H-with-Holder.htm 7inch HDMI LCD (H) (with case)], you should add the following lines to /boot/config.txt file<br />
 
<pre>
 
<pre>
 
   max_usb_current=1
 
   max_usb_current=1
Line 66: Line 66:
 
   hdmi_cvt 1024 600 60 6 0 0 0
 
   hdmi_cvt 1024 600 60 6 0 0 0
 
</pre>
 
</pre>
3、更改完后,重启树莓派,即可驱动HDMI屏幕<br />
+
3、Reboot after modifying.<br />
  
==<font color=blue>5 连接CSI摄像头</font>==
+
==<font color=blue>5 Connect CSI Camera</font>==
===<font color=blue>5.1 测试树莓派摄像头</font>===
+
===<font color=blue>5.1 Test RPi Camera</font>===
测试树莓派摄像头的方法为:<br />
+
*Download the pre-configured image from Waveshare wiki. The image was pre-configured to use two cameras
*确保镜像为从微雪百科下载,该镜像配置好了设备树,不作修改即可通过命令驱动两个摄像头。
+
*Connect camera to CAM0 and CAM1 interface, the cameras which are used here are[https://www.waveshare.com/IMX219-77-Camera.htm IMX219-77 Camera。]
*连接摄像头到CAM0和CAM1接口,本次实验采用的CSI摄像头型号为:[http://www.waveshare.net/shop/IMX219-77-Camera.htm IMX219-77 Camera。]
+
*Power on Stereo board and test camera:
*连接上后,开机,在开机后,即可检查摄像头效果:
+
*Test the camera 1
*查看接入的第一个摄像头画面:
 
 
<pre>
 
<pre>
 
sudo raspivid -t 0 -cs 0
 
sudo raspivid -t 0 -cs 0
 
</pre>
 
</pre>
*查看接入的第二个摄像头画面:
+
*Test camera 2
 
<pre>
 
<pre>
 
sudo raspivid -t 0 -cs 1
 
sudo raspivid -t 0 -cs 1
 
</pre>
 
</pre>
其中-cs参数表示接入的是第几个摄像头,但-cs参数表示的摄像头号和板子及外壳丝印并不完全一致(参数-cs表示的是接入的第几个摄像头,若仅接入了一个摄像头到CAM1接口,则查看该摄像头命令的-cs参数为0,以表示接入的第0个摄像头)。<br />
+
-cs is used to choose camera 0 or 1. The number of camera may be different from the silk screen printing as it is the order of recognized cameras<br />
  
===<font color=blue>5.2 源镜像,修改设备树以驱动摄像头</font>===
+
===<font color=blue>5.2 Test camera with original image</font>===
若使用我们提供的镜像,则已经配置好了设备树,这一步可直接跳过,若使用的是官方提供的全新镜像,则需要重新配置设备树。<br />
+
If you use the original Raspbian image, you should configure an image for using the camera manually.<br />
<!--*首先,编辑config.txt文件,在最后加上
+
*Run raspi-config commands to enable the camera. Choose Interfacing Options->Camera->Yes->Finish-Yes and then reboot Raspbian.
dtparam=arm_i2c -->
+
*Download the dtb ifile from Raspbrry Pi website [https://www.raspberrypi.org/documentation/hardware/computemodule/dt-blob-disp1-cam2.dts website]
*运行raspi-config,选择Interfacing Options->Camera->Yes->Finish-Yes,reboot系统,打开enable camera。
+
*After downloading, modify the dts file:
*下载官方提供的设备树文件,树莓派基金会设备树 [https://www.raspberrypi.org/documentation/hardware/computemodule/cmio-display.md 介绍链接],树莓派基金会设备树 [https://www.raspberrypi.org/documentation/hardware/computemodule/dt-blob-disp1-cam2.dts 下载链接1],[[:File:dt-blob-disp1-cam2.zip|下载链接2]]
 
*在下载完设备树文件后,接下来,需要修改设备树文件,具体设备树修改如下:
 
 
[[File:Compute_Module_PoE_Board_User_Manual-13 .png|800px]]
 
[[File:Compute_Module_PoE_Board_User_Manual-13 .png|800px]]
 
[[File:Compute_Module_PoE_Board_User_Manual-14.png|800px]]<br />
 
[[File:Compute_Module_PoE_Board_User_Manual-14.png|800px]]<br />
即:对比官方的设备树文件,具体修改为:Camera0的LDE与SHUTDOWN从原来的4,5引脚修改为32,33引脚。<br />
+
That is you should change LDE and SHUTDOWN from pin2, pin3 to pin32 and pin33.<br />
*在修改设备树文件后,编译设备树文件,编译方法如下:<br />
+
*After modifying, you need to compile it<br />
 
  dtc -I dts -O dtb -o dt-blob.bin dt-blob-disp1-cam2.dts
 
  dtc -I dts -O dtb -o dt-blob.bin dt-blob-disp1-cam2.dts
*编译后,会生成一个dt-blob.bin文件,将这个文件直接复制(代替)到boot目录下即可。
+
*After compiling, the file dt-blob.bin is generated, and you should copy it to boot directory.
*重启,通过以下命令即可测试双摄像头:
+
*To test camera, you can use commands below:
 
<pre>
 
<pre>
 
  sudo raspivid -t 0 -cs 0
 
  sudo raspivid -t 0 -cs 0
 
  sudo raspivid -t 0 -cs 1
 
  sudo raspivid -t 0 -cs 1
 
</pre>
 
</pre>
===如何使用CAM3接口===
+
===How to use CAM3 interface===
CAM3接口和CAM1接口是通过GPIO38引脚来切换的<br />
+
You can switch CAM3 and CAM1 by changing the status of GPIO38<br />
如果将GPIO38接口设置为高电平,CS1接口调用的为CAM3接口的摄像头<br />
+
Set GPIO38 to High, the CAM3 is enabled.<br />
如果将GPIO38接口设置为低电平,CS1接口调用的为CAM1接口的摄像头<br />
+
Set GPIO38 to Low, the CAM1 is enabled.<br />
*运行下面的程序
+
*Run the following script to switch CAM1 and CAM3
 
<pre>
 
<pre>
 
cd ~/CM_STEREO_BOARD
 
cd ~/CM_STEREO_BOARD
Line 112: Line 109:
 
./CAM3_CAM1_Swtich.sh 1
 
./CAM3_CAM1_Swtich.sh 1
 
</pre>
 
</pre>
: ./CAM3_CAM1_Switch.sh 1 切换使用CAM3接口
+
: ./CAM3_CAM1_Switch.sh 1 Enable CAM3
: ./CAM3_CAM1_Switch.sh 1 切换使用CAM1接口
+
: ./CAM3_CAM1_Switch.sh 1 Enable CAM1
*切换好了之后再运行摄像头指令测试
+
*Then you can test the camera
 
<pre>
 
<pre>
 
sudo raspivid -t 0 -cs 1
 
sudo raspivid -t 0 -cs 1
 
</pre>
 
</pre>
  
==<font color=blue>6 测试ICM20948</font>==
+
==<font color=blue>6 Test ICM20948</font>==
*首先下载示例程序
+
*Download the demo code
 
<pre>
 
<pre>
wget http://www.waveshare.net/w/upload/d/d8/CM_STEREO_BOARD.zip
+
wget https://www.waveshare.com/w/upload/d/d8/CM_STEREO_BOARD.zip
 
unzip CM_STEREO_BOARD.zip
 
unzip CM_STEREO_BOARD.zip
 
</pre>
 
</pre>
*将ICM20948补光灯板通过10pin排线接到STEREO扩展板上
+
*Connect the ICM20948 board to STEREO board by 10PIN FFC cable
*开启I2C接口
+
*Enable I2c interface
 
<pre>
 
<pre>
 
sudo raspi-config
 
sudo raspi-config
 
</pre>
 
</pre>
:选择Interfacing Options -> I2C -> Yes->OK
+
:Choose Interfacing Options -> I2C -> Yes->OK
*检测一下I2c地址
+
*Check I2c address
 
<pre>
 
<pre>
 
i2cdetect -y 1
 
i2cdetect -y 1
 
</pre>
 
</pre>
 
[[File:CM-STEREO-BOARD-1.png|500px]]
 
[[File:CM-STEREO-BOARD-1.png|500px]]
:可以检测到68 69两个地址,说明模块连接正常
+
:The module is connected properly if both 68 and 69 are detected..
:其中68是RTC的地址,69是ICM20948芯片的地址
+
:68 is the i2c address of RTC, and 69 is ICM20948 board's
*运行以下指令测试ICM20948
+
*Run the following command to test ICM20948
 
<pre>
 
<pre>
 
cd ~/CM_STEREO_BOARD/10Dof-D_Demo/
 
cd ~/CM_STEREO_BOARD/10Dof-D_Demo/
Line 144: Line 141:
 
sudo ./10Dof-D
 
sudo ./10Dof-D
 
</pre>
 
</pre>
:运行程序之后终端界面会打印ICM20948芯片的信息
+
: The terminal will print the data of the ICM20948 chip after running the code.
 
[[File:CM-STEREO-BOARD-2.png|500px]]
 
[[File:CM-STEREO-BOARD-2.png|500px]]
:Ctrl+c可以关闭程序
+
: You can press Ctrl+c to stop the code.
  
==<font color=blue>7 测试RTC</font>==
+
==<font color=blue>7 Test RTC</font>==
*STEREO扩展板留有RTC备用电池座,你可以接入CR1202纽扣电池使用,电池需要自行另外购买
+
*STEREO board has backup battery holder for RTC, you can mount an CR1220 in it.(Battery should be purchased separately)
*修改rc.local文件
+
*Modify rc.local file
 
<pre>
 
<pre>
 
sudo nano /etc/rc.local
 
sudo nano /etc/rc.local
 
</pre>
 
</pre>
:将以下的语句添加到exit0前面
+
:Add the following lines in the front of exit0
 
<pre>
 
<pre>
 
sudo modprobe i2c-dev &
 
sudo modprobe i2c-dev &
Line 161: Line 158:
 
</pre>
 
</pre>
 
[[File:CM-STEREO-BOARD-3.png|500px]]
 
[[File:CM-STEREO-BOARD-3.png|500px]]
*重启系统
+
*Reboot
 
<pre>
 
<pre>
 
sudo reboot
 
sudo reboot
 
</pre>
 
</pre>
*重启之后重新检测一下I2c地址,会发现原来的68地址变成了UU,这个正常现象
+
*Check the i2c address again, you will find that the address 68 is changed to UU, it is normal
*读取RTC时间
+
*Read RTC clock
 
<pre>
 
<pre>
 
sudo hwclock -r
 
sudo hwclock -r
 
</pre>
 
</pre>
:指令运行之后会打印出当前的网络时间,如果时间不对,在系统中设置一下时区再测试一下即可
+
:If the time is wrong, please configure the Locations and time zone then test it again.
*你也可以将RTC时间写入系统
+
*You can also write the RTC time to the system.
 
<pre>
 
<pre>
 
sudo hwclock -s
 
sudo hwclock -s
 
</pre>
 
</pre>
==<font color=blue>7 测试补光灯和按键</font>==
+
==<font color=blue>7 Test LEDs and key</font>==
在ICM20948的板上,板载了两个补光灯,一个是白色补光灯,一颗是红外补光灯。这里我们结合STEREO板上的按键来测试补光灯功能
+
An Infrared LED and a white LED is integrated on ICM20948 board, here we use the user key to control them.
*运行指令
+
*Run the following commands
 
<pre>
 
<pre>
 
cd ~/CM_STEREO_BOARD/
 
cd ~/CM_STEREO_BOARD/
 
sudo python KEY_LED.py
 
sudo python KEY_LED.py
 
</pre>
 
</pre>
:成功运行程序之后,红外不关灯会亮起,按下按键会切换红外补光灯和白色不关灯
+
: The infrared LED lights on after running the codes, then you can press the key to toggle the LEDs.
:注意白色补光灯亮度比较高,测试的时候遮挡一下避免直接照射眼睛
+
: '''The white LED is bright, we recommend you to shelter it with paper when testing.'''
: Ctrl+C可以终止程序
+
: You can pres Ctrl+C to stop the code
==<font color=blue>8 测试串口扩展板</font>==
+
==<font color=blue>8 Test the UART adapter board</font>==
*将串口扩展板通过36PIN排线接入到STEREO板上
+
*Connect the UART adapter board to STEREO Board by 36PIN FFC cable.
*用USB线将串口扩展板上的USB口接到电脑
+
*Connect the USB to UART interface of the UART adapter board to host PC
*树莓派系统开启串口调试接口功能
+
*Enable Serial shell login function
 
<pre>
 
<pre>
 
sudo raspi-config
 
sudo raspi-config
 
</pre>
 
</pre>
:选择Interfacing Options -> Serial -> Yes -> No -> OK
+
:Choose Interfacing Options -> Serial -> Yes -> No -> OK
*重启系统,然后再电脑端打开putty软件,使用串口登录树莓派即可
+
*Reboot Raspbian then you can access the OS by putty software on PC.

Revision as of 10:18, 24 June 2020

2 Write image

2.1 Write image for Compute Module 3/Compute Module 3+

If you use Compute Module 3 or Compute Module 3+, you should write an image to the internal eMMC
The steps of writing eMMC:
1)Run the RPiboot_Setup software to install the driver. You will get a rpiboot.exe file in the installation directory:
Compute Module PoE Board User Manual-4.png
2)Turn the USB SLAVE ENABLE switch into EN
3)Connect the Compute Module 3 or Compute Module 3+
4)Connect the USB interface of STEREO board to PC
6)<font color="#ff0000"Run rpiboot.exe as administrator, PC will recognize eMMC of Compute module as a portable drive.
7)Run Win32DiskImage software to write image to eMMC
Note: If you wrote image to the eMMC before, you need to format it firstly by Panasonic_SDFormatter software
8)After writing, you can disconnect the USB cable, and re-power the STEREO board to start the CM3/CM3+ by connecting 5V power adapter to PWR interface
Note:

  • While writing the image, DO NOT write other portable storage drives to avoid conflicting.
  • The default user name and password of the image of Raspberry are pi and raspberry.
  • The EMMC of CM3+ is extended, which allows CM3+ to install a common desktop image. However, the eMMC of CM3 is only 4G, therefore if you want to write an image to CM3, please choose Raspbian Lite. You can also install GUI for Lite image separately by commands below (network is required):

 sudo apt-get update
 sudo apt-get install raspberrypi-ui-mods

If you cannot write a image to eMMC successfully, you can try the following steps:

  • Use Windows 10 PC instead of Windows 7 or Linux.
  • Make sure that the Compute module you use is the eMMC version which has one more chip on the backside.

Compute Module PoE Board User Manual FAQ10.jpg

  • You should connect a 5V power adapter to the PWR interface.
  • Change another USB cable for a try.
  • Change to other USB port of PC for a try.
  • Try to restart your PC.
  • Try to reset the CM3/CM3+ board.
  • Try with other PC.

2.2 Write image for Compute Module 3 Lite/Compute Module 3+ Lite

The steps for writing image for Lite version::
1、Donwload image from Raspberry Pi website.
2、Insert TF card to host PC by card reader, the size of the TF card should at least be 8G.
3、Run Win32DiskImager software for writing, it just the same as how you write an image for Raspberry Pi board.
4、After writing, insert the TF card to the card slot of STEREO Board.

3 Connect DSI display

Here we use 4.3inch DSI LCD for example, you can also use official 7inch LCD.

  • 1: Power off the STEREO Board
  • 2: Connect 15Pin FPC cable to STEREO Board and DSI display
  • 3: Connect the power adapter to STEREO Board
  • 4: Wait for several seconds to start Raspbian

Note:

  • If you use Raspberry Pi official image, you need to compy dt-blob.bin file to /boot directory

DTS_BIN file
Compute Module PoE Board01.jpg

4 Connect HDMI display

Here we use the 7inch HDMI LCD (H) (with case) as example
1、Remove the DSI display, and connect the HDMI adapter board to HDMI interface of STEREO Board
2、Connect the HDMI display(Raspbian default to use DSI display if both HDMI display and DSI display are connected at the same time)
3、Modify config.txt file of TF card, for 7inch HDMI LCD (H) (with case), you should add the following lines to /boot/config.txt file

  max_usb_current=1
  hdmi_force_hotplug=1 
  config_hdmi_boost=10
  hdmi_group=2 
  hdmi_mode=87 
  hdmi_cvt 1024 600 60 6 0 0 0

3、Reboot after modifying.

5 Connect CSI Camera

5.1 Test RPi Camera

  • Download the pre-configured image from Waveshare wiki. The image was pre-configured to use two cameras
  • Connect camera to CAM0 and CAM1 interface, the cameras which are used here areIMX219-77 Camera。
  • Power on Stereo board and test camera:
  • Test the camera 1
sudo raspivid -t 0 -cs 0
  • Test camera 2
sudo raspivid -t 0 -cs 1

-cs is used to choose camera 0 or 1. The number of camera may be different from the silk screen printing as it is the order of recognized cameras

5.2 Test camera with original image

If you use the original Raspbian image, you should configure an image for using the camera manually.

  • Run raspi-config commands to enable the camera. Choose Interfacing Options->Camera->Yes->Finish-Yes and then reboot Raspbian.
  • Download the dtb ifile from Raspbrry Pi website website
  • After downloading, modify the dts file:

Compute Module PoE Board User Manual-13 .png Compute Module PoE Board User Manual-14.png
That is you should change LDE and SHUTDOWN from pin2, pin3 to pin32 and pin33.

  • After modifying, you need to compile it
dtc -I dts -O dtb -o dt-blob.bin dt-blob-disp1-cam2.dts
  • After compiling, the file dt-blob.bin is generated, and you should copy it to boot directory.
  • To test camera, you can use commands below:
 sudo raspivid -t 0 -cs 0
 sudo raspivid -t 0 -cs 1

How to use CAM3 interface

You can switch CAM3 and CAM1 by changing the status of GPIO38
Set GPIO38 to High, the CAM3 is enabled.
Set GPIO38 to Low, the CAM1 is enabled.

  • Run the following script to switch CAM1 and CAM3
cd ~/CM_STEREO_BOARD
sudo chmod +x CAM3_CAM1_Switch.sh
./CAM3_CAM1_Swtich.sh 1
./CAM3_CAM1_Switch.sh 1 Enable CAM3
./CAM3_CAM1_Switch.sh 1 Enable CAM1
  • Then you can test the camera
sudo raspivid -t 0 -cs 1

6 Test ICM20948

  • Download the demo code
wget https://www.waveshare.com/w/upload/d/d8/CM_STEREO_BOARD.zip
unzip CM_STEREO_BOARD.zip
  • Connect the ICM20948 board to STEREO board by 10PIN FFC cable
  • Enable I2c interface
sudo raspi-config
Choose Interfacing Options -> I2C -> Yes->OK
  • Check I2c address
i2cdetect -y 1

CM-STEREO-BOARD-1.png

The module is connected properly if both 68 and 69 are detected..
68 is the i2c address of RTC, and 69 is ICM20948 board's
  • Run the following command to test ICM20948
cd ~/CM_STEREO_BOARD/10Dof-D_Demo/
sudo make
sudo ./10Dof-D
The terminal will print the data of the ICM20948 chip after running the code.

CM-STEREO-BOARD-2.png

You can press Ctrl+c to stop the code.

7 Test RTC

  • STEREO board has backup battery holder for RTC, you can mount an CR1220 in it.(Battery should be purchased separately)
  • Modify rc.local file
sudo nano /etc/rc.local
Add the following lines in the front of exit0
sudo modprobe i2c-dev &
sudo modprobe i2c-bcm2708 &
echo "ds1307 0x68" | sudo tee /sys/class/i2c-adapter/i2c-1/new_device &

CM-STEREO-BOARD-3.png

  • Reboot
sudo reboot
  • Check the i2c address again, you will find that the address 68 is changed to UU, it is normal
  • Read RTC clock
sudo hwclock -r
If the time is wrong, please configure the Locations and time zone then test it again.
  • You can also write the RTC time to the system.
sudo hwclock -s

7 Test LEDs and key

An Infrared LED and a white LED is integrated on ICM20948 board, here we use the user key to control them.

  • Run the following commands
cd ~/CM_STEREO_BOARD/
sudo python KEY_LED.py
The infrared LED lights on after running the codes, then you can press the key to toggle the LEDs.
The white LED is bright, we recommend you to shelter it with paper when testing.
You can pres Ctrl+C to stop the code

8 Test the UART adapter board

  • Connect the UART adapter board to STEREO Board by 36PIN FFC cable.
  • Connect the USB to UART interface of the UART adapter board to host PC
  • Enable Serial shell login function
sudo raspi-config
Choose Interfacing Options -> Serial -> Yes -> No -> OK
  • Reboot Raspbian then you can access the OS by putty software on PC.