TDA4VEN-Q1: Keep hanging when capturing frame

Part Number: TDA4VEN-Q1
Other Parts Discussed in Thread: AM67, AM67A

Tool/software:

Hi TI,

We have TDA4VEN - DS90UB960 - IMX390 (builtin DS90UB953), and the device tree relay is set. Now, we want to test the sensor powering on and working or not using the following code:

Fullscreen
1
2
3
4
5
6
# after boot and login, config code provided by manutacturer
$ i2cset -y 7 0x3d 0x4c 0x01
$ i2cset -y 7 0x3d 0x58 0x5e
$ i2cset -y 7 0x3d 0x1f 0x02
$ i2cset -y 7 0x3d 0x20 0x20
$ i2cset -y 7 0x3d 0x33 0x03
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/videodev2.h>
#include <string.h>
#include <errno.h>
#define DEVICE "/dev/video4"
#define WIDTH 1936
#define HEIGHT 1100
int main() {
int fd = open(DEVICE, O_RDWR);
if (fd == -1) {
perror("Error opening video device");
return 1;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The execution hangs at line 88, and if we interrupt with ctrl + c and check the 0x20 and 0x33 registers of 954, the value was modified back to 0xf0, 0x02, respectively. The values seem to be modified after line 81 executed.

We also tried `v4l2-ctl --device /dev/video4 --stream-mmap --stream-count=1 --stream-to=frame.raw` and hanged too.

Regards

  • Hello,

    Could you share which specific IMX390 module you are using? If it is not D3RCM-IMX390-953, I recommend going through the FAQ list linked below to help you debug.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1403223/faq-most-common-problems-encountered-when-developing-camera-applications-on-the-am6x

    AM67 Academy: Use Camera

    Please let me know if you have any further questions.

    Thank you,

    Fabiana

  • Hi, we are using this imx390 module. Our vendor does not have / give us the configuration about 953 <-> sensor in Linux (they said this is done in firmware). The module is only under developed and tested in RTOS.

    Does D3RCM-IMX390-953 need configuration too? I don't see any step on their website. We consider buying a new one if it is a plug-and-play module (to also reduce the works of integrating the camera).

    Thank you.

  • Hi,

    When you say configuration, are you referring to the device tree overlay? D3RCM-IMX390-953 is supported on both TDA4VEN Linux and RTOS platforms. The Discovery IMX390 module is supported on RTOS only. The sensor you have linked has not been validated by us. Please take a look at the following pages for more information.

    FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1452909/faq-am67a-enabling-csi2-sensors-via-fusion-board-on-am6x

    J722S Linux SDK Documentation: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j722s/10_01_00_04/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX.html#enabling-camera-sensors

    List of sensors supported out-of-box: https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j722s/10_01_00_04/exports/docs/imaging/imaging_release_notes.html

    Thank you,

    Fabiana

  • Hi, the mentioned "configuration" means the i2c settings. Our vendor gives us a few lines of commands to setup the register of ub960. It looks like:

    Fullscreen
    1
    2
    3
    4
    5
    0x4C,0x01 // set TI954 config
    0x58,0x5E
    0x1F,0x02
    0x20,0x20
    0x33,0x03 // stream on
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I believe these are RTOS settings. If we have not the corresponding i2c settings on the Linux (edgeai sdk), we could not receive the data from sensor, right (the dtbo has setup)?

    Does the D3RCM-IMX390-953 need the extra i2c settings? or does it work directly after being plugged onto the deserializer?

    Regards

  • Hi,

    It seems you are using UB954 deserialzier, is it? Then this is not supported by default in the SDK. you would need to update imaging component to support this deserializer.

    Regards,

    Brijesh

  • Hi, we have both ub954 and ub960, and their configurations provided by sensor manufacturer are same (as above). We finally use ub960 to avoid some unexpected error.

    Sorry for pasting the misleading code.

    Regards

  • So, does D3RCM-IMX390-953 with FOV70 work without any extra steps on Linux after booting from the sd card? We want to simply demo the edgeai gallery in TI's prebuilt Linux tarball using this.

    Regards

  • Hi,

    Yes, D3-RCM camera with UB960 on Fusion board works on EVM without any extra steps.

    Regards,

    Brijesh

  • Hi,

    Thank you for the confirmation. We'd order this sensor for the demonstration.

    Regards

  • Sorry, I found we need the camera with about FOV100. Does D3 Discovery IMX390 be tested and could be the alternative choice for the simply Linux edgeai-gst-apps gallery demonstration currently?

    Regards

    Edit: I found another OV2312 sensor at the Supported Image Sensors EdgeAI section in here, but not be listed in here. Is it okay for out-of-the-box edgeai demonstration?

  • Hello,

    Based on the last test case, j722s + fusion1 + ov2312 works fine in RGB-only and IR-only modes, but simultaneous streaming fails. I have reached out to our imaging team to get a status on this issue.

    Thank you,

    Fabiana

  • Hi, however, I do not find the corresponding configuration under edgeai-gst-apps' configs (something like ov2312_cam_example.yaml) but only OV5640 one. If I create a new one by this template, could I to make it only stream the RGB or IR at a time? I found this description for am62a but this section is missing for am67a/j722s.

    Sorry for the detailed confirmation. We have already buy two unsupported camera..

    Regards

  • Hello,

    Have you already purchased the ov2312 sensor? Are you wanting to simply stream or capture frames from ov2312 or would you like to also run the sample edge AI GStreamer-based applications with this sensor as your input? See the pipelines and sample configuration file that can accomplish either task. Although I have shared the pipeline for simultaneous RGB + IR streaming, please keep in mind that it is not validated to work on this device. Because I do not have the ov2312 sensor with me at the moment, I have not tested the example configuration file yet so please let me know if you run into any issues when trying to use it.

    Stream RGB only:

    Fullscreen
    1
    2
    3
    4
    5
    6
    gst-launch-1.0 v4l2src device=/dev/video-ov2312-rgb-cam0 io-mode=5 ! \
    video/x-bayer, width=1600, height=1300, format=bggi10 ! queue leaky=2 ! tiovxisp sensor-name=SENSOR_OV2312_UB953_LI \
    dcc-isp-file=/opt/imaging/ov2312/linear/dcc_viss.bin \
    sink_0::dcc-2a-file=/opt/imaging/ov2312/linear/dcc_2a.bin sink_0::device=/dev/v4l-ov2312-subdev0 format-msb=9 \
    sink_0::pool-size=8 src::pool-size=8 ! \
    video/x-raw, format=NV12, width=1600, height=1300, framerate=30/1 ! kmssink driver-name=tidss sync=false
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Stream IR only:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    gst-launch-1.0 v4l2src device=/dev/video-ov2312-ir-cam0 io-mode=5 ! \
    video/x-bayer, width=1600, height=1300, format=bggi10 ! queue leaky=2 ! tiovxisp sensor-name=SENSOR_OV2312_UB953_LI \
    dcc-isp-file=/opt/imaging/ov2312/linear/dcc_viss.bin \
    sink_0::dcc-2a-file=/opt/imaging/ov2312/linear/dcc_2a.bin format-msb=9 \
    sink_0::pool-size=8 src_0::pool-size=8 ! \
    video/x-raw, format=GRAY8, width=1600, height=1300 ! \
    videoconvert ! video/x-raw, format=NV12 ! kmssink driver-name=tidss sync=false
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Stream RGB + IR simultaneously:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    gst-launch-1.0 v4l2src device=/dev/video-ov2312-rgb-cam0 io-mode=5 ! \
    video/x-bayer, width=1600, height=1300, format=bggi10 ! queue leaky=2 ! tiovxisp sensor-name=SENSOR_OV2312_UB953_LI \
    dcc-isp-file=/opt/imaging/ov2312/linear/dcc_viss.bin \
    sink_0::dcc-2a-file=/opt/imaging/ov2312/linear/dcc_2a.bin sink_0::device=/dev/v4l-ov2312-subdev0 format-msb=9 \
    sink_0::pool-size=8 src::pool-size=8 ! \
    video/x-raw, format=NV12, width=1600, height=1300 ! queue ! mosaic.sink_0 \
    v4l2src device=/dev/video-ov2312-ir-cam0 io-mode=5 ! video/x-bayer, width=1600, height=1300, format=bggi10 ! queue leaky=2 ! \
    tiovxisp sensor-name=SENSOR_OV2312_UB953_LI \dcc-isp-file=/opt/imaging/ov2312/linear/dcc_viss.bin \
    sink_0::dcc-2a-file=/opt/imaging/ov2312/linear/dcc_2a.bin format-msb=9 sink_0::pool-size=8 src_0::pool-size=8 ! \
    video/x-raw, format=GRAY8, width=1600, height=1300 ! videoconvert ! \video/x-raw, format=NV12 ! queue ! mosaic.sink_1 \
    tiovxmosaic name=mosaic \
    sink_0::startx="<0>" sink_0::starty="<0>" sink_0::widths="<640>" sink_0::heights="<480>" \
    sink_1::startx="<640>" sink_1::starty="<480>" sink_1::widths="<640>" sink_1::heights="<480>" ! \
    queue ! kmssink driver-name=tidss sync=false
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    edgeai-gst-apps example config for ov2312:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    title: "OV2312 Camera"
    log_level: 2
    inputs:
    input0:
    source: /dev/video-ov2312-rgb-cam0
    subdev-id: /dev/v4l-ov2312-subdev0
    width: 1600
    height: 1300
    format: rggi10
    framerate: 30
    input1:
    source: /dev/video-ov2312-ir-cam0
    subdev-id: /dev/v4l-ov2312-subdev0
    width: 1600
    height: 1300
    format: rggi10
    framerate: 30
    models:
    model0:
    model_path: /opt/model_zoo/TVM-CL-3090-mobileNetV2-tv
    topN: 5
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thank you,

    Fabiana