This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: TDA4VM receiving camera data problem.

Part Number: TDA4VM

Hi,

I use psdk_0703 to develop TDA4 software.

I tried to configure the camera (1280 *960  yuv422 8bit ), When testing one camera ,but it can't receive the image

I tried to run ti_fs/vision_apps/vx_app_single_cam.out ,it  blocked in vxGraphParameterEnqueueReadyRef function on the app_single_cam_main.c

     " status = vxGraphParameterEnqueueReadyRef(obj->graph, 0, (vx_reference*)&(obj->cap_frames[buf_id]), 1);" 

and then  i found that the following registers may not be correct, but I don't know why?  and please help me check config .Thanks.

The register 0x04504104  value is 0x80000111 .

Looking forward to your reply.

The driver config:

  • Hi,

    Are you sure it is hanging in vxGraphParameterEnqueueReadyRef APi? Because typically, if capture is not running, then it hangs in vxGraphParameterDequeueDoneRef API. This essentially mean CSIRX is not detecting valid input frame.

    Couple of things to check

    1, by default, single cam example assumes lane speed s 1.6Gbps. Could you please check if this is what your sensor/deserializer is outputting?

    2, Please check if lane position, polarity and number of lanes are matching as per the HW

    3, Please check if data type is UYVY in sensor/deserializer and also use the same virtual channel id as configured in camera/deserializer.

    4, Please make sure to start the sensor/deserializer only after VerifyGraph is called. In Imaging component, this is taken care by starting deserializer and sensor in streamon callback. It must not be started before this.

    Regards,

    Brijesh

  • Thanks for your reply.

    1, by default, single cam example assumes lane speed s 1.6Gbps. Could you please check if this is what your sensor/deserializer is outputting?

     ==> The lane speed is 750 Mbps.

            The driver config as shown in the figure. 

    2, Please check if lane position, polarity and number of lanes are matching as per the HW

    ==>  We matching 4 lans as per  the HW.  and I was used other the same deserializer sensor ,same out port ,

    and then run same vx_app_single_cam.out , the soc was can received Data packet. Does this mean that the whole of path from camera to SOC is good? but i was changed this current sersor can't received packet. 

    3, Please check if data type is UYVY in sensor/deserializer and also use the same virtual channel id as configured in camera/deserializer.

    ==> We used mipii analyzer test sensor and i  was discovery that data type is YUV422_8bit(0x1E). and the corresponding code data type should be {VX_DF_ IMAGE_UYVY,  7 }.

     

    4, Please make sure to start the sensor/deserializer only after VerifyGraph is called. In Imaging component, this is taken care by starting deserializer and sensor in streamon callback. It must not be started before this.

    ==>My code configure sensor/deserializer  on  PowerOn function and the open mipii flow in StreamOn function  in driver. So I think it accord  the requirements.  because i will changed other same deserializer/sensor init register, and run same vx_app_single_cam.out  can recived packet.

    Are there any other possible problems?

    Thanks.Looking forward to your reply.

  • Hi,

    I think single camera example does not use CSI lane speed variable, so even if you have set this variable to 750, CSIRX would still be configured for 1.6GBps. Can you please change add below statement

    local_capture_config.instCfg[id].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS

    in below loop 

    for(id = 0; id < local_capture_config.numInst; id++)
    {
    local_capture_config.instId[id] = id;
    local_capture_config.instCfg[id].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[id].numDataLanes = sensorParams.sensorInfo.numDataLanes;

    for (lane = 0; lane < local_capture_config.instCfg[id].numDataLanes; lane++)
    {
    local_capture_config.instCfg[id].dataLanesMap[lane] = lane + 1;
    }
    for (q = 0; q < NUM_CAPT_CHANNELS; q++)
    {
    ch = (NUM_CAPT_CHANNELS-1)* id + q;
    local_capture_config.chVcNum[ch] = q;
    local_capture_config.chInstMap[ch] = id;
    }
    local_capture_config.instCfg[id].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_720_TO_800_MBPS
    }

    in the app_create_graph API?

    Regards,

    Brijesh

  • Thanks for your reply.

    I was changed your provide code. but it still  can't  received packet. What do I need to change code ?   

    Thanks for your support and Looking forward to your reply.

    change code:

    log:

    J7EVM@QNX:/ti_fs/vision_apps# vx_app_single_cam.out
    APP: Init QNX ... !!!
    Sciclient_qnxVirtToPhyFxn:Error from mem_offset
    Sciclient_qnxVirtToPhyFxn:Error from mem_offset
    appIpcInit: IPC: Init QNX ... !!!
    appIpcInit: IPC: Init ... Done !!!
    18.306300 s: REMOTE_SERVICE: Init ... !!!
    18.306404 s: REMOTE_SERVICE: Init ... Done !!!
    18.306431 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    18.306455 s: VX_ZONE_INIT:Enabled
    18.306468 s: VX_ZONE_ERROR:Enabled
    18.306481 s: VX_ZONE_WARNING:Enabled
    18.306692 s: VX_ZONE_INIT:[tivxInit:71] Initialization Done !!!
    18.306726 s: VX_ZONE_INIT:[tivxHostInit:48] Initialization Done for HOST !!!

    Single Camera Demo - (c) Texas Instruments 2019
    ========================================================

    Usage,
    vx_app_single_cam.out --cfg <config file>

    Defaulting to interactive mode
    tivxImagingLoadKernels done
    18.307534 s: ISS: Enumerating sensors ... !!!
    18.307915 s: ISS: Enumerating sensors ... found 0 : MAX96722_MAX96717_OX03C10
    18.307940 s: ISS: Enumerating sensors ... found 1 : MAX96722_MAX96717_X1F
    Select camera port index 0-7 : 0
    0x2 registered sensor drivers
    a : MAX96722_MAX96717_OX03C10
    b : MAX96722_MAX96717_X1F
    Select a sensor above or press '0' to autodetect the sensor : Invalid selection
    . Try again
    0x2 registered sensor drivers
    a : MAX96722_MAX96717_OX03C10
    b : MAX96722_MAX96717_X1F
    Select a sensor above or press '0' to autodetect the sensor : b
    Sensor selected : MAX96722_MAX96717_X1F
    LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 0
    app_init done
    ----!!!!!!!!!!!!--app_create_graph------
    Querying MAX96722_MAX96717_X1F
    20.432854 s: ISS: Querying sensor [MAX96722_MAX96717_X1F] ... !!!
    20.433125 s: ISS: Querying sensor [MAX96722_MAX96717_X1F] ... Done !!!
    YUV Input selected. VISS and AEWB nodes will be bypassed.
    Sensor DCC is enabled
    Sensor width = 1280
    Sensor height = 960
    Sensor DCC ID = 143
    Sensor Supported Features = 0x378
    Sensor Enabled Features = 0x100
    20.433202 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F], doing IM_SENSOR_CMD_PWRON ... !!!
    20.748055 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F], doing IM_SENSOR_CMD_CONFIG ... !!!
    20.828134 s: ISS: Initializing sensor [MAX96722_MAX96717_X1F] ... Done !!!
    Creating graph
    Initializing params for capture node
    Initializing params for capture node
    ----!!!!!!!!!!!!!!!!!taoning....... ----
    ----!!!!!!!!!!!!!!!!!laneBandSpeed ---0xd
    ----!!!!!!!!!!!!!!!!!laneBandSpeed ---0xd
    capture_config = 0x29c6c8a440
    Creating capture node
    20.828497 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:203] Attempting to set parameter[0] on com.ti.capture (enum:-2097102) to 29c6c8a440
    20.828525 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:236] Query returned type 00000816 for ref 29c6c8a440
    20.828549 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:302] Assigned Node[0] 29c6c44d40 type:00000816 ref=29c6c8a440
    20.828572 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:203] Attempting to set parameter[1] on com.ti.capture (enum:-2097102) to 29c6d0dbe8
    20.828597 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:236] Query returned type 00000813 for ref 29c6d0dbe8
    20.828620 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:302] Assigned Node[1] 29c6c44d40 type:00000813 ref=29c6d0dbe8
    obj->capture_node = 0x29c6c44d40
    ----vxReleaseUserDataObject----
    ----vxSetNodeTarget----
    20.828721 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:203] Attempting to set parameter[0] on com.ti.hwa.display (enum:-2097103) to 29c6c8a660
    20.828749 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:236] Query returned type 00000816 for ref 29c6c8a660
    20.828771 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:302] Assigned Node[0] 29c6c45398 type:00000816 ref=29c6c8a660
    20.828795 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:203] Attempting to set parameter[1] on com.ti.hwa.display (enum:-2097103) to 29c6cbc7f8
    20.828820 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:236] Query returned type 0000080f for ref 29c6cbc7f8
    20.828841 s: VX_ZONE_PARAMETER:[vxSetParameterByIndex:302] Assigned Node[1] 29c6c45398 type:0000080f ref=29c6cbc7f8
    Display Set Target done
    20.829069 s: VX_ZONE_INFO:[ownNodeKernelValidate:241] Validating kernel com.ti.capture
    20.829101 s: VX_ZONE_INFO:[ownNodeKernelValidate:241] Validating kernel com.ti.hwa.display
    20.964017 s: VX_ZONE_INFO:[ownNodeKernelInit:523] Calling create callback for node node_96
    20.970377 s: VX_ZONE_INFO:[ownNodeKernelInit:529] Create callback for node node_96 completed
    20.970448 s: VX_ZONE_INFO:[ownGraphNodeKernelInit:578] kernel init for node 0, kernel com.ti.capture ...
    20.970470 s: VX_ZONE_INFO:[ownGraphNodeKernelInit:589] kernel init for node 0, kernel com.ti.capture ... done !!!
    20.970496 s: VX_ZONE_INFO:[ownNodeKernelInit:523] Calling create callback for node node_97
    20.971315 s: VX_ZONE_INFO:[ownNodeKernelInit:529] Create callback for node node_97 completed
    20.971386 s: VX_ZONE_INFO:[ownGraphNodeKernelInit:578] kernel init for node 1, kernel com.ti.hwa.display ...
    20.971409 s: VX_ZONE_INFO:[ownGraphNodeKernelInit:589] kernel init for node 1, kernel com.ti.hwa.display ... done !!!
    Scaler is disabled
    app_create_graph exiting
    app_create_graph done


    ==========================
    Demo : Single Camera w/ 2A
    ==========================

    p: Print performance statistics

    s: Save Sensor RAW, VISS Output and H3A output images to File System

    e: Export performance statistics
    x: Exit

    Enter Choice: 20.998512 s: ISS: Starting sensor [MAX96722_MAX96717_X1F] ... !!!

    Unsupported command

    ==========================
    Demo : Single Camera w/ 2A
    ==========================

    p: Print performance statistics

    s: Save Sensor RAW, VISS Output and H3A output images to File System

    e: Export performance statistics
    x: Exit

    Enter Choice: 23.505851 s: ISS: Starting sensor [MAX96722_MAX96717_X1F] ... !!!
    ------Sensor selected : MAX96722_MAX96717_X1F
    ------selectedCam : 0x0
    23.505945 s: VX_ZONE_INFO:[tivxDataRefQueueEnqueueReadyRef:89] Q (queue=48, ref=14)
    23.505978 s: VX_ZONE_INFO:[tivxDataRefQueueEnqueueReadyRef:89] Q (queue=48, ref=16)
    23.505998 s: VX_ZONE_INFO:[tivxDataRefQueueEnqueueReadyRef:89] Q (queue=48, ref=18)
    23.506022 s: VX_ZONE_INFO:[ownGraphScheduleGraph:767] Scheduling Graph (graph=52, pipe=0)
    23.506043 s: VX_ZONE_INFO:[ownNodeKernelSchedule:630] Scheduling Node (node=23, pipe=0)
    23.506077 s: VX_ZONE_INFO:[tivxDataRefQueueEnqueueReadyRef:89] Q (queue=48, ref=20)
    23.506101 s: VX_ZONE_INFO:[ownGraphScheduleGraph:767] Scheduling Graph (graph=53, pipe=1)
    23.506122 s: VX_ZONE_INFO:[ownNodeKernelSchedule:630] Scheduling Node (node=26, pipe=1)
    23.506164 s: VX_ZONE_INFO:[tivxDataRefQueueDequeueDoneRef:162] DQ (queue=49) .. NO BUFFER

  • Hi,

    You said that some other sensor is working fine, is it with the same deserializer? Are you just changing the sensor? If one sensor is working and other not, then yes, deserializer to csi2 input is fine. 

    Are you sure then that configuration for the non-working sensor is correct? Can you check in deserializer status register it is receiving some data from the sensor? 

    Regards,

    Brijesh

  • Hi Brijesh Jadav,

    Thank you for your reply.

    You said that some other sensor is working fine, is it with the same deserializer?

    ====> Yes.  it is the same  deserializer ,same port , the same lane and Only change  cameraA  to cameraB module  for HW.

                         I was changed the deserializer/serializer init script and the soc high/width config for SW.

    Are you just changing the sensor? If one sensor is working and other not, then yes, deserializer to csi2 input is fine. 

    ====> Yes. One sensor is working and other not.

    Are you sure then that configuration for the non-working sensor is correct? Can you check in deserializer status register it is receiving some data from the sensor? 
    ====> This picture is We used mipii analyzer test sensor.   The camera firm said it was good, 

    And i was read  deserializer status register for log for this.:

    The serializer  register status is 0x70 ,is right

    The DE/HS/VS register status  is right.

    I found the mipi portA reigister have data packet. the reigster is variable. It shows that have data passing through Mipi channel.

    log:

    [MCU2_0] 36.378688 s: 96717 ---055f--- is 0x70
    [MCU2_0] 36.378903 s: 96722 DE is 0x1
    [MCU2_0] 36.379135 s: 96722 HS is 0x1
    [MCU2_0] 36.379351 s: 96722 VS is 0x1
    [MCU2_0] 36.379575 s: 96722 mipi portA 0x08D0 is 0x70
    [MCU2_0] 36.379797 s: 96722 mipi portB 0x08D2 is 0xee


    [MCU2_0] 36.381320 s: 96717 ---055f--- is 0x70
    [MCU2_0] 36.381541 s: 96722 DE 0x11F0 is 0x1
    [MCU2_0] 36.381760 s: 96722 HS 0x11F1 is 0x1
    [MCU2_0] 36.511428 s: 96722 VS 0x11F2 is 0x1
    [MCU2_0] 36.511645 s: 96722 mipi portA 0x08D0 is 0x80
    [MCU2_0] 36.511867 s: 96722mipi portB 0x08D2 is 0xff

    I was sjust  tested it on the development board. it can't received data packet.  

    I want to know has special requirements for received data?

    Looking forward to your reply.

    Thanks.

  • Hi,

    I want to know has special requirements for received data?

    Nothing specific requirement, we just need to make sure that the format, lane speed, number of lanes etc parameters are matching with the output from deserializer. If they are matching, it should be able to detect input stream and capture it. 

    Can you please check in the application that it is using correct virtual channel id and data type? Since you are using yuv422 output, it should be configured for YUV422 data type, not raw data type. 

    Regards,

    Brijesh

  • Thanks.

    It is sensor/deserializer script error ,so I was fixed and then run  working.

  • Do you mean it is working fine now and you are able to capture from sensor now?

    Could you please share the changes in the sensor layer in order to get it working? 

  • I was changed Virtual transmission channel for sensor deserializer script.  

  • ok, since this issue is resolved, closing this thread.