RTOS/TDA2P-ACD: AR0220 Sensor + SERDES (UB953/UB954) Interfacing to Custom TDA2Px Board

Part Number: TDA2P-ACD

Tool/software: TI-RTOS

Hello All,

We are working with AR0220 camera sensor + UB953/UB954 SERDES on custom TDA2P board.

Earlier we were working on TDA2Px-EVM with AR0220 and SERDES which was working. We have taken the same working configurations on custom board.

But we are getting I2C bust busy error as shown below,

"

Serilaizer # 0 has I2CAddr 74 !!!
Setting GPIO RST Pin
GPIO RST Pin setting DONE
src/bsp_deviceI2c.c @ Line 1567:
Bus busy detected recover I2C bus !!!
src/bsp_deviceI2c.c @ Line 667:
 I2C4: DEV 0x40: ERROR !!! 
 I2C4: Error timeout 5074 ms!!!
 Assertion @ Line: 507 in vision_sdk/apps/src/rtos/iss/src/common/app_util_iss.c!

"

We are using below settings in file "\apps\src\rtos\iss\src\sensor\iss_sensor_tda2px.c",

"

{SENSOR_AR0220,
        {
            4u,        /* I2C Instance id for the sensor */
            {0x40}, /* I2C Alias Address of the sensor */
            {0x74}, /* I2C Alias Address of the serializer */
            TRUE,     /* Flag for single/multi channel sensor config */
            SYSTEM_VIFW_4LANES,     /* Interface width */
            SYSTEM_VIFM_SCH_CSI2,    /* Video Interface mode - Single channel capture via CSI2 interface */
            SYSTEM_CSI2_RAW12,         /* Input CSI2 Data Format */
            0,    /* Virtual Channel Id */
            0,     /* Is CSI Enable Required in UB954 */
            {TRUE /* isCplxCfgValid */,
                 {{FALSE, 1}, /* Clock Lane */
                     {FALSE, 2}, /* data1Lane */
                     {FALSE, 3}, /* data2Lane */
                     {FALSE, 4}, /* data3Lane*/
                     {FALSE, 5}},/* data4Lane */
                     800 /* csi2PhyClk */ },
                     FVID2_VID_SENSOR_AR0220_DRV,         /* sensorDrvId */
                     FALSE,     /* sensorBroadcast */
                     FALSE,   /* enableFsin */
                    {0x36} /* I2C address of deserializer */

}}

"

Can anyone suggest how do we solve I2C bus busy error.

Regards,

Abhay

