Difference between revisions of "FPD LINK III for Jetson"

From wiki_veye
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 15: Line 15:
  
 
== Hardware Setup ==
 
== Hardware Setup ==
[[File:XAVIER-FPDLINK3-4cam.jpg|center|thumb|600x600px|AGX XAVIER connnect with CS-FPD-CAMs]][[File:XAVIER-FPDLINK3-4cam.jpg|center|thumb|600x600px|AGX XAVIER connnect with CS-FPD-CAMs]][[File:TX2-FPDLINK3-4cams.jpg|center|thumb|600x600px|TX2 connect with CS-FPD-CAMs]]PS:[[FPD-LINK3-2RX Data Sheet index|FPD-LINK3-2RX]] need a 12V DC power.
+
[[File:XAVIER-FPDLINK3-4cam.jpg|center|thumb|600x600px|AGX XAVIER connnect with CS-FPD-CAMs]][[File:XAVIER-FPDLINK3-4cam.jpg|center|thumb|600x600px|AGX XAVIER connnect with CS-FPD-CAMs]][[File:TX2-FPDLINK3-4cams.jpg|center|thumb|600x600px|TX2 connect with CS-FPD-CAMs]]PS:
 +
 
 +
# [[FPD-LINK3-2RX Data Sheet index|FPD-LINK3-2RX]] need a 12V DC power.
 +
# FPD-LINK3-2RX needs power up no later than Xavier . Because Xavier detects peripherals during the startup phase.
 +
#'''Be sure to screw the ADP adapter board to the bottom board.'''
  
 
== Upgrade Jetson Nano, Jetson TX2, AGX Xavier and Xavier NX system ==
 
== Upgrade Jetson Nano, Jetson TX2, AGX Xavier and Xavier NX system ==
Line 24: Line 28:
 
<code>ls /sys/bus/i2c/drivers/</code>
 
<code>ls /sys/bus/i2c/drivers/</code>
  
There should have veye327 csx307 cssc132 i2c-ds90ub954 directory.
+
There should have veyecam2m veye327 csx307 cssc132 i2c-ds90ub954 directory.
 
=====For DTB=====
 
=====For DTB=====
 
DTB varies from platform  and from camera module.
 
DTB varies from platform  and from camera module.
Line 44: Line 48:
 
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
 
<code>ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*</code>
  
- Xavier NX
+
- Xavier NX and TX2 NX(p3509-0000 carrier board)
  
 
<code>ls /proc/device-tree/cam_i2cmux/i2c@*</code>
 
<code>ls /proc/device-tree/cam_i2cmux/i2c@*</code>
Line 81: Line 85:
 
|FPD-LINK3-2RX port 0
 
|FPD-LINK3-2RX port 0
 
|}
 
|}
====Xavier NX====
+
====Xavier NX and TX2 NX(p3509-0000 carrier board)====
 
