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: CSITX lib error

Part Number: TDA4VM


We try to use the CSITX port to transmit graph.  And occur follow errors: "undefined symbol: tivx_csitx_params_init" .

This is part of the code:

We have rebuild the tiovx, vx_app_rtos_muc2_0, vx_app_single_cam with option BUILD_CSITX=yes

rtos version is 08_06_00_12.

  • Hi,

    This API is available in the file tiovx\kernels_j7\hwa\host\vx_csitx_host.c, so can you please check if this file is included in your build? 

    Also are there any changes in the build system? This file should have been statically linked to your binary. 

    Regards,

    Brijesh

  • We also think so, but he did not compile it. We need to copy that lib file to the file system?

  • We touch the vx_csitx_host.c,and rebuid tivox target, the libvx_kernels_hwa.a has been update:

    Then rebuild the vx_app_single_cam target, ibvx_kernels_hwa.a has been referenced:

    Excute the vx_app_single_cam.out, the error still exist.

  • Hi yang yulong,

    Have you done any changes in the SDK build, other that adding a new sensor? Single camera application works fine on EVM. 

    Also i am assuming that below API is getting called to load HWA kernels. 

    tivxHwaLoadKernels(context);

    Regards,

    Brijesh

  • Add the CSITX test code in single camera app; transmit capture graph to csi tx port.

    It's look like single camera app has already calling the tivxHwaLoadKernels(context);

  • After update the libtivision_apps.so and libtivision_apps.so.8.0.6, above issues can be resolved;but this is new error log, which say the "Provided instance is already in use"

  • Hi,

    Which means you are opening CSITX driver for multiple times, can you please check and make sure to create CSITX driver/node only once and only for single channel?

    Regards,

    Brijesh

  • We send a 1920*1080 yuv image to CSITX port, there is the UB953 and UB960 register values.The data seems correct transmit to the UB953, but the UB960 can not recevie them correctly. Any problems there?Is the configuration correct?

  • Hello, 

    Can you please check if there is a lock between ub953 and ub960 and FPD channel is established between ub953 and ub960? 

    Regards,

    Brijesh

  •  Link the rx port0. This is the 960 register, 0x4d register value is 0x13; indicate FPD-Link III receiver is locked to incoming data. The 0x0c register value is 0x01, indicate Port 0 Receiver Enable.

  • Hi Yang,

    This is no longer issue related to CSITX, so i would recommend starting a new ticket for ub953 and ub960 issue.

    Regards,

    Brijesh

  • vx_status app_create_graph(AppObj *obj)
    {
        vx_status status = VX_SUCCESS;
        tivx_csitx_params_t local_csitx_config;
        vx_user_data_object csitx_config;
        uint32_t loopCnt;
        vx_image tx_frame_array_item = NULL;
        
        /* Create graph */
        obj->graph = vxCreateGraph(obj->context);
        if(status == VX_SUCCESS)
        {
            printf("Creating graph done\n");
            status = vxGetStatus((vx_reference) obj->graph);
        }
        obj->capt_yuv_image = vxCreateImage(
                                obj->context,
                                // sensorParams.sensorInfo.raw_params.width,
                                // sensorParams.sensorInfo.raw_params.height,
                                1920,
                                1080,
                                VX_DF_IMAGE_UYVY
                            );
    						
        obj->csitx_frames = vxCreateObjectArray(obj->context, (vx_reference)obj->capt_yuv_image, NUM_CHANNELS);
        status = vxGetStatus((vx_reference) obj->csitx_frames);
        for (loopCnt = 0U ; loopCnt < NUM_CHANNELS ; loopCnt++)
        {
            tx_frame_array_item = (vx_image)vxGetObjectArrayItem(obj->csitx_frames , loopCnt);
            if (tx_frame_array_item == NULL)
            {
                printf("%s[%d]vx_frame_array_item create failed\n", __FUNCTION__, __LINE__);
            }
            else
            {
                printf("vxGetObjectArrayItem success\n");
            }
            app_csitx_load_vximage_from_yuvfile(tx_frame_array_item, IMAGE_1920x1080_UYVY);
            status = vxReleaseImage(&tx_frame_array_item);
            if(status != VX_SUCCESS)
            {
                printf("%s[%d] tx_frame_array_item Release failed\n", __FUNCTION__, __LINE__);
            }
        }
            
        tivx_csitx_params_init(&local_csitx_config);
        local_csitx_config.numInst                          = 1U;
        local_csitx_config.numCh                            = NUM_CHANNELS;
        local_csitx_config.instId[0U]                       = CSITX_INST_ID;
        local_csitx_config.instCfg[0U].rxCompEnable         = (uint32_t)vx_true_e;
        local_csitx_config.instCfg[0U].rxv1p3MapEnable      = (uint32_t)vx_true_e;
        local_csitx_config.instCfg[0U].laneBandSpeed        = CSITX_LANE_BAND_SPEED;
        //local_csitx_config.instCfg[0U].laneSpeedMbps        = CSITX_LANE_SPEED_MBPS;
        local_csitx_config.instCfg[0U].numDataLanes         = 4U;
        for (loopCnt = 0U ;
            loopCnt < local_csitx_config.instCfg[0U].numDataLanes ;
            loopCnt++)
        {
            local_csitx_config.instCfg[0U].lanePolarityCtrl[loopCnt] = 0u;
        }
        for (loopCnt = 0U; loopCnt < NUM_CHANNELS; loopCnt++)
        {
            local_csitx_config.chVcNum[loopCnt]   = loopCnt;
            local_csitx_config.chInstMap[loopCnt] = CSITX_INST_ID;
        }
        csitx_config = vxCreateUserDataObject(obj->context, "tivx_csitx_params_t", sizeof(tivx_csitx_params_t), &local_csitx_config);
        obj->csitx_node = tivxCsitxNode(obj->graph, csitx_config, obj->csitx_frames);
        vxSetNodeTarget(obj->csitx_node, VX_TARGET_STRING, TIVX_TARGET_CSITX);
        
        vxReleaseUserDataObject(&csitx_config);
        add_graph_parameter_by_node_index(obj->graph, obj->csitx_node, 1);
        printf("vxSetGraphScheduleConfig done\n");
        if(status == VX_SUCCESS)
        {
            status = vxVerifyGraph(obj->graph);
        }
        printf("app_create_graph exiting\n");
        return status;
    }
    
    vx_status app_run_graph(AppObj *obj)
    {
        vx_status status = VX_SUCCESS;
        vx_uint32 i;
        vx_uint32 frm_loop_cnt;
    
        frm_loop_cnt  = 0xFFFFFFFF;
    
        for(i=0; i<frm_loop_cnt; i++)
        {
            status = vxProcessGraph(obj->graph);
            printf("ProcessGraph:%d\n", status);
            appPerfPointEnd(&obj->total_perf);
            if((obj->stop_task) || (status != VX_SUCCESS))
            {
                break;
            }
        }
    
        printf("exit run:%d\n", status);
        if(status == VX_SUCCESS)
        {
            //status = vxWaitGraph(obj->graph);
        }
        printf("vxWaitGraph:%d\n", status);
    
        return status;
    }

    Usage,
      ./vx_app_single_csitx.out --cfg <config file>
    
    Defaulting to interactive mode 
    IttCtrl_registerHandler: command echo registered at location 0 
    IttCtrl_registerHandler: command iss_read_2a_params registered at location 1 
    IttCtrl_registerHandler: command iss_write_2a_params registered at location 2 
    IttCtrl_registerHandler: command iss_raw_save registered at location 3 
    IttCtrl_registerHandler: command iss_yuv_save registered at location 4 
    IttCtrl_registerHandler: command iss_read_sensor_reg registered at location 5 
    IttCtrl_registerHandler: command iss_write_sensor_reg registered at location 6 
    IttCtrl_registerHandler: command dev_ctrl registered at location 7 
    IttCtrl_registerHandler: command iss_send_dcc_file registered at location 8 
     NETWORK: Opened at IP Addr = 1.4.16.64, socket port=5000!!!
       100.155659 s: ISS: Enumerating sensors ... !!!
    [MCU2_0]    100.156022 s: add by yst,ub960I2cInstId =3, ub960I2cAddr=0x30
    [MCU2_0]    100.156148 s: ub960_cfgScript,I2cNumber = 3, i2caddr = 0x30, csi = 0
    [MCU2_0]    100.355790 s: ub960_cfgScript,I2cNumber = 3, i2caddr = 0x38, csi = 1
       100.555903 s: ISS: Enumerating sensors ... found 0 : GW_AR0233_UYVY
    Creating graph done
    vxGetObjectArrayItem success
    opened the file [./test_data/cap_0000.yuv]
    img_width = 1920        img_height = 1080       img_format = UYVY
    dim_x = 1920    dim_y = 1080    stride_x = 2    stride_y = 3840
    vxGetObjectArrayItem success
    opened the file [./test_data/cap_0000.yuv]
    img_width = 1920        img_height = 1080       img_format = UYVY
    dim_x = 1920    dim_y = 1080    stride_x = 2    stride_y = 3840
    vxGetObjectArrayItem success
    opened the file [./test_data/cap_0000.yuv]
    img_width = 1920        img_height = 1080       img_format = UYVY
    dim_x = 1920    dim_y = 1080    stride_x = 2    stride_y = 3840
    vxGetObjectArrayItem success
    opened the file [./test_data/cap_0000.yuv]
    img_width = 1920        img_height = 1080       img_format = UYVY
    dim_x = 1920    dim_y = 1080    stride_x = 2    stride_y = 3840
    vxSetGraphScheduleConfig done
    app_create_graph exiting
    
    
     ==========================
     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
    
     u: Update DCC from File System
    
    
     x: Exit
    
     Enter Choice: ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    xProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    ProcessGraph:0
    
    
    ProcessGraph:0
    exit run:0
    vxWaitGraph:0
       102.155261 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:107] De-Initialization Done for HOST !!!
    [MCU2_0]    102.149795 s: ==========================================================
    [MCU2_0]    102.149891 s:  Csitx Status: Instance|0
    [MCU2_0]    102.149926 s: ==========================================================
    [MCU2_0]    102.149975 s:  FIFO Overflow Count: 0
    [MCU2_0]    102.150004 s:   Channel Num | Frame Queue Count | Frame De-queue Count | Frame Repeat Count |
    [MCU2_0]    102.150068 s:               0|              38|             38|             0|
    [MCU2_0]    102.150114 s:               1|              38|             38|             0|
    [MCU2_0]    102.150159 s:               2|              38|             38|             0|
    [MCU2_0]    102.150204 s:               3|              38|             38|             0|
       102.159649 s:  VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 5 alloc's of 16588896 bytes 
    DDR_SHARED_MEM: Free's : 5 free's  of 16588896 bytes 
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    DDR_SHARED_MEM: Total size: 536870912 bytes 
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    

    This is the main code and the excute logs. Look like CSI TX port running, but the dser ub960 cannot receive complete data, The CSI_RX_STS register say the LENGTH_ERR and CKSUM_ERR . Does any problem with the operation code?

  • This is load image from files:

    This is recevie image from csitx:

    Look like only start data is available per lines.

  • Hi,

    Can you please check and make sure that the image is correctly loaded into image buffer in API app_csitx_load_vximage_from_yuvfile?

    Is NUM_CHANNELS macro set to 0x1?

    Can you check if ub953 is reporting any input error from CSITX? Like CRC or ECC errors? 

    How many output datalanes are you using? Is the lane speed setup correctly for the output? and is the same lane speed setup in the ub953? Please make sure that the configuration of CSITX is matching with ub953 configuration?

    Regards,

    Brijesh  

  • When the csi tx lane speed is reduced to below 410Mbps at 4 lanes, normal transmission can be achieved. but the ub953 up to 4 Data Lanes at 832 Mbps Per Each Lane. What factors will affect it? TDA4 config or ub953 congfig?

  • Hi,

    This is what i asked, can you please check what is the default lane speed for ub953 that it expects? and you need to set the same from CSITX 

    If there is a lane speed mismatch, it may not work.

    Regards,

    Brijesh