Compute Module 4 PoE Board

From Waveshare Wiki
Jump to: navigation, search
Compute Module PoE Board
Compute-Module-4-POE-Board-1.jpg
Compute-Module-4-Acce-D-1.jpg


Compute Module IO Board with PoE Feature, Composite Breakout Board for Developing with Raspberry Pi CM4 / CM4L
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

This is an IO board for evaluating the Raspberry Pi CM4 or being integrated into end products. the board feature PoE function, it can be used for all variants of CM4.

Precautions

1. DO NOT hot-plug any devices except the USB and HDMI.
2. Please check the fan voltage before connection, support 5V and 12V. The default connection is 5V and you can modify the FAN_VCC jump cap to switch.
3. Micro USB is used as a USB SLAVE interface to write images, not as an OTG interface.
4. Provide 5V 1.5A for CM4 to ensure that it is in normal use. Otherwise, there may be problems such as automatic shutdown, frequency reduction, and so on.
5. Onboard 4-ch USB 3.2 Gen1 connector by default.
6. When using the POE function, check whether the switch supports PoE for the 802.3af network standard.
7. When POE is required, connect the POE jumper cap to the EN position.
8: Two DISP interfaces cannot be used together by default.

Dimension

Compute_Module 4 POE Board
Compute-Module-4-POE-Board-details-size.jpg
Compute_Module 4
Compute Module 4 IO Board 5.png

What's on board

Compute-Module-4-POE-Board-details-intro.jpg

No. Component Description
1 CM4 connector Suitable for all variants of Compute Module 4
2 DC power port 7~36V DC wide voltage supply, 24W or higher power supply is recommended.
3 Gigabit Ethernet RJ45 with PoE support 10/100M auto-negotiation, for connecting router or switch with PoE function
4 USB SLAVE Interface Writing emmc for Compute Module 4
5 USB3.2 Interface 4 x USB 3.2 Gen1 interface for USB devices.
6 HDMI Interface Dual HDMI ports for dual 4K 30fps output.
7 RTC RTC battery holder, for installing CR2032 batteries, allows RTC-related functions like wakeup, shutdown, reboot, and more
8 CAM 2x MIPI CSI camera connectors.
9 DISP 2x MIPI DSI display connectors.
10 FAN Fan header, support PWM Fan.
11 FAN Power Select 5V or 12V voltage to drive the fan
12 IO-VREF/PoE selection IO-VREF: CM4 IO logic level: 3.3V or 1.8V
PoE: enable (EN) or disable (DIS)
13 40PIN GPIO header For connecting Raspberry Pi HATs
14 CAM0 and DISP0 I2C bus fit the jumpers when using CAM0 or DISP0
15 Misc configurations Special function pins
16 Dual LED indicators red: Raspberry Pi power indicator
green: Raspberry Pi operating status indicator
17 TF card slot (bottom side) Insert a TF card with a pre-flashed system, to start up Compute Module 4 Lite

Special Function Pin Description

Compute-Module-4-1-21.png

Name Description
1 PI BOOT Low level, Pi booted from USB SLAVE port
2 EEPROM WP Low level, prevents EEPROM from being overwritten
3 IP1/0 CM4 board MXL7704 AN1/0 pin
4 VADC COMP Composite video output
5 ETH IN ETH simultaneous signal
6 PI_EN Synchronized with PI_RUN signal
7 PI_GLOBAL_EN CM4 onboard MXL7704 power enable pin, disabled for low level
8 PI_RUN CM4 status indication, high means power on, force pull low to force restart CM4
9 WIFI_EN WIFI enable, low level disable, enabled when not connected
11 BT_EN Bluetooth enable, low disable, enabled when not connected

Note

Do not plug or unplug any device while the base board is powered on.

Writing Image

RTC FAN

  • Note: Please connect the fan before turning on the power of the baseboard and then complete the test. Please do not connect the fan after the baseboard is powered on, because the fan control chip has been powered on, otherwise, the chip will be flashed!
  • Note: Before connecting, please confirm whether the rated voltage of the fan is consistent with the voltage 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 0 x 51 (7-bit address)
