Getting started guide for Auvidea J106 board
|
|
|
Auvidea J106 board Introduction
This wiki page provides useful instructions to start using the Auvidea J106 board for Jetson TX1. J106 provides access to the 6 two-lanes CSI ports available on Jetson TX1 module.
Auvidea J106 configuration and Setup
For each of the 6 input ports available in the J106 there is one clock and GPIO pin (reset for some cameras) available. The GPIO is the same for the 6 CSI input ports and is controlled byt the GPIO 148 in order to activate it make sure to run the following commands:
GPIO = 148 DIRECTION = out VALUE = 1 sudo su echo $GPIO > /sys/class/gpio/export echo DIRECTION > /sys/class/gpio/gpio$GPIO/direction echo VALUE > /sys/class/gpio/gpio$GPIO/value exit
After you have executed all those commands, the camera should respond to I2C accesses.
- Pi camera 1.3
normal address: 0x36 translated address: 0x34
- Pi camera 2.1
normal address: 0x64 translated address: 0x12
- imx219
normal address: 0x10 translated address: 0x12
Example: PiCamera 1.3 on CSI-A
i2cdetect -y -r 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- —
CSI ports
The Jetson TX1 has six CSI-2 ports of 2 lanes each:
*CSI-A --> csi port 0 *CSI-B --> csi port 1 *CSI-C --> csi port 2 *CSI-D --> csi port 3 *CSI-E --> csi port 4 *CSI-F --> csi port 5
I2c buses for each CSI port
A .. F: CSI-2 busses 0-N: I2C bus 0 (normal = address not shifted) 0-S: I2C bus 0 (shifted by 2) 6-N: I2C bus 6 (normal = address not shifted) 6-S: I2C bus 6 (shifted by 2) 2-N: I2C bus 2 (normal = address not shifted) 2-S: I2C bus 2 (shifted by 2)
Camera capture
Sony IMX219 image sensor
The Sony IMX219 is a CMOS image sensor with the following features:
- CSI2 serial data output (selection of 4 or 2 lanes)
- Max. 30 frame/s in all-pixel scan mode
- 180 frame/s 720p with 2x2 analog (special) binning, 60 frame/s @ 1080p with V-crop
- Data rate: Max. 722 Mbps/lane(@4lane), 912 Mbps/Lane(@2lane)
- Max resolution of 3280 (H) x 2464 (V) approx. 8.08 M pixels
Please be aware that using J106 require an adapter from 15pins to 22pins.
Installing prebuilt image to Jetson TX1
Step 1: Flash the Jetson TX1 to boot using a filesystem in the SD card
- After installing Jetpack in your PC, you first need to flash the Jetson TX1 module indicating that the filesystem will be mounted from the SD card, in order to do this replace the extlinux.conf
sudo cp $DEVDIR/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $DEVDIR/64_TX1/Linux_for_Tegra_64_tx1/rootfs/boot/extlinux/extlinux.conf
- Then flash it
cd $DEVDIR/64_TX1/Linux_for_Tegra_64_tx1/ sudo ./flash.sh jetson-tx1 mmcblk1p1
Step 2: Flash the SD card image into a SD card
- Download the J106 SD card image
- untar the file using the following command:
tar -xzf j106-imx219-capture.img.tar.gz
- Flash the sd card using the following command, please check the mount point and change it to the correct /dev/sd{a,b,c,d..} address.
sudo dd if=j106-sdcard.img of=/dev/sdX bs=16M
Using RidgeRun SDK and patches
Through the SDK you can easily patch the kernel and generate an image with the required changes to get the imx219 sensor to work. In this wiki Getting Started Guide for Tegra X1 Jetson you can find all the information required to build a Jetson TX1 SDK from scratch.
In order to add the IMX219 driver follow this steps:
- Go to to your SDK directory
- Go to the kernel directory
- Copy the patches in the patches directory
0001-add-imx219-subdevice-driver.patch 0002-add-imx219-dtb.patch
In the case that you will use the driver with the J20 board, you will need to copy the following patch:
0003-add-j20-board-driver.patch
- Modify the series file in the kernel directory. You have to add the 3 above patches.
- Run make config and select the IMX219 in the Kernel Configuration like this:
-> Kernel Configuration -> Device Drivers -> Multimedia support -> Encoders, decoders, sensors and other helper chips -> <*> IMX219 camera sensor support
In the case that you will use the driver with the J20 board, you need to select the J20 support Kernel Configuration like this:
-> Kernel Configuration -> Device Drivers -> Multimedia support -> Encoders, decoders, sensors and other helper chips -> <*> Auvidea J20 Expansion board
- Then make the SDK and install following the Started Guide mentioned before
Test pipelines
Single Camera - 1640x1232 Resolution
export CAPS = "video/x-raw(memory:NVMM), width=(int)1640, height=(int)1232, format=(string)I420, framerate=(fraction)30/1" DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! $CAPS ! autovideosink
Six Cameras - 1640x1232 Resolution into individual windows
export INPUT_CAPS="video/x-raw(memory:NVMM),width=(int)1640,height=(int)1232,format=(string)I420,framerate=(fraction)30/1" export CONVERT_CAPS="video/x-raw,width=(int)640,height=(int)480,format=(string)I420,framerate=(fraction)30/1" DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink nvcamerasrc sensor-id=1 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink nvcamerasrc sensor-id=2 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink nvcamerasrc sensor-id=3 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink nvcamerasrc sensor-id=4 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink nvcamerasrc sensor-id=5 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! xvimagesink -v
Six Cameras - 1640x1232 Resolution mixed into single window
export INPUT_CAPS="video/x-raw(memory:NVMM),width=(int)1640,height=(int)1232,format=(string)I420,framerate=(fraction)30/1" export CONVERT_CAPS="video/x-raw, width=(int)320,height=(int)240,format=(string)I420,framerate=(fraction)30/1" DISPLAY=:0 gst-launch-1.0 nvcamerasrc sensor-id=0 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_1 nvcamerasrc sensor-id=1 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_2 nvcamerasrc sensor-id=2 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_3 nvcamerasrc sensor-id=3 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_4 nvcamerasrc sensor-id=4 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_5 nvcamerasrc sensor-id=5 fpsRange="30 30" ! $INPUT_CAPS ! nvvidconv ! $CONVERT_CAPS ! mixer.sink_6 videotestsrc pattern="black" ! video/x-raw,width=1,height=1 ! videomixer name=mixer sink_0::xpos=0 sink_0::ypos=0 sink_0::alpha=0 sink_1::xpos=320 sink_1::ypos=0 sink_2::xpos=320 sink_2::ypos=240 sink_3::xpos=0 sink_3::ypos=0 sink_4::xpos=0 sink_4::ypos=480 sink_5::xpos=0 sink_5::ypos=240 sink_6::xpos=320 sink_6::ypos=480 ! queue ! ximagesink sync=false -v
More capture pipelines using the IMX219 sensor
Ridgerun has a wikipage on the developer page in order to test capture with the IMX219 sensor , please refer to it for more examples IMX219 gstreamer examples
Known Issues
- J106 sometimes fails to detect USB devices after cold boot.
- J106 has issues when starting to capture from several cameras at the same time using gst-launch.
For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.
Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.