Difference between revisions of "CM4-NANO-B"

From Waveshare Wiki
Jump to: navigation, search
m (Text replacement - "{{#urlget:amazon|default}}=display" to "{{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}=display")
Line 1: Line 1:
 
{{infobox item|
 
{{infobox item|
 
|name=CM4-NANO-B
 
|name=CM4-NANO-B
|img=<div class="tabber"><div class="tabbertab" title="CM4-NANO-B">[[File:CM4-NANO-B.png|400px|alt=CM4-NANO-B|link=https://www.waveshare.com/cm4-nano-b.htm]]
+
|img=<div class="tabber"><div class="tabbertab" title="CM4-NANO-B">[[File:CM4-NANO-B.png|400px|alt=CM4-NANO-B|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/cm4-nano-b.htm}}]]
</div><div class="tabbertab" title="Compute Module 4">[[File:Compute-Module-4.png|400px|link=https://www.waveshare.com/compute-module-4.htm|]]</div>
+
</div><div class="tabbertab" title="Compute Module 4">[[File:Compute-Module-4.png|400px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/compute-module-4.htm}}|]]</div>
 
|interface1=DSI CSI HDMI USB2.0 I2C I2S SPI RPi Ethernet
 
|interface1=DSI CSI HDMI USB2.0 I2C I2S SPI RPi Ethernet
 
|category=[[:Category:Raspberry Pi|Raspberry Pi]]
 
|category=[[:Category:Raspberry Pi|Raspberry Pi]]

Revision as of 07:08, 16 May 2022

CM4-NANO-B
CM4-NANO-B
Compute-Module-4.png

{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Product description

CM4-NANO-B (Raspberry Pi CM4 Ultra Mini Expansion Board Type B) is a baseboard that can be used with Raspberry Pi Compute Module 4. Although it is tiny, it can bring out the interface of Raspberry Pi Compute Module 4.

Precautions for use

1. DO NOT hot-plug any devices except the USB and HDMI.
2. As the module does not have any protection, please do not short-circuit the power supply.
3. The USB Type-C interface can be used as a power supply or as a USB SLAVE interface to program the image.
4. In order to ensure the normal power supply of the CM4, please do not connect other devices when using the USB Type-C interface to program the image.
5. Providing 5V 2A for CM4 to ensure that it is in normal use. Otherwise, there may be problems such as automatic shutdown, frequency reduction and so on.
6. The USB2.0, CSI, DSI and Audio interfaces are disabled by default and need to be enabled by the user.

Dimension

CM4-NANO-B


Cm4nanob.png
Compute_Module 4


Cm4module.png
Onboard Resources


Onboar.png

Label Name Description
1 CM4 socket suitable for all variants of Compute Module 4
2 Micro SD card interface For inserting a Micro SD card with the system, only for Lite version
3 40PIN GPIO interface Easy access to various HAT modules
4 Ethernet port RJ45 Gigabit Ethernet port, support 10 / 100 / 1000M network access
5 Power supply/burning interface 5V/2A power supply, can also be used as eMMC programming interface
6 Audio Interface 3.5mm audio interface
7 User button Support various USB device
8 USB2.0 Indicates the working status of the Raspberry Pi
9 CAM interface MIPI CSI camera interface, connect with CM4 CSI0 interface
10 DSI MIPI DSI display interface, connect with CM4 DSI1 interface
11 DC step-down circuit DC buck circuit to power 3.3V for DSI, CSI and GPIO
12 MINI HDMI HDMI interface, support 4K 30fps output
13 BOOT ON: Switch the USB to type C interface, and enter the download mode when powered on (configured as a large-capacity disk through rpi boot)

OFF: Switch the USB to TYPE A interface, it will not enter the download when powered on (start from eMMC or SD card)

Usage Introduction

Writing Image

USB2.0

USB enable configuration


  • The USB port is disabled by default on the CM4 to save power.
  • It is recommended to directly open the config.txt file in the boot drive letter after the programming is completed, and add the following content:
dtoverlay=dwc2,dr_mode=host
  • After saving the file, start the machine according to the normal process

USB-OTG Mode


  • If you use the latest Raspberry Pi OS (image after October 30, 2021) and USB2.0 is in 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).

Usbotg.png

CSI and DSI

Configuration


  • Due to CSI and DSI are disabled by default, we need to load device tree to open, and three I2C devices, I2C-10, I2C-11, and I2C-0, will be occupied when using the CSI camera and DSI screen.
  • Enter the following command:
sudo apt-get install p7zip-full
wget https://www.waveshare.net/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 executed with 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 do not connect the DSI screen, as long as you compile the corresponding file, then HDMI1 will not output.
#If you need to restore, just delete the corresponding dt-blob.bin: sudo rm -rf /boot/dt-blob.bin 
#After the execution is complete, turn off the power and restart the CM4

Open CSI Camera


  • In addition to modifying the device tree, the CSI camera also needs to be set to enable the camera function

Old version (buster)
1. Execute the following command to enter the Raspberry Pi configuration

sudo raspi-config

2. Choose Interfacing Options and enter
Interface.png
3.Choose Camera
Camera.png
4.Choose to open camera interface
Camera2.png
5.The system prompts as follows:
Prompt.png
6.Back to the main interface, select Finish
Finish.png
7.Reboot the system
Finish2.png
New version (bullseye)
1. Execute the following command to enter the Raspberry Pi configuration

sudo raspi-config

2. Select Interfacing Options and enter
Option.png
3. Choose to open camera interface
Legac.png
4. Choose to enable legacy camera support
Enable.png
5. The system prompts as follows:
Legacycamera.png
6.Back to the main interface, select Finish
Finish3.png
7.Then reboot the system
Reboot2.png
CSI Camera Test


  • Make sure to connect the CSI camera and DSI screen in a power-off state, otherwise the equipment may be damaged
  • Test photo:
raspistill -o image.jpg
  • Test video
raspivid -o video.h264 -t 10000
    • Where -t 10000 means recording for 10 seconds, users can adjust according to their own needs.

Refer to CSI camera

Audio Interface

  • The Audio of this device uses GPIO audio output, GPIO18 and GPIO19, which need to be turned on through the configuration file

1. edit config.txt

sudo nano /boot/config.txt

2.add content at the bottom

dtparam=audio=on
dtoverlay=audremap,pins_18_19

3.Enter to the graphical interface, right-click the volume icon, and select AV Jack
Avjack.png

    • PS: When switching to Audio interface, the audio output of HDMI will stop

Resources

Datasheet

Schematic

3D Graphics

Software

FAQ

Support