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: enable two camera(AR0820) with vision conformance test app

Part Number: TDA4VM
Other Parts Discussed in Thread: DS90UB953A-Q1, DS90UB913A-Q1, DS90UB933-Q1

Hi TI guys,

I am trying to enable two camera(AR0820) with vision conformance test app.

I can run one camera(AR0820) well with my vision conformance test app.

But when I want to enable two camera(AR0820), I only got black screen.

Do you know how to config the CSI_VC_MAP Register (Address 0x72)?

Thanks,

Jerry Ho

  • Hi Jerry,

    What's the question for CSI_VC_MAP? This is documented well in the ub962 register. 

    In your case, can you put breakpoint in the sensor driver and make sure both the ar0820 sensor are getting configured correctly? 

    If one channel is working, you would require to make sure that second channel is getting configured correctly. 

    Regards,

    Brijesh

  • Hi Brijesh,

    1. In your case, can you put breakpoint in the sensor driver and make sure both the ar0820 sensor are getting configured correctly?

    =>

            /* RX0 Port */
            {0x4C, 0x01, 0x1},    
            {0x32, 0x01, 0x1},      /** Enable TX port 0 */
            {0x33, 0x02, 0x1},
            {0x20, 0x20, 0x1},
            {0xBC, 0x00, 0x1},
            {0x5C, 0xE8, 0x1},
            {0x5D, 0x30, 0x1},      /** Serializer I2C Address */  
            {0x65, 0xE8, 0x1},
            {0x5E, 0x20, 0x1},      /** Sensor I2C Address */      
            {0x66, 0x30, 0x1},
            {0x6d, 0x78, 0x1},      /* PORT_CONFIG set to 00: CSI-2 Mode (DS90UB953A-Q1) **** */
            {0xD5, 0xF3, 0x1},      /* Set AEQ MIN/MAX widest values*/   //????
            /*The FV is equivalent to a Vertical Sync (VSYNC) while the LineValid is equivalent to a Horizontal Sync (HSYNC) input to the DS90UB913A-Q1 / DS90UB933-Q1 device */
            {0x7c, 0x20, 0x1},      /* Normal Raw10 */
            {0x72, 0x00, 0x1},      /* VC MAP to 0 */
            {0x0E, 0x7F, 0x1},
            {0x6E, 0x10, 0x1},
            {0x6F, 0x32, 0x1},
            {0xB0, 0x1C, 0x1},
            {0xB1, 0x15, 0x1},
            {0xB2, 0x0A, 0x1},
            {0xB2, 0x00, 0x1},

            /* RX1 Port */
            {0x4C, 0x12, 0x1},
            {0x32, 0x01, 0x1},      /** Enable TX port 0 */
            {0x33, 0x02, 0x1},      /** Enable Continuous clock mode and CSI output */
            {0x20, 0x20, 0x1},
            {0xBC, 0x00, 0x1},
            {0x5D, 0x30, 0x1},      /** Serializer I2C Address */                                                                                                                          
            {0x65, 0xEA, 0x1},
            {0x5E, 0x20, 0x1},      /** Sensor I2C Address */                                                                                                                              
            {0x66, 0x34, 0x1},
            {0x6d, 0x78, 0x1},      /* PORT_CONFIG set to 00: CSI-2 Mode (DS90UB953A-Q1) **** */                                                                                           
            {0xD5, 0xF3, 0x1},      /* Set AEQ MIN/MAX widest values*/   //????
            {0x7c, 0x20, 0x1},      /* Raw10 low 8-bit, discard frame on Parity error */
            /* Two AR0820 camera setting.........*/
            {0x72, 0x55, 0x1},      /* VC MAP to 1 */
            //{0x72, 0x00, 0x1},    /* VC MAP to 0 */
            //{0x0E, 0x7F, 0x1},      //Jerry test
            //{0x6E, 0x10, 0x1},
            //{0x6F, 0x32, 0x1},
            {0xB0, 0x1C, 0x1},
            {0xB1, 0x15, 0x1},
            {0xB2, 0x0A, 0x1},
            {0xB2, 0x00, 0x1},

    Do you mean check all above register is configured ?

    2. Actually now I am blocked  in vxGraphParameterDequeueDoneRef()....?

    last time , you ask me check  CSI_RX_IF_VBUS2APB_ERROR_IRQS 0x04504028 and 0x04514028.

    Do you have any update?

    Thanks,

    Jerry Ho

  • Hi Brijesh,

    If one channel is working, you would require to make sure that second channel is getting configured correctly. 

    =>

    Could I enable only RX1 camera AR0820 without RX0 camera?

    Could you guide how to configure capture node parameter for only RX1 camera?

    Thanks,

    Jerry Ho

  • Hi Jerry,

    i meant to put breakpoint on AR0820_Config, AR0820_StreamOn APIs and see if they are getting call two times, once for each channel/camera. 

    Yes, it is possible to just capture from camera1, we just need to change VC id in the single camera example. I guess you are using single camera example, correct?

    Regards,

    Brijesh

  • Hi Brijesh,

    1.

    I am using vx_conformance_test App.

    Could you point which file contains the AR0820_StreamOn?

    2.  If using single camera example,

    changing vcid like this for only RX1 camera?

        /* Config initialization */
        tivx_capture_params_init(&local_capture_config);
        local_capture_config.numInst                                    = 1U;
        local_capture_config.numCh                                      = 1U;

        local_capture_config.instId[CAPT_INST_ID]                       = 1U;

        local_capture_config.instCfg[CAPT_INST_ID].enableCsiv2p0Support = (uint32_t)vx_true_e;
        local_capture_config.instCfg[CAPT_INST_ID].numDataLanes         =
                                                    sensorParams.sensorInfo.numDataLanes;

        local_capture_config.timeout = 33;
        local_capture_config.timeoutInitial = 500;


        APP_PRINTF("local_capture_config.numDataLanes = %d \n", local_capture_config.instCfg[CAPT_INST_ID].numDataLanes);

        for (loopCnt = 0U ;
             loopCnt < local_capture_config.instCfg[CAPT_INST_ID].numDataLanes ;
             loopCnt++)
        {  
            local_capture_config.instCfg[CAPT_INST_ID].dataLanesMap[loopCnt] = sensorParams.sensorInfo.dataLanesMap[loopCnt];
            APP_PRINTF("local_capture_config.dataLanesMap[%d] = %d \n",
                        loopCnt,
                        local_capture_config.instCfg[CAPT_INST_ID].dataLanesMap[loopCnt]);
        }  

        chIdx=0U;
        for (loopCnt = 0U; loopCnt < 1; loopCnt++ )
        {  
            local_capture_config.chVcNum[chIdx] = loopCnt;
            local_capture_config.chInstMap[chIdx] = 1U;
            chIdx++;
        }

        local_capture_config.chVcNum[0] = 1;

    Thanks,

    Jerry Ho

  • Hi Jerry,

    Which example are you using in conformation test? 

    This is because test_capture_display uses vision_apps/utils/sensor layer for configuring sensor whereas test_capture.c uses sensor layer from the imaging folder. 

    Yes, if single camera with VC0 is working fine, then in order to change camera, you just require to change chVcNum to 1. 

    Can you please try with this change and see if it works. This will confirm if the camera/SERDES is getting configured correctly. 

    Regards,

    Brijesh

  • Hi Brijesh,

    I am using the conformation test for AR0820 from my colleague and it's OK for the only single

    RX0 camera AR0820.

    1.

    I use UB962 De-serialer.

    I would like to try the following config with conformation test for AR0820 ,

    #define NUM_UB962_AR0820_CAPT_CHANNELS      (1u)
    #define NUM_UB962_AR0820_CAPT_INST          (1U)

            tivx_capture_params_init(&capture_params);
            capture_params.numInst = NUM_UB962_AR0820_CAPT_INST;
            capture_params.numCh   =
                                    (NUM_UB962_AR0820_CAPT_CHANNELS * NUM_UB962_AR0820_CAPT_INST);
            chIdx = 0U;
            //Jerry test
            for (instIdx = 0U ; instIdx < NUM_UB962_AR0820_CAPT_INST ; instIdx++)
            {
                //capture_params.instId[instIdx] = instIdx;
                capture_params.instId[instIdx] = 1U;
                capture_params.instCfg[instIdx].enableCsiv2p0Support = (uint32_t)vx_true_e;
                capture_params.instCfg[instIdx].numDataLanes         = 4U;
                for (loop_id = 0U; loop_id < capture_params.instCfg[0U].numDataLanes ; loop_id++)
                {   
                    capture_params.instCfg[instIdx].dataLanesMap[loop_id] = (loop_id + 1u);
                }
                for (loop_id = 0U; loop_id < NUM_CAPT_CHANNELS; loop_id++)
                {
                    capture_params.chVcNum[chIdx]   = loop_id;
                    //capture_params.chInstMap[chIdx] = instIdx+1;
                    capture_params.chInstMap[chIdx] = 1U;
                    chIdx++;
                }
            }

                    capture_params.chVcNum[0]   = 1;

            /* RX1 Port */
            {0x4C, 0x12, 0x1},
            {0x32, 0x01, 0x1},      /** Enable TX port 0 */
            {0x33, 0x02, 0x1},      /** Enable Continuous clock mode and CSI output */
            {0x20, 0x20, 0x1},
            {0xBC, 0x00, 0x1},
            {0x5D, 0x30, 0x1},      /** Serializer I2C Address */
            {0x65, 0xEA, 0x1},
            {0x5E, 0x20, 0x1},      /** Sensor I2C Address */
            {0x66, 0x34, 0x1},
            {0x6d, 0x78, 0x1},      /* PORT_CONFIG set to 00: CSI-2 Mode (DS90UB953A-Q1) **** */
            {0xD5, 0xF3, 0x1},      /* Set AEQ MIN/MAX widest values*/   //????
            {0x7c, 0x20, 0x1},      /* Raw10 low 8-bit, discard frame on Parity error */
            /* Two AR0820 camera setting.........*/
            {0x72, 0x55, 0x1},      /* VC MAP to 1 */
            //{0x72, 0x00, 0x1},    /* VC MAP to 0 */
            //{0x0E, 0x7F, 0x1},      //Jerry test
            //{0x6E, 0x10, 0x1},
            //{0x6F, 0x32, 0x1},
            {0xB0, 0x1C, 0x1},
            {0xB1, 0x15, 0x1},
            {0xB2, 0x0A, 0x1},
            {0xB2, 0x00, 0x1},

    I still block on vxGraphParameterDequeueDoneRef....

    Does it seem that the TDA doesn't receive the camera frame?

    Do you have any idea to check my sensor and de-serial for my RX1 camera ?

    2.  I will try single camera app and multi-camera app after the conformance app is OK.

    Thanks,

    Jerry Ho

  • Hi Jerry,

    Where do you configure sensor and SERDES? Could you please check with your colleague?

    Yes, if the same code, which was working fine for virtual channel id 0, is not working for virtual channel id 1, then TDA is not receiving data. 

    Can you check if ub962 is receiving any valid frames from this camera? Typically ub960/962 reports received frame size in register. can you read these register to know if it is getting some data?

    Regards,

    Brijesh

  • Hi Brijesh,

    1.We write the UB962_Normal_with_AR0820_cfg in DS90UB962_cfg.h.7360.DS90UB962_cfg.h

    If only one camera RX1 is connected to UB962, do you think above capture node capture_params is ready for virtual channel 1 of RX1 AR0820?

    2. Can you check if ub962 is receiving any valid frames from this camera? Typically ub960/962 reports received frame size in register. can you read these register to know if it is getting some data?

    =>Could you guide how to get the register from UB962 in detail to see if the camera frame is received?

    Thanks,

    Jerry Ho

  • Hi Jerry,

    Yes, above changes are ready/correct.

    Please refer to ub962 data sheet for the register information.

    Regards,

    Brijesh

  • Hi Brijesh,

    After re-checking my sensor driver, there is an error with  FWD_CTL1 Register (Address 0x20)...

    It is disabled with RX1(0x20), and after changing to 0x00 ,my  RX1 camera is OK...

    Thanks for your support again.....

    Jerry Ho