FAN (EMC2301) on i2c-10, address is 0 x 2f (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 the following lines at the end
 dtparam=i2c_vc=on
 dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
 #Add # in front of dtparam=audio=on
 #dtparam=audio=on
 #Save and exit, restart
 sudo reboot

How to use Hwclock

Synchronize system clock to hardware clock:

sudo hwclock -w

Synchronize hardware clock to system clock:

sudo hwclock -s
 #The network or the NTP needs to be closed, 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 version information:

sudo hwclock --verbose

Fan

1: Check if the kernel version is higher than or equal to 6.1.31.

 uname -a

2: Add the following content at config.txt:

dtoverlay=i2c-fan,emc2301,i2c_csi_dsi,midtemp=45000,maxtemp=65000

3: For more parameters, you can refer to this link

Troubleshooting

1: After configuration, you can use the command "i2cdetect -y 10" to check whether the configuration is valid, and the valid I2C address should be UU without digits.

2: RTC value is not accurate, or an invalid prompt appears, check whether the RTC battery is connected and whether the voltage of the RTC battery is normal.

3: All configurations need to be rebooted after being added to take effect.

4: If the fan does not rotate after adding the fan driver, you can press "1" to troubleshoot and check whether the configuration is effective. If it is valid, then you can check whether the kernel version is higher or equal to 6.1.31 (uname -a). If the version is lower than 6.1.31, this kernel cannot work. For more details, you can refer to this link.


CSI DSI

CSI DSI

New Version (Bookworm)

The DSI screen is 800x480 resolution screen by default, please refer to the corresponding WIKI for other resolution screens

When using the official base board Compute Module 4 IO Board, note that the J6 jumper cap needs to be connected


DSI

#Add the following to the config.txt file:
sudo nano /boot/firmware/config.txt
#DSI0 (V1~V3)
dtoverlay=vc4-kms-dsi-7inch,dsi0
#DSI1 (V4)
dtoverlay=vc4-kms-dsi-7inch,dsi1

CSI

  • Add the following to the config.txt file:
  • sudo nano /boot/firmware/config.txt
    Mode CAM0 setup statement CAM1 setup statement
    OV9281 dtoverlay=ov9281,cam0 dtoverlay=ov9281,cam1
    IMX290/IMX327 dtoverlay=imx290,clock-frequency=37125000,cam0 dtoverlay=imx290,clock-frequency=37125000,cam1
    IMX378 dtoverlay=imx378,cam0 dtoverlay=imx378,cam1
    IMX219 dtoverlay=imx219,cam0 dtoverlay=imx219,cam1
    IMX477 dtoverlay=imx477,cam0 dtoverlay=imx477,cam1
    IMX296 dtoverlay=imx296,cam0 dtoverlay=imx296,cam1
    IMX708 dtoverlay=imx708,cam0 dtoverlay=imx708,cam1
  • Use the shortcut Ctrl+o to save the file, then press Enter
    CM4-NANO-B-CSI-03.png
  • Use the shortcut Ctrl+x to exit the editor
  • Reboot the device
    sudo reboot
  • Note:

    1. The single-port camera can only work on CAM0, that is, it is not possible to use CAM1 port alone. But you can use the CAM0 port alone, or connect the dual cameras
    2. If the device is recognized, and the startup prompt "Camera frontend has timed out!" appears, please update "sudo rpi-update"
    
    Test Camera
    1. Enter the camera detection command, and you can see that the camera has been detected
      libcamera-hello --list-cameras

      CM4-NANO-B-CSI-01.png
    2. Display the camera screen to the desktop
      libcamera-hello -t 0
    3. Take a photo
      libcamera-jpeg -o test.jpg
    4. Record a 10s video
      libcamera-vid -t 10000 -o test.h264

    Other commands
    Check if the camera is detected

    libcamera-hello --list-cameras
    

    Open the corresponding camera

    libcamera-hello  --camera 1
    libcamera-hello  --camera 0
    

    Take a photo

    libcamera-jpeg -o test.jpg
    #You can add --camera to specify the camera
    


    #The new system uses dual cameras
    #Remove camera_auto_detect=1 in config.txt
    #camera_auto_detect=1
    
    #Add
    dtoverlay=imx219,cam1
    dtoverlay=imx219,cam0
    
    #Where imx219 is the camera sensor model and other sensors are supported
    dtoverlay=ov5647,cam0
    dtoverlay=imx219,cam0
    dtoverlay=ov9281,cam0
    dtoverlay=imx477,cam0
    dtoverlay=imx519,cam0
    
    #Then reboot
    reboot
    
    #Open camera
    libcamera-hello -t 0
    or
    libcamera-hello
    
    
    #Other instructions:
    #Check if the camera is detected
    libcamera-hello --list-cameras
    
    #Open the corresponding camera, preview for 5 seconds
    libcamera-hello  --camera 1
    libcamera-hello  --camera 0
    
    #Take photos
    libcamera-jpeg -o test.jpg
    
    #Shoot video
    libcamera-vid -t 10000 -o test.h264
    
    #You can add --camera to specify the camera
    #-t <duration> option allows the user to choose how long the window is displayed in milliseconds

    For more commands, you can click here.

    • Note: If using a DSI interface display there will be an HDMI disabled, even if just compiling the corresponding file without connecting a DSI screen.
    • Connecting either HDMI port will allow output of an image, regardless of which HDMI port is used. If two HDMI screens are connected, only HDMI0 has an image output.
    • To enable two HDMI ports, remove the configuration from config.txt:
    • And then reboot it.

    Please refer to Raspberry Pi manual.

    Old System Version (Buster and Bullseye)

    Configure Files

    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://files.waveshare.com/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 (for version V1~V3)
     sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
     #Execute (for version V4)
     sudo  dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
    
     Add the following to the config.txt file:
     sudo nano /boot/config.txt
     Change dtoverlay=vc4-kms-v3d to
     dtoverlay=vc4-fkms-v3d
    
     #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 
     #After execution, turn off the power and restart

    Record Test

    Connect to the camera and the DSI display:
    1. Please make sure it is connected under powering off.
    2. Connect to the power.
    3. The display will be booted after waiting for a few seconds.
    4. If it fails to boot, check whether /boot/dt-blob.bin exists, and reboot it if it exists.

    Old Version (Buster)

    The camera needs to run raspi-config, select Interfacing Options -> Camera -> Yes -> Finish -> Yes, reboot the system, open enable camera, and then restart to save the changes.

    Test the Raspberry Pi camera.
    Check the screen of the first connected camera:

    sudo raspivid -t 0 -cs 0
    

    Check the screen of the second connected camera:

    sudo raspivid -t 0 -cs 1
    


    Resource

    Document

    3D Drawing

    Demo codes

    Software

    FAQ

     Answer:

    a) Check if dtparam -audio -on is blocked in /boot/config.txt.
    b) Check if the /boot/dt-blob.bin file exists, if it does, please delete it.

    {{{5}}}



    Support



    Technical Support

    If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
    Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)