V-by-One-HS KIT appnotes 4 rpi

From wiki_veye
Jump to navigation Jump to search

查看中文

1 Overview

V-by-One® HS is a high-performance SerDes solution provided by THine, offering excellent performance and cost-effectiveness.

We have developed the V-by-One-HS KIT product based on the V-by-One® HS solution, specifically designed for long-range transmission of images from MV series and RAW series camera products.

The V-by-One-HS KIT features great adaptability, a wide range of input-output interfaces, and comprehensive driver support.

1.1 Camera module list

Series Model Status
MV series MV-MIPI-IMX178M Done
MV series MV-MIPI-SC130M Done
MV series MV-MIPI-IMX296M Done
MV series MV-MIPI-IMX287M Done
MV series MV-MIPI-IMX265M Done
MV series MV-MIPI-IMX264M Done
RAW series RAW-MIPI-SC132M Done
RAW sereies RAW-MIPI-AR0234M ing
RAW sereies RAW-MIPI-IMX462M ing

1.2 Essential preparations

V-by-One provides a transparent channel for long-range transmission of images, I2C, and IO.

For the functionality of the camera module itself, it is similar to connecting the camera module directly to the Raspberry Pi using the MIPI interface.

Therefore, it is essential to refer to the instructions on how to use the MV series camera module on the Raspberry Pi platform.

2 Hardware Setup

2.1 Connection of V-by-One-HS-RX and Camera

2.1.1 MV series camera

The two are connected using 0.5 mm pitch*30P FFC cable with opposite direction. The cable must be inserted with the silver contacts facing outside.

TOP BOTTOM
V-by-One-HS-RX to MV-MIPI-X
V-by-One-HS-RX to MV-MIPI-X
2.1.2 RAW series camera

RAW series cameras have two output specifications: 15-pin interface and 22-pin interface.

  • For the 22-pin interface type:

Use a 0.5mm pitch * 22-pin FFC with an opposite direction. Please ensure that the silver contact surfaces are facing outward.

  • For the 15-pin interface type (RAW-MIPI-SC132M):

Use a 15-to-22 pin FFC with a same-side direction. Please ensure that the silver contact surfaces are facing outward.

2.2 Connection of V-by-One-HS-RX and V-by-One-HS-TX

In most cases, only one coaxial cable is sufficient to meet the image transmission bandwidth requirements. One coaxial cable can provide an effective bandwidth of 3.2Gbps.

Below are scenarios where two coaxial cables are required:

  • RAW-MIPI-AR0234M: Configured as 4 lanes and output format set to RAW10.

2.3 Connection of V-by-One-HS-RX and Raspberry Pi

2.3.1 Power Supply

The V-by-One-HS-RX requires a 12V DC power supply. You can choose either J1 or J2 for the power input.

2.3.2 Raspberry Pi Model B and Model B+

Use a 1mm pitch 15-pin FFC to connect V-by-One-HS-RX's J9 to the Raspberry Pi's MIPI CSI-2 interface.

2.3.3 Raspberry Pi Zero, Zero W, and Computer Module

Use a 0.5mm pitch 22-pin FFC to connect V-by-One-HS-RX's J7 to the Raspberry Pi's MIPI CSI-2 interface.


V-By-One-HS-Kit with MV camera

3 V4L2 mode manual

We have saved the code for v4l2 mode in this github repository.

3.1 Download the driver package

wget https://github.com/veyeimaging/raspberrypi_v4l2/releases/latest/download/raspberrypi_v4l2.tgz

3.2 Install driver

tar -xzvf raspberrypi_v4l2.tgz

cd raspberrypi_v4l2/release/

chmod +x *

sudo ./install_driver.sh veye_mvcam

3.3 Use the suitable veye_vbyone.dtbo

V-by-One has many configuration options, such as the MIPI rate, the number of MIPI lanes for the camera, the number of V-by-One-HS-TX output lanes, whether IO uses the local mode or remote mode, and the number of coaxial cables used.