{| class="wikitable"
 
{| class="wikitable"
 
!Camera Index
 
!Camera Index
Line 236: Line 240:
  
 
=== CS-FPD-CAM-IMX307 sync mode,connnect to Jetson Nano B01/NX ===
 
=== CS-FPD-CAM-IMX307 sync mode,connnect to Jetson Nano B01/NX ===
[[File:CS-FPD-CAM-IMX307 sync mode's sync singal connection NEW.png|alt=|center|thumb|800x800px|CS-FPD-CAM-IMX307 sync mode's sync singal connection]]
+
[[File:CS-FPD-CAM-IMX307 sync mode's sync singal connection NEW.png|alt=|center|thumb|800x800px|CS-FPD-CAM-IMX307 sync mode's sync singal connection]]<br />SYNC signal connect J7-3 to J1-3,J7-2 to J1-2.
 
 
 
=====Step 1:=====
 
=====Step 1:=====
 
On the motherboard of the two cameras, execute:
 
On the motherboard of the two cameras, execute:
Line 262: Line 265:
  
 
=== CS-FPD-CAM-IMX307 sync mode,connnect to Jetson AGX Xavier ===
 
=== CS-FPD-CAM-IMX307 sync mode,connnect to Jetson AGX Xavier ===
[[File:CS-FPD-IMX307 connect to Jetson AGX Xavier SYNC MODE NEW.png|alt=|center|thumb|800x800px|CS-FPD-IMX307 connect to Jetson AGX Xavier SYNC MODE]]
+
[[File:CS-FPD-IMX307 connect to Jetson AGX Xavier SYNC MODE NEW.png|alt=|center|thumb|800x800px|CS-FPD-IMX307 connect to Jetson AGX Xavier SYNC MODE]]SYNC signal connect J7-3 to J1-3,J7-2 to J1-2.
  
 
=====Step 1:=====
 
=====Step 1:=====
Line 311: Line 314:
 
The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.
 
The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.
 
=====SYNC signal connection:=====
 
=====SYNC signal connection:=====
The synchronization signal is connected as shown in the figure above. J5 needs to be connected with J7's 2, 4, 6 and 8pin, and J6 is connected with J8's 2, 4, 6 and 8pin.
+
The synchronization signal is connected as shown in the figure above. J6 is connected with J8's 2, 4, 6 and 8pin.
  
 
For the schematic diagram of the SYNC signal, please refer to:
 
For the schematic diagram of the SYNC signal, please refer to:
Line 322: Line 325:
  
 
=== CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson Nano B01/NX ===
 
=== CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson Nano B01/NX ===
[[File:CS-FPD-CAM-SC132 trigger mode new.png|alt=|center|thumb|780x780px|CS-FPD-CAM-SC132 trigger mode's trigger signal]]
+
[[File:CS-FPD-CAM-SC132 trigger mode new.png|alt=|center|thumb|780x780px|CS-FPD-CAM-SC132 trigger mode's trigger signal]]SYNC signal connect J7-1 to J1-1,J7-2 to J1-2.
 +
 
 
=====Step 1:=====
 
=====Step 1:=====
 
On the motherboard of the camera, execute:
 
On the motherboard of the camera, execute:
Line 341: Line 345:
  
 
=== CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson AGX Xavier ===
 
=== CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson AGX Xavier ===
[[File:CS-FPD-SC132-Xavier-TRIGGER.png|center|thumb|800x800px|CS-FPD-SC132-Xavier- trigger mode's trigger signal]]
+
[[File:CS-FPD-SC132-Xavier-TRIGGER.png|center|thumb|800x800px|CS-FPD-SC132-Xavier- trigger mode's trigger signal]]SYNC signal connect J7-1 to J1-1,J7-2 to J1-2.
 +
 
 
=====Step 1:=====
 
=====Step 1:=====
 
On the motherboard of the camera, execute:
 
On the motherboard of the camera, execute:

Latest revision as of 08:27, 15 July 2022

查看中文

1 Introduction

FPD-Link SerDes III is a coaxial remote transmission scheme of video stream provided by TI. We have designed FPD-LINK3-TX and FPD-LINK3-2RX boards, which can realize coaxial transmission of 1 or 2 channels of MIPI CSI-2 images, and the transmission distance can be up to 8meters(RG174 RF Cable) or 10meters(RG58 RF Cable).

On Jetson Nano/NX platform, a set of FPD-LINK3-TX and FPD-LINK3-2RX boards are used to realize the remote transmission of 1-channel video. The I2C address of the camera after initialization configuration is the same as that of the original camera.On FPD-LINK3-2RX board, fpdlink channel is from port0(J3) to J9.

On Jetson TX2/AGX Xavier platform, a set of FPD-LINK3-TX and FPD-LINK3-2RX boards are used to realize the remote transmission of 2-channel video. On FPD-LINK3-2RX board, fpdlink channel is from port0(J3) and port1(J4) to J7. J7 is a MIPI interface of 4 lan, which supports two independent camera data transmission through virtual channel technology.

For application layer, it support all MIPI camera functions, including image, i2C communication, synchronous IO and trigger IO.

Therefore, when using CS-FPD-CAM, you must refer to the following article:

2 Hardware Setup

AGX XAVIER connnect with CS-FPD-CAMs
AGX XAVIER connnect with CS-FPD-CAMs
TX2 connect with CS-FPD-CAMs

PS:

  1. FPD-LINK3-2RX need a 12V DC power.
  2. FPD-LINK3-2RX needs power up no later than Xavier . Because Xavier detects peripherals during the startup phase.
  3. Be sure to screw the ADP adapter board to the bottom board.

3 Upgrade Jetson Nano, Jetson TX2, AGX Xavier and Xavier NX system

The steps are basically the same as Upgrade Jetson Nano, Jetson TX2, AGX Xavier and Xavier NX. Note that dts, dtb, use the version with the fpdlink suffix. Driver source code and Image, are compatible with FPD-Link and MIPI interface cameras.

3.1 Are Image and DTB upgrade successful ?

3.1.1 For Image

ls /sys/bus/i2c/drivers/

There should have veyecam2m veye327 csx307 cssc132 i2c-ds90ub954 directory.

3.1.2 For DTB

DTB varies from platform and from camera module.

- Nano A02

ls /proc/device-tree/host1x/i2c@546c0000/

- Nano B01

ls /proc/device-tree/cam_i2cmux/i2c@*

- TX2 Devkit

ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*

- AGX Xavier

ls /proc/device-tree/i2c@3180000/tca9548@70/i2c@*

- Xavier NX and TX2 NX(p3509-0000 carrier board)

ls /proc/device-tree/cam_i2cmux/i2c@*

You should be able to find the camera model you used and ds90ub954.

4 I2C Address

fpdlink port:FPD-LINK3-2RX,J3 is port 0, J4 is port 1.

4.1 Nano A02

Camera Index I2C bus I2C Addr Location
Camera 0 6 0x3b FPD-LINK3-2RX port 0

4.2 Nano B01

Camera Index I2C bus I2C Addr Location
Camera 0 7 0x3b FPD-LINK3-2RX port 0
Camera 1 8 0x3b FPD-LINK3-2RX port 0

4.3 Xavier NX and TX2 NX(p3509-0000 carrier board)

Camera Index I2C bus I2C Addr Location
Camera 0 9 0x3b FPD-LINK3-2RX port 0
Camera 1 10 0x3b FPD-LINK3-2RX port 0

4.4 AGX Xavier

Camera Index I2C bus I2C Addr Location
Camera 0 30 0x3b ADP-N3 J1--FPD-LINK3-2RX port 0
Camera 1 30 0x3c ADP-N3 J1--FPD-LINK3-2RX port 1
Camera 2 31 0x3b ADP-N3 J2--FPD-LINK3-2RX port 0
Camera 3 31 0x3c ADP-N3 J2--FPD-LINK3-2RX port 1
Camera 4 32 0x3b ADP-N3 J3--FPD-LINK3-2RX port 0
Camera 5 32 0x3c ADP-N3 J3--FPD-LINK3-2RX port 1
Camera 6 33 0x3b ADP-N3 J4--FPD-LINK3-2RX port 0
Camera 7 33 0x3c ADP-N3 J4--FPD-LINK3-2RX port 1

4.5 TX2 Devkit

Camera Index I2C bus I2C Addr Location
Camera 0 30 0x3b ADP-N2 J1--FPD-LINK3-2RX port 0
Camera 1 30 0x3c ADP-N2 J1--FPD-LINK3-2RX port 1
Camera 2 31 0x3b ADP-N2 J2--FPD-LINK3-2RX port 0
Camera 3 31 0x3c ADP-N2 J2--FPD-LINK3-2RX port 1
Camera 4 32 0x3b ADP-N2 J3--FPD-LINK3-2RX port 0
Camera 5 32 0x3c ADP-N2 J3--FPD-LINK3-2RX port 1

4.6 Applications and Test

The same as Applications and Test on Jetson of MIPI Camera.

5 FPD-Link III shell script manual

$ ./fpdlink3_i2c_jetson.sh

Usage:  ./fpdlink3_i2c_jetson.sh [-f] function name -b bus -p port -p1 param1 -p2 param2 -p3 param3

options:

    -f [function name]       function name

    -b [i2c bus num]               i2c bus number

    -p [fpdlink port]      fpd link port number [0,1]

    -p1 [param1]                           param1 of each function

    -p2 [param1]                           param2 of each function

    -p3 [param1]                           param3 of each function

support functions: rpi_init,sync_init,trigger_init

fpdlink port:FPD-LINK3-2RX,J3 is port 0, J4 is port 1.

5.1 fpdlink3_i2c.sh Usage

The probing and loading of FPD-Link devices are completed automatically when the system is powered on.

5.1.1 sync_init

./fpdlink3_i2c_jetson.sh -f sync_init -b [busnum] -p [portnum] -p1 0

Configure the camera on I2C bus [busnum], port [portnum] as the master of sync mode.

Connect J1 of FPD-LINK3-TX on port [portnum] to J6 of FPD-LINK3-2RX,direction is TX-->RX.

./fpdlink3_i2c_jetson.sh -f sync_init -b [busnum] -p [portnum] -p1 1

Configure the camera on I2C bus [busnum], port [portnum] as the slave of sync mode.

Connect J8 of FPD-LINK3-2RX on port [portnum] to J1 of FPD-LINK3-TX ,direction is RX-->TX.

5.1.2 trigger_init

./fpdlink3_i2c_jetson.sh -f trigger_init -b [busnum] -p [portnum]

Configure the camera on I2C bus [busnum], port [portnum] as the trigger mode.

Connect J6-0 of FPD-LINK3-2RX on port [portnum] to J1-0 of FPD-LINK3-TX ,direction is RX-->TX.

6 Typical application

6.1 CS-FPD-CAM Video usage, connnect to Jetson Nano B01/NX

CS-FPD-CAM connect to Jetson Nano/NX

6.2 CS-FPD-CAM Video usage, connnect to Jetson AGX Xavier

CS-FPD-CAM connect to Jetson AGX Xavier

6.3 CS-FPD-CAM-IMX307 sync mode,connnect to Jetson Nano B01/NX

CS-FPD-CAM-IMX307 sync mode's sync singal connection


SYNC signal connect J7-3 to J1-3,J7-2 to J1-2.

6.3.1 Step 1:

On the motherboard of the two cameras, execute:

ls /dev/video*

The presence of a video0,video1, indicates that the camera has been correctly detected and the video can be connected.

6.3.2 Step 2:

After Step 1,

  • Configure cam0 as the master

./fpdlink3_i2c.sh -f sync_init -p 0 -p1 0 -b [i2c_bus_num]

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 0 -b [i2c_bus_num] -d 0x3b

  • Configure cam1 as the slave

./fpdlink3_i2c.sh -f sync_init -p 0 -p1 1 -b [i2c_bus_num]

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b [i2c_bus_num] -d 0x3b

6.3.3 Step 3:

The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.

6.4 CS-FPD-CAM-IMX307 sync mode,connnect to Jetson AGX Xavier

CS-FPD-IMX307 connect to Jetson AGX Xavier SYNC MODE

SYNC signal connect J7-3 to J1-3,J7-2 to J1-2.

6.4.1 Step 1:

On the motherboard of the two cameras, execute:

ls /dev/video*

The presence of a video0-7, indicates that the camera has been correctly detected and the video can be connected.

6.4.2 Step 2:

After Step 1,

  • Configure cam0 as the master

./fpdlink3_i2c.sh -f sync_init -p 0 -p1 0 -b [i2c_bus_num]

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 0 -b [i2c_bus_num] -d 0x3b

  • Configure cam1-cam7 as the slave

./fpdlink3_i2c_jetson.sh -f sync_init -p 1 -p1 1 -b 30

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 30 -d 0x3c

./fpdlink3_i2c_jetson.sh -f sync_init -p 0 -p1 1 -b 31

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 31 -d 0x3b

./fpdlink3_i2c_jetson.sh -f sync_init -p 1 -p1 1 -b 31

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 31 -d 0x3c

./fpdlink3_i2c_jetson.sh -f sync_init -p 0 -p1 1 -b 32

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 32 -d 0x3b

./fpdlink3_i2c_jetson.sh -f sync_init -p 1 -p1 1 -b 32

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 32 -d 0x3c

./fpdlink3_i2c_jetson.sh -f sync_init -p 0 -p1 1 -b 33

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 33 -d 0x3b

./fpdlink3_i2c_jetson.sh -f sync_init -p 1 -p1 1 -b 33

./cs_mipi_i2c.sh -w -f streammode -p1 1 -p2 1 -b 33 -d 0x3c

6.4.3 Step 3:

The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.

6.4.4 SYNC signal connection:

The synchronization signal is connected as shown in the figure above. J6 is connected with J8's 2, 4, 6 and 8pin.

For the schematic diagram of the SYNC signal, please refer to:

6.5 CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson Nano B01/NX

CS-FPD-CAM-SC132 trigger mode's trigger signal

SYNC signal connect J7-1 to J1-1,J7-2 to J1-2.

6.5.1 Step 1:

On the motherboard of the camera, execute:

ls /dev/video*

The presence of a video0, indicates that the camera has been correctly detected and the video can be connected.

6.5.2 Step 2:

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b [i2c_bus_num] -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b [i2c_bus_num] -d 0x3b

Configure port 0 as trigger mode.

6.5.3 Step 3:

After Step 1, the I2C to control camera is ready.The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.

Refer to Camera_module_Trigger_Mode_manual to configure the camera.

6.6 CS-FPD-CAM-SC132 Trigger mode,connnect to Jetson AGX Xavier

CS-FPD-SC132-Xavier- trigger mode's trigger signal

SYNC signal connect J7-1 to J1-1,J7-2 to J1-2.

6.6.1 Step 1:

On the motherboard of the camera, execute:

ls /dev/video*

The presence of a video0-7, indicates that the camera has been correctly detected and the video can be connected.

6.6.2 Step 2:

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b 30 -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 30 -d 0x3b

./fpdlink3_i2c_jetson.sh -f trigger_init -p 1 -b 30 -d 0x3c

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 30 -d 0x3c

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b 31 -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 31 -d 0x3b

./fpdlink3_i2c_jetson.sh -f trigger_init -p 1 -b 31 -d 0x3c

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 31 -d 0x3c

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b 32 -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 32 -d 0x3b

./fpdlink3_i2c_jetson.sh -f trigger_init -p 1 -b 32 -d 0x3c

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 32 -d 0x3c

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b 33 -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 33 -d 0x3b

./fpdlink3_i2c_jetson.sh -f trigger_init -p 1 -b 33 -d 0x3c

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 33 -d 0x3c

./fpdlink3_i2c_jetson.sh -f trigger_init -p 0 -b 34 -d 0x3b

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 34 -d 0x3b

./fpdlink3_i2c_jetson.sh -f trigger_init -p 1 -b 34 -d 0x3c

./cs_mipi_i2c.sh -w -f streammode -p1 3 -b 34 -d 0x3c

Configure all cameras as trigger mode.

6.6.3 Step 3:

After Step 1, the I2C to control camera is ready.The stream acquisition and I2C instruction control of the camera are exactly the same as those of the camera with the MIPI interface now.

Refer to Camera_module_Trigger_Mode_manual to configure the camera.