34 Replies

  • In reply to deepikateriar:

    Hi Sujith,

    I was able to get Clock and Data from CSI2 Port in TDA2P side.

    But the picture is not clear. I am facing CRC errors in the Serdes Link.

    I tried with 400 and 800Mbps both from Deserializer and TDA2P.

    I disabled the  errorCallback() call in the file issCaptureLink_drv.c and got the following image on the display.

    Please give your suggestions,

    Regards,

    Deepika

  • In reply to deepikateriar:

    Hi Deepika, Can you please check on the number of data lanes being used in the de-serializer and TDA2Px. It seems like 1/3 of line is missing but these seems to be some kind of image in the background. Regards, Sujith
  • In reply to Sujith:

    Hi Sujith,
    Thanks for reply.
    We have set register 0x33 to 0x23 in deserialiser as we have 2 lanes connected to TDA2P.

    Yes,in background there is some image.Is this type of image is a result of some clocking issue?

    Regards,
    Deepika
  • In reply to deepikateriar:

    Hi Sujith,

    One more info, while reading CSI_RX_STS(0x7A) and CSI_ERR_COUNTER(0x7B) from the Deserialiser(954) I am getting the following values:
    CSI_RX_STS(0x7A) = 0x02
    CSI_ERR_COUNTER(0x7B)=0X01

    Can this also cause problem?
    Also do you have any suggestions for getting the full image on the screen?

    I am attaching a part of schematics showing connections between Deser(954) and CSI Clk and Data lanes going to TDA2P



    Regards,
    Deepika

  • In reply to deepikateriar:

    Hi Deepika, Register CSI_RX_STS with value of 0x02 indicates that there were > 1 bit ECC error. Which cannot be corrected by h/w. Can you please check on the following 1. UB954 clear the error status / counters and re-read the same register. Check if the error persists. I suspect this error is persistent 2. Check if this error source is UB953/Sensor Regards, Sujith
  • In reply to Sujith:

    Hi Sujith,

    I tried reading CSI_RX_STS(0x7A) and CSI_ERR_COUNTER(0x7B).I have created a loop to read the two registers.Only once I am getting 1 bit ECC error,after reading it again the registers are cleared.On re reading it, it reads 0.


    [IPU1-0] 26.560269 s: Read from register CSI_RX_STS(0x7A):: = 2 ...
    [IPU1-0] 26.560605 s: Read from register CSI_ERR_COUNTER(0x7B):: = 1 ...


    [IPU1-0] 26.563533 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.563868 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.566339 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.566674 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.569328 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.569663 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.572317 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.572652 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.575398 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.575733 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.578539 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.578875 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.581345 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.581681 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.584334 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.584670 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    [IPU1-0] 26.587384 s: Read from register CSI_RX_STS(0x7A):: = 0 ...
    [IPU1-0] 26.587720 s: Read from register CSI_ERR_COUNTER(0x7B):: = 0 ...

    Also the RX_PORT_STS2(0x4E) reads 0x4D ----Which means CSI Receive error detected.
    SENSOR_STS_0 (0x51) and SENSOR_STS_3(0x54) reads 0.


    Apart from this I wanted to inform you that even though we have a 25MHz CLK_IN to the serialiser we have changed the MODE Register(0x03) of serialiser to 0x10 to make it work in Sync mode.

    Regards,
    Deepika

  • In reply to deepikateriar:

    Hi Sujith,

    I am running the PDK  demo application for checking the Colour Bar pattern generation by using the following test id:

    {"Sensor Config Bypassed CSI2 4Lanes capture color bars from UB954",   0U,

        TRUE,

        FVID2_VIFM_SCH_CSI2,

        FVID2_VIFW_2LANES, 1U, 0U, VPS_ISS_CAL_CSI2_RAW12,FVID2_BPP_BITS12,

        CAPT_APP_RUN_COUNT, 1280U, 720U, (720U * 3U),

        FVID2_VID_SENSOR_BYPASS_CSI2_DRV,

        FVID2_STD_1080P_30, FVID2_DF_BAYER_BGGR, FVID2_BPP_BITS12,

        BSP_BOARD_MODE_DEFAULT},

    I have cofigured it for 2 Lanes,But I want the polarity to be reversed.

    the value of 0x489B0304  is 0x4A000321.

    This is for P/N Polarity. For the custom board polarity is N/P. How can I make that configuration.

    Regards,

    Deepika

  • In reply to deepikateriar:

    Hi Deepika, Please check the function appCaptDeriveCfg (), by default it's set to pCmplxIoCfg->clockLane.pol = FALSE; You might have to make it pCmplxIoCfg->clockLane.pol = TRUE; Regards, Sujith
  • In reply to Sujith:

    Hi Sujith,

    By changing the lane polarity  and keeping the already available pattern generation code in bsputils_ub95x.c  the COMPLEXIO_CFG Register is out of reset  is the value of 0x489B0304  is 0x6A000BA9.

    By probing the clock and 2 data lanes we are getting data but no clock,and  we are not getting  anything on HDMI.

    It is stuck at "Starting Capture now"

    This is what I have added for polarity and position.Is there anything we are missing out.

    if (FVID2_VID_SENSOR_BYPASS_CSI2_DRV == pCfg->sensorDrvId)
        {
            pCmplxIoCfg->clockLane.pol      = TRUE;
            pCmplxIoCfg->clockLane.position = 1U;
            pCmplxIoCfg->data1Lane.pol      = TRUE;
            pCmplxIoCfg->data1Lane.position = 2U;
            pCmplxIoCfg->data2Lane.pol      = TRUE;
            pCmplxIoCfg->data2Lane.position = 3U;

    Regards,

    Deepika

  • In reply to deepikateriar:

    Hi Sujith,

    I was going through the datasheet of 954 ,in the datasheet  Section 7.4.21 CSI-2 Transmitter Frequency

     


    There is no description of REF_CLK_MODE in the datasheet.

    Also I am not understanding the reason for not getting CSI_CLK output from the Deserialiser.Also there is no voltage level on the CSI_CLK line...it is 700mV. Is this Ok?

    Lane order and polarity have already been mapped and cross checked.

    Regards,

    Deepika