The default configuration is as follows:

  • MIPI rate: 1.5Gbps/lane
  • Camera MIPI signal: 2 lanes
  • IO mode: Near-end mode
  • Number of coaxial cables: 1

Please note that these are the default settings, and they can be customized based on specific requirements or preferences.

You can choose the appropriate "veye_vbyone-[option].dtbo" file, rename it to "veye_vbyone.dtbo," and then copy it to the "/boot/overlay" directory.

Alternatively, if you need to use a different configuration for the V-by-One setup, simply refer to the camera driver source code compilation guide for the Raspberry Pi platform. Modify the "veye_vbyone.dts" file according to your requirements, recompile it to obtain the "veye_vbyone.dtbo" file, and then copy it to the "/boot/overlay" directory.

Once the installation is complete, reboot your Raspberry Pi to apply the changes.

3.4 Uninstall the driver

If you need to change to Legacy mode, or want to change to another camera module model driver, you must uninstall the current driver first.

sudo ./uninstall_driver.sh veye_vbyone

sudo ./uninstall_driver.sh veye_mvcam

3.5 Check system status

Take MV-MIPI-IMX178M as an example.

dmesg | grep mvcam

You can see the camera model and the version of the camera probed during the Linux boot phase.

camera is: MV-MIPI-IMX178M

firmware version: 0x1080102

And the /dev/video0 node exists, which proves that the camera status is normal.

3.6 v4l2-ctl application examples

Please refer to the corresponding section in the article on How to use MV series camera modules on the Raspberry Pi platform.

4 Legacy mode manual

We store the code for legacy patterns in this github repository.

4.1 Download the software package

git clone https://github.com/veyeimaging/mvcam_raspberrypi.git

Add executable permissions:

chmod +x -R ./mvcam_raspberrypi/

4.2 Software package main content introduction

camera_i2c_config:Automatically recognizes different Raspberry Pi board types and controls the power on pins to power the camera.

vbyone_i2c_init.sh: Script for initializing and configuring the V-by-One link.

mv_raspicam:Realize image preview, image saving and other functions.

mv_mipi_i2c.sh:Scripts for reading and setting camera parameters via i2c protocol.

4.3 Initialize the V-by-One link

First, execute the vbyone_i2c_init.sh script.

Instructions for using the vbyone_i2c_init.sh script:

Use the I2C command to initialize the SERDES channel of V-by-One.

Usage:  ./vbyone_i2c_init.sh

options:

   -b [i2c bus num]     i2c bus number,default 10

   -n [coax number]        coax number [1,2],default 1

   -s [camera mipi datarate]    1500 means:1500Mbps/lan; 1188 means: 1188Mbps/lan

   -l [camera lan number] 2 or 4

   -r [io remote or local] 0 means use io locally(on TX side); 1 means use io remotely(on RX side)

   -h                            print this help

Once the V-by-One link is initialized, you can use the mv_mipi_i2c.sh script to read the camera's version number and confirm whether the camera registers are accessible correctly.

Please refer to How to use MV series camera modules on the Raspberry Pi platform for more usage.

5 Local mode and Remote mode of IO

The IO of V-by-One-HS_KIT can be configured to local mode and remote. These two modes are only applicable to MV series cameras.

5.1 Local mode

Access the corresponding IO of the MV camera locally at the TX end of V-by-One.

MV Cam pin TX pin function
TriggerIN_IO GPIO0 trigger in
OUT_IO1 GPIO2 Strobe/userout
OUT_IO2 GPIO3 Strobe/userout/triggerout

5.2 Remote mode

Remote access to the corresponding IO of the MV camera is possible at the RX end of V-by-One.

MV Cam pin TX pin RX pin function Direction
TriggerIN_IO GPIO0 GPIO0 trigger in RX-->TX
OUT_IO1 GPIO2 GPIO2 Strobe/userout TX-->RX
OUT_IO2 GPIO3 GPIO3 Strobe/userout/triggerout TX-->RX

6 Common issue

  • Do not use i2cdetect

After system initialization, avoid using the i2cdetect command to detect address devices, as it may disrupt the established SerDes link.

7 Document History

  • 2023-07-30

First release version.