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:Camera image cannot be accessed

Other Parts Discussed in Thread: TDA4VM

SDK Version:07.03

Camera Spec:Mipi 4lane,1080p30,UYVY

We cannot access the camera image via TDA4VM.
The MIPI signal looks normal, through the oscilloscope.
How to confirm whether the camera subsystem of TDA4 receives data?
How to debug the camera subsystem?

  • 1. Which registers can determine the phy status?

    2. Refer to e2e.ti.com/.../tda4vm-tda4-csirx-capture-image dumped the following registers:

    0x0000000004504028: 0x00000000    ==> Normal?
    0x0000000004504040: 0x0001F01F    ==> Normal?
    0x0000000004504060: 0x10000000    ==> No Data?
    0x0000000004504074: 0x00000000    ==> No Err?
    0x0000000004504080: 0x00000000
    0x0000000004504104: 0x00000100    ==> Normal?
    0x0000000004504900: 0x00000000
    0x0000000004504000: 0x8421164C
    0x0000000004504008: 0x43210410

    Please help to confirm whether the above status is correct?

  • update register status:

    0x0000000004504000: 0x8421164C
    0x0000000004504004: 0x00000000
    0x0000000004504008: 0x43210410
    0x0000000004504010: 0x00000000
    0x0000000004504018: 0x00000000
    0x000000000450401C: 0x00000000
    0x0000000004504020: 0x00000000
    0x0000000004504024: 0x00000000
    0x0000000004504028: 0x00000000
    0x000000000450402C: 0x000F03B1
    0x0000000004504040: 0x0001F01F
    0x0000000004504048: 0x00333306
    0x000000000450404C: 0x00000000
    0x0000000004504050: 0x00000000
    0x0000000004504060: 0x10000000
    0x0000000004504074: 0x00000000
    0x0000000004504080: 0x00000000
    0x0000000004504100: 0x00000001
    0x0000000004504104: 0x80000111
    0x0000000004504108: 0x00000000
    0x000000000450410C: 0x00000100
    0x0000000004504110: 0x00000000
    0x0000000004504114: 0x00000000
    0x0000000004504118: 0x00000000
    0x000000000450411C: 0x00000000
    0x0000000004504120: 0x00000000
    0x0000000004504124: 0x00000000
    0x0000000004504128: 0x00000000
    0x0000000004504200: 0x00000000
    0x0000000004504204: 0x00000100
    0x0000000004504208: 0x00000000
    0x000000000450420C: 0x00000000
    0x0000000004504210: 0x00000000
    0x0000000004504214: 0x00000000
    0x0000000004504218: 0x00000000
    0x000000000450421C: 0x00000000
    0x0000000004504220: 0x00000000
    0x0000000004504224: 0x00000000
    0x0000000004504228: 0x00000000
    0x0000000004504300: 0x00000000
    0x0000000004504304: 0x00000100
    0x0000000004504308: 0x00000000
    0x000000000450430C: 0x00000000
    0x0000000004504310: 0x00000000
    0x0000000004504314: 0x00000000
    0x0000000004504318: 0x00000000
    0x000000000450431C: 0x00000000
    0x0000000004504320: 0x00000000
    0x0000000004504324: 0x00000000
    0x0000000004504328: 0x00000000
    0x0000000004504400: 0x00000000
    0x0000000004504404: 0x00000100
    0x0000000004504408: 0x00000000
    0x000000000450440C: 0x00000000
    0x0000000004504410: 0x00000000
    0x0000000004504414: 0x00000000
    0x0000000004504418: 0x00000000
    0x000000000450441C: 0x00000000
    0x0000000004504420: 0x00000000
    0x0000000004504424: 0x00000000
    0x0000000004504428: 0x00000000
    0x0000000004504900: 0x00000000
    0x0000000004504904: 0x00000000
    0x0000000004504908: 0x0000007F
    0x000000000450490C: 0x00000000
    0x0000000004504910: 0x0000007F
    0x0000000004504920: 0x00000000
    0x0000000004504924: 0x00000000
    0x0000000004504928: 0x00000000
    0x0000000004504930: 0x00000000
    0x0000000004504934: 0x00000001
    0x0000000004504938: 0x00000000
    0x0000000004504940: 0x00003FFF
    0x0000000004504FFC: 0x50220200

    Judging by register 0x4504104=0x80000111, CSIRX has received data?

  • Hi,

    Can you check value at the offset 0x0000000004504048 multiple times and see if it is changing? 

    Also please check below.

    1, Number of data lanes

    2, Each lane polarity

    3, Lane speed

    All above should exactly match with the transmitter configuration. If it is not, then CSIRX may not be able to detect incoming stream.

    Regards,

    Brijesh

  • 1. Read multiple times at the register 0x0000000004504048 , the value does not change.

    2. After investigation, we found that the register 0x0000000004504048's bit5-bit0 is abnormal. (0x04504048 = 0x00000000)

    DATTYP_CFG cannot be written. What are the possible reasons?

  • Hi,

    It seems your input clock is not correct. It should be stable and value in its [4:0] should be 6 in register 0x4504048. This is what i see in my setup.  Can you enable continuous clock output from your sensor/deserializer? 

    DATTYP_CFG field can be set to Data type value, i can write it my setup. 

    Also please make sure to start transmission from sensor/deserializer only after VerifyGraph is called. In the imaging component, this is taken care in StreamOn callback. Can you please check if this is taken care in your sensor/deserializer driver?

    Regards,

    Brijesh

  • 1. The deserializer is configured as continuous clock mode.

    2. Sorry. 

    Correct register information.

    0x04504048 is 0x00333306; 

    0x04504020 is 0x0C000000, is bit5-bit0 of 0x04504020 

    DATTYP_CFG should be 0x1E,but it's 0x00.

  • 1. The deserializer is configured as continuous clock mode.

    2. Sorry. 

    Correct register information.

    0x04504048 is 0x00333306; 

    0x04504020 is 0x0C000000, DATTYP_CFG  is bit5-bit0 of 0x04504020.

    DATTYP_CFG should be 0x1E,but it's 0x00. It seems abnormal.

    3. The resolution of our camera is 1280x760. Does the camera module support this resolution?

  • Hi,

    Yes, if the data type which is configured is not matching, it will not capture frames. 

    Please correct this field. 

    Which application are you using to capture from CSIRX? 

    About resolution, it can be supported in CSIRX, not sure about camera module.

    Also please take care of starting streaming only after verifygraph is called. 

    Regards,

    Brijehs

  • 1. Demo is app_single_cam, path: PSDKRA/vision_apps/apps/basic_demos/app_single_cam.

    2. I added Log confirmation to the function tivxCaptureSetCreateParams, there is no problem.

    The code is as follows:

    tivxCaptureSetCreateParams

    ...

     createParams->chCfg[loopCnt].outFmt.dataFormat =
     tivxCaptureExtractDataFormat(format);
     createParams->chCfg[loopCnt].outFmt.ccsFormat =
     tivxCaptureExtractCcsFormat(format);

    + VX_PRINT(VX_ZONE_ERROR,
    + " CAPTURE: [taolei] loopCnt %d inCsiDataType 0x%0x %d x %d dataFormat 0x%0x ccsFormat 0x%0x\n",
     loopCnt, createParams->chCfg[loopCnt].inCsiDataType, createParams->chCfg[loopCnt].outFmt.width, createParams->chCfg[loopCnt].outFmt.height,
     createParams->chCfg[loopCnt].outFmt.dataFormat, createParams->chCfg[loopCnt].outFmt.ccsFormat);

    }

    ...

    Log is as follows:

    VX_ZONE_ERROR:[tivxCaptureSetCreateParams:692]  CAPTURE: [taolei] loopCnt 0 inCsiDataType 0x1e 1280 x 960 dataFormat 0x0 ccsFormat 0x11.

    At present, the problem appears in the deeper code, How to trace or debug DATTYP_CFG ?

  • Hi,

    I want to see the following log,but I don't know where it is printed:
    GT_0trace(CsirxTrace, GT_ERR, "Invalid SHIM Capture config arguments\r\n");

    Can function GT_0trace be printed out by executing vision_apps_init.sh?

  • Update status:

    1. GT_0trace can print.

    2. CSL_csirxConfigDMA is called,but the function cannot be printed as shown below:

    ./csl/src/ip/csirx/V0/priv/csirx_ss.c:205:int32_t CSL_csirxConfigDMA

    Excuse me, how to print Log in CSL_csirxConfigDMA function?

  • Hi Brijehs,

    What is the csi port used by app_single_cam?

  • Hi lei,

    single camera example uses Port0. Is it where you have connected your camera/deserializer? 

    Regards,

    Brijesh

  • Yes.The details are as follows:

  • So is datatype still not being set correct? Is it still 0x0? 

    Can you please share your sensor parameters that you are passing to the capture node?

    Regards,

    Brijesh

  • 1. So is datatype still not being set correct? Is it still 0x0? 

    ==>  yes,We find that datatype  is set to CSI1. 

    The code is as follows:

    vim csirx_drv.c +1203

    GT_3trace(CsirxTrace,
    GT_ERR,
    "[taolei]CsirxDrv_chConfigShim CSL_csirxConfigDMA dataType 0x%0x chNum 0x%0x chMAX 0x%0x\r\n",
    chObj->dmaCfgParams.dataType, chObj->dmaCfgParams.chNum, CSL_CSIRX_PSI_L_THREAD_NUM_MAX);
    GT_2trace(CsirxTrace,
    GT_ERR,
    "[taolei]CsirxDrv_chConfigShim Before DMACNTX : %p = 0x%0x\r\n",
    ((volatile uint32_t *) (&((CSL_csi_rx_ifRegs *)chObj->instObj->shimBaseAddr)->CNTX_CNTL[chObj->dmaCfgParams.chNum].DMACNTX)),
    *((volatile uint32_t *) (&((CSL_csi_rx_ifRegs *)chObj->instObj->shimBaseAddr)->CNTX_CNTL[chObj->dmaCfgParams.chNum].DMACNTX)));
    status+= CSL_csirxConfigDMA(
    (CSL_csi_rx_ifRegs *)chObj->instObj->shimBaseAddr,
    &chObj->dmaCfgParams);
    GT_2trace(CsirxTrace,
    GT_ERR,
    "[taolei]CsirxDrv_chConfigShim After DMACNTX : %p = 0x%0x\r\n",
    ((volatile uint32_t *) (&((CSL_csi_rx_ifRegs *)chObj->instObj->shimBaseAddr)->CNTX_CNTL[chObj->dmaCfgParams.chNum].DMACNTX)),
    *((volatile uint32_t *) (&((CSL_csi_rx_ifRegs *)chObj->instObj->shimBaseAddr)->CNTX_CNTL[chObj->dmaCfgParams.chNum].DMACNTX)));

    Log is as follows:

    VX_ZONE_ERROR:[tivxCaptureSetCreateParams:692]  CAPTURE: [taolei] loopCnt 0 inCsiDataType 0x1e 1280 x 960 dataFormat 0x0 ccsFormat 0x11

    [MCU2_0] 23.993959 s: src/csirx_drv.c @ Line 1207:
    [MCU2_0] 23.993983 s: [taolei]CsirxDrv_chConfigShim Before DMACNTX : 4510020 = 0xc000000
    [MCU2_0] 23.994109 s: src/csirx_drv.c @ Line 1218:
    [MCU2_0] 23.994164 s: [taolei]CsirxDrv_chConfigShim After DMACNTX : 4510020 = 0xc0000de

    2. Can you please share your sensor parameters that you are passing to the capture node?

    ==>Don't understand, can you give me an example?

    3. What is the reason for 0x04504104=0x80000111? bit1-bit0 seems abnormal

  • Hi Brijesh,

    Please help me, 3ks

  • Hi lei tao,

    What is the virtual channel id that you are using? This is because If it is more than 3, it seems that single cam example is changing instance to 1, in below statements. Can you please make sure to use VC Id lower than 4 or can you change value of local_capture_config.chInstMap[0] to 0 and try it?

    local_capture_config.chInstMap[0] = obj->selectedCam/NUM_CAPT_CHANNELS;
    local_capture_config.chVcNum[0] = obj->selectedCam%NUM_CAPT_CHANNELS;

    Regards,

    Brijesh

  • Hi Brijesh,

    datatype question fixed.

    But the single_camera demo still cannot receive data, i found 0x04504104 and 04504020 is abnormal.

    Abnormal Register:

        0x04504104  = 0x80000111,

        0x04504020 = 0x00000000.

    What possible reason is the exception register?

  • Hi lei tao,

    The status here mean It is waiting for the control data/packet. It seems there is no packets received on CSI lanes. 

    One thing that i want to make sure it is taken care is start. Can you please make sure that camera and deserializer is started only after verify Graph is called. Before verify graph, please make sure to stop deserializer and camera output.. 

    Regards,

    Brijesh

  • Hi Brijesh,

    1. “Can you please make sure that camera and deserializer is started only after verify Graph is called. Before verify graph,please make sure to stop deserializer and camera output.”

    ==>Yes, I'm sure.

          Because power-on of the deserializer , config of the deserializer , and stream-on of the deserializer are performed in IssSensorFxns->streamOn.

    2. By comparing with the normal camera, we found that the following two registers are different:

    0x04504104  = 0x80000111, 0x04504020 = 0x00000000.

     the normal camera as follow: 0x04504104  = 0x80000112, 0x04504020 = 0x00000002.

    Do you have any suggestions?

  • Hi Brijesh,

    I expexct for your reply.

  • Hi Brijesh,

    I expect for your reply.

  • Hi lei tao,

    I still have doubt on the sequence and lane configuration.

    By default, single camera example is configuring CSIRX to expect lane speed as 1.6Gbps. But if your sensor/deserializer is outputting at different lane speed, it may not work. Could you please check lane speed and configure it single camera example? 

    Could you also double check if by any chance, config callback is not enabling deserializer/camera output? If possible, make sure to disable it explicitly. 

    Regards,

    Brijesh

  • Hi Brijesh,

    1. The lane rate of the deserializer is 1.5G/lane.

        The normal camera are also the same configuration(1.5G/lane).

    2. I make sure that there is no mipi data output before IssSensorFxns->streamOn.

        Because I added the deserializer power-off action in IssSensorFxns->powerOn.

  • Hi lei tao,

    Which deserializer are you using? Is the dserializer configuration validated/verified ?

    Also are you checking this on EVM? I am thinking if there is any way to generate internal test pattern first in deserializer and verify CSI2 portion of the chain.

    Regards,

    Brijesj

  • Hi Brijesh,

    1. "Which deserializer are you using? Is the dserializer configuration validated/verified ?"

    ==> Serializer:MAX96717F 

           Deserializer :MAX96722

           The serializer and deserializer  sequence has been verified on other platforms.

           We was confirmed MIPII Signel is right through mipii analyzer  test it..

    2. "Also are you checking this on EVM?"

    ==> It' not  EVM  demo board.  I used our custom board. 

    3. " I am thinking if there is any way to generate internal test pattern first in deserializer and verify CSI2 portion of the chain."

    ==>  Expect for your relay. 

  • Hi lei tao,

    Can you apply soft reset in the maxim deserializer during streamon function? Can we please try this change?

    Regards,

    Brijesh

  • Hi Brijesh,

    The first I2C action of the initialization sequence is software reset.

  • Hi Brijesh,

    " I am thinking if there is any way to generate internal test pattern first in deserializer and verify CSI2 portion of the chain."

    ==> Expect for your relay. 

  • Hi lei tao,

    Can you also try to apply reset when enabling streaming? I guess this is soft rest, so wont reset configuration.

    Regards,

    Brijesh

  • Hi Brijesh,

    Thanks for your help,question has been solved.

    The cause of the question is that the Deserializer sequence is incorrect.