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: TDA4 CSIRX receiving camera data problem

Part Number: TDA4VM

Hi,

I use psdk_rtos_auto_j7_07_00_00_11 to develop TDA4 software.

We are currently developing the camera driver, using the app_single_cam example to collect and display camera data.

The camera module we use is AR0233+MAX9295A. There is a MAX9296 chip on our board, which is connected to the CSIRX0 of the TDA processor through the MIPI interface. The schematic diagram is as follows.

We used a set of configurations to configure AR0233/MAX9295/MAX9296, which can output images through the MIPI interface on another processor.
But when we use the same configuration to run on the TDA4 processor, the Capture node cannot get the image. We see that in the tivxCaptureProcess function of the capture node, it has been waiting in a loop at line 908
while(is_all_ch_frame_available == 0U)

Observed by an oscilloscope, we can see the data on the MIPI interface. The waveform is as follows. We can also test that the clk clock of MIPI is 750MHz, but our capture module cannot get any data.

We tried the following:

1. In the void tivx_capture_params_init(tivx_capture_params_t *prms) function, modify prms->instCfg[loopCnt].laneBandSpeed, ranging from TIVX_CAPTURE_LANE_BAND_SPEED_80_TO_100_MBPS to TIVX_CAPTURE_2000_LANEMBPS to PEED_1750_AND_LANE_MBPS

2. Always adjust the CSI output of MAX9296 to 100MHz, and repeat the first step.

3. Adjust the order of the 4 datalanes

4. Adjust the configuration of local_capture_config.chVcNum[i]

None of the above attempts have any effect.

Since we can light up the camera on other processors, and currently the only CSI parameters that we can configure in the software are chVcNum, laneBandSpeed, and dataLanesMap. Do you have any good suggestions? How should I find and solve the problem?

The following figure shows the configuration of MAX9296 CSI output


  • One important thing to consider is the timing of CSI2 start from sensor and deseriaizer. The application (vx_app_single_cam) sends control messages like CONFIG, STREAMON etc to the sensor driver.


    CONFIG must only configure the sensor and NOT start streaming. Streaming must be started after the sensor driver gets STREAMON command, This allows the capture node to initialize CSI Rx port and make it ready to receive oncoming packets. Please refer to AR0233_StreamOn function in TI's driver. Please pay special attention to last line of code where UB960 is configured to enable CSI2 output. You will need to add a similar API to MAX deserializer driver.

    Regards,

    Mayank

  • Hi,mayank

    According to your suggestion, the APP's config will only configure the camera, serializer, and deserializer. When the stream on, the camera output and deserializer mipi output will be enabled, but the capture node still has no frame rate input.

  • Hi Mayank,

    Could you please kindly check about this case?

  • I am not sure if I am understanding your diagram correctly. Are you connecting a single deserializer to DPHY_RX0 and DPHY_RX1? Can you please explain that in more detail?

  • Hi Mayank,

    Thanks for your reply!

    The following picture is a schematic diagram of the link, hoping to illustrate my data link. We use one camera module, which is connected to the CSI0_RX port of TDA4 and uses 4 sets of datalane.

    Because I tested that the clock on the CSI0_RX port is not always 750Mhz, I set the lanespeed parameter as follows.

    void tivx_capture_params_init(tivx_capture_params_t *prms)
    {
    uint32_t cnt, loopCnt;

    if (NULL != prms)
    {
    prms->numInst = 1u;
    prms->numCh = 0u;
    prms->timeout = TIVX_EVENT_TIMEOUT_WAIT_FOREVER;
    prms->timeoutInitial = TIVX_EVENT_TIMEOUT_WAIT_FOREVER;

    for (loopCnt = 0U ; loopCnt < TIVX_CAPTURE_MAX_INST ; loopCnt++)
    {
    prms->instId[loopCnt] = loopCnt;
    prms->instCfg[loopCnt].enableCsiv2p0Support = (uint32_t)vx_true_e;
    prms->instCfg[loopCnt].numDataLanes = 4u;
    prms->instCfg[loopCnt].dataLanesMap[0u] = 1u;
    prms->instCfg[loopCnt].dataLanesMap[1u] = 2u;
    prms->instCfg[loopCnt].dataLanesMap[2u] = 3u;
    prms->instCfg[loopCnt].dataLanesMap[3u] = 4u;
    prms->instCfg[loopCnt].laneBandSpeed = TIVX_CAPTURE_LANE_BAND_SPEED_1350_TO_1500_MBPS;
    }
    for (cnt = 0u; cnt < TIVX_CAPTURE_MAX_CH; cnt ++)
    {
    prms->chVcNum[cnt] = cnt;
    prms->chInstMap[cnt] = 0U;
    }
    }
    }

    In addition, I tried all 24 settings of dataLanesMap[0]~dataLanesMap[3], but still no effect, the results of the software running are the same.

    prms->instCfg[0].dataLanesMap[0u] = 1u;
    prms->instCfg[0].dataLanesMap[1u] = 2u;
    prms->instCfg[0].dataLanesMap[2u] = 3u;
    prms->instCfg[0].dataLanesMap[3u] = 4u;
  • hi,all

      Since the capture node has no frame rate, we started to debug the underlying driver pdk. In the function CsirxDrv_udmaCQEventCb, we found that it was stuck in the frame loss condition. The data address obtained in the FVID driver is consistent with the data address when the frame is lost. Please help analyze Cause of the problem.

      The following is the judgment when the function CsirxDrv_udmaCQEventCb loses frame. file location in psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/drv/csirx/src/csirx_drvUdma.c

    The following is the frame drop buffer created by the function tivxCaptureSetCreateParams.file location in psdk_rtos_auto_j7_07_00_00_11/tiovx/kernels_j7/hwa/capture/vx_capture_target.c
  • hi,all

      Since the capture node has no frame rate, we started to debug the underlying driver pdk. In the function CsirxDrv_udmaCQEventCb, we found that it was stuck in the frame loss condition. The data address obtained in the FVID driver is consistent with the data address when the frame is lost. Please help analyze Cause of the problem.

      The following is the judgment when the function CsirxDrv_udmaCQEventCb loses frame. file location in psdk_rtos_auto_j7_07_00_00_11/pdk_jacinto_07_00_00/packages/ti/drv/csirx/src/csirx_drvUdma.c

    The following is the frame drop buffer created by the function tivxCaptureSetCreateParams.file location in psdk_rtos_auto_j7_07_00_00_11/tiovx/kernels_j7/hwa/capture/vx_capture_target.c
  • Hi,

    Can you please confirm 'CsirxDrv_udmaCQEventCb()' is hit multiple times and each time it is going into frame drop/loss condition? If this is the case then you are receiving some frames from the sensor.

    Thanks & Regards,
    Vivek Dhande.

    Texas Instruments (India) Pvt Ltd