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

31 Replies

  • Hi Abhay,

    Do you have any other device connected to i2c address 0x74? Can you check? 

    Btw, are you able to communicate with the UB960 and it is setup correctly? please confirm..

    Regards,

    Brijesh 

  • In reply to Brijesh Jadav:

    Hi Brijesh,

    We have no other device connected to i2c address 0x74. We are using UB954 and not UB960.

    We have below devices connected over i2c,

    AR0220 sensor at i2c address 0x10
    UB954 deserializer at i2c address 0x36
    UB953 serializer at i2c address 0x18
    one more UB953 serializer at i2c address 0x19 &
    EEPROM at i2c address 0x50

    We are able to communicate with UB953/UB954 over i2c.

    Regards,
    Abhay

  • In reply to Abhay Sorte:

    Hi Abhay,

    ok, so are you able to talk to sensor??

    Regards,
    Brijesh
  • In reply to Brijesh Jadav:

    Hi Brijesh,

    With SERDES connected, we are not able to talk to sensor. We are getting "Bus busy error" before writing to sensor.
    Also please note, we have enabled the back channel with SERDES.
    Without SERDES , we are able to write to the sensor.

    Regards,
    Abhay
  • In reply to Abhay Sorte:

    Hi Abhay,

    Since you are able to talk to UB953, back channel is established.
    when you see this error, can you check if you are still able to talk to ub953 serializer?

    Regards,
    Brijesh
  • In reply to Brijesh Jadav:

    Hi Brijesh,

    I am working with Abhay on this issue.

    We are able to read the Serialiser ID,but not able to probe the sensor.

    We are getting assertion at the end.


    [IPU1-0]     26.436100 s: Serilaizer # 0 has I2CAddr 74 !!!   -----------------------------------Alias Address of Serialiser
    [IPU1-0]     32.116574 s: Deserializer I2C address 0x36 Probe SUCCESS
    [IPU1-0]     32.117580 s: Serializer I2C address 0x18 Probe SUCCESS
    [IPU1-0]     32.117916 s: Read from register 0x5b of deser is successful, SER ID = 30 ...
    [IPU1-0]     32.118251 s: Read from register 0x5C of deser is successful, SER ALIAS ID = e8 ...
    [IPU1-0]     32.118587 s: Read from register 0x5E of deser is successful, SER ALIAS ID = e8 ...
    [IPU1-0]     32.118922 s: Read from register 0x65 of deser is successful, 1st Alias Slave ID = 30 ...
    [IPU1-0]     32.119044 s: Bsp_deviceI2cProbeDevice serializer start.......
    [IPU1-0]     32.120295 s: Bsp_deviceI2cProbeDevice serializer is successful for 7 bit address 0x18 ...
    [IPU1-0]     32.120661 s: Reading reg 0x00 from serialiser is successful, value = 30 ...
    [IPU1-0]     32.131184 s: Sensor I2C Address Probe FAILED !!!!!!!!
    [IPU1-0]     32.136491 s: src/bsp_deviceI2c.c @ Line 1567:
    [IPU1-0]     32.136582 s: Bus busy detected recover I2C bus !!!
    [IPU1-0]     32.136674 s: src/bsp_deviceI2c.c @ Line 667:
    [IPU1-0]     32.136765 s:  I2C4: DEV 0x10: ERROR !!!
    [IPU1-0]     32.136857 s: src/bsp_deviceI2c.c @ Line 689:
    [IPU1-0]     32.136918 s:  I2C4: Error timeout 5 ms!!!
    [IPU1-0]     32.137009 s: AR0220_Start : status = ffffffed
    [IPU1-0]     32.137070 s: AR0220_WriteReg FAILED : Reg Addr = 10, Reg Val = 301a
    [IPU1-0]     37.147166 s: src/bsp_deviceI2c.c @ Line 667:
    [IPU1-0]     37.147288 s:  I2C4: DEV 0x10: ERROR !!!
    [IPU1-0]     37.147410 s: src/bsp_deviceI2c.c @ Line 689:
    [IPU1-0]     37.147501 s:  I2C4: Error timeout 5010 ms!!!
    [IPU1-0]     37.147562 s:  Assertion @ Line: 507 in apps/src/rtos/iss/src/common/app_util_iss.c!

    Thanks

    Deepika

  • In reply to deepikateriar:

    Hi Deepika,

    Please check if sensor has to be brought out of reset/power is supplied to sensor?

    Regards,
    Sujith
  • In reply to Sujith:

    Hi Sujith,

    The sensor is out of reset. We have taken sensor out of reset before writing to serdes and sensor.
    Previously, with the working setup (on EVM), we had a separate serializer + sensor module and we were communicating to the sensor using back channel. Now with present custom board setup, all the three (Ser, deser & sensor) are on I2C5.
    So is it possible that TDA2P is talking to sensor over I2C5 and at the same time SERDES is also talking to sensor over I2C5, is it possible that this may cause that I2C buss error is our case ?

    Regards,
    Abhay
  • In reply to Abhay Sorte:

    Abhay,

    They are independent. deserializer is on i2c5, but we need to talk to deserializer to talk to sensor. When we provide aliased address, it converts into actual address and talks to remote device over back channel..
    Are you working in synchronous mode? Also can you read some status register on UB953 to check status of sensor?

    Rgds,
    Brijesh
  • In reply to Brijesh Jadav:

    hi Abhay,

    Can you please probe and check if SCL held high.

    Regards,
    Sujith