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.

RTOS/TDA3XEVM: SENSOR ERROR

Part Number: TDA3XEVM

Tool/software: TI-RTOS

Hi,

I am  using visionSDK 3.1. While running the usecases, i am getting the error as shown below

[IPU1-0] ----Program only ONE sensor---- (Print given )
[IPU1-1]     19.004758 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[IPU1-1]     19.004880 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 255168 B (249 KB)
[DSP1  ]     19.005307 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[DSP1  ]     19.005368 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 201984 B (197 KB)
[DSP1  ]     19.005429 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 511704 B (499 KB)
[DSP2  ]     17.589824 s:  ALGORITHM: Create Done (algId = 29) !!!
[DSP2  ]     17.590007 s:  IPC_OUT_0   : Create in progress !!!
[DSP2  ]     17.590099 s:  IPC_OUT_0   : Create Done !!!
[DSP2  ]     19.005703 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[DSP2  ]     19.005734 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 27264 B (26 KB)
[DSP2  ]     19.005795 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 519408 B (507 KB)
[EVE1  ]     19.006374 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[EVE1  ]     19.006649 s:  SYSTEM: Heap = LOCAL_L2             @ 0x40020000, Total size = 22528 B (22 KB), Free size = 17632 B (17 KB)
[EVE1  ]     19.007137 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 245456 B (239 KB)
[IPU1-0]     20.489843 s:
[IPU1-0]     20.490117 s:  i2cMdSubmitChan: i2c1 transfer to slave address 0x40 failed
[IPU1-0]     20.490209 s: src/bsp_deviceI2c.c @ Line 667:
[IPU1-0]     20.490300 s:  I2C1: DEV 0x40: ERROR !!!
[IPU1-0]     20.490392 s: src/bsp_deviceI2c.c @ Line 689:
[IPU1-0]     20.490483 s:  I2C1: Error timeout 255 ms!!!
[IPU1-0]     20.490575 s:  ISS_SENSOR_START: AFTER HANDLE
[IPU1-0]     20.490636 s:
[IPU1-0] ----Disable sensor broadcast---- (Print given)
[IPU1-0]     20.493289 s:

After this error, there is an assertion happening. However we commented the assertion part and got the video output successfully. How can we solve this error?

  • Hi Blessy,

    on which usecase you see this issue? Also can you show the log of assertion failure?

    Thanks,
    Yordan
  • Hi,
    It looks to me camera sensor is searched at i2c1 address 0x40. I found however that camera sensor on TDA3x EVM was routed to i2c2 by default.
    I think 2 fixes exist:
    1. Change I2C1 to I2C2 in software. I'm curious why that wasn't done before...
    2. Switch jumpers RJ5 and RJ6 to the other positions to select I2C1. This will involve some soldering however.

    Regards,
    Stan
  • Hi Stan,

    Thank you for your time. In the code I2C0 is referred to I2C1 and I2C1 is referred to I2C2, this is what i found.
  • I see now. Could it be a wrong address then? Is it 0x40 set in the sensor itself? I don't have sensor diagram by hand.
  • Hi Stan,

    The address of the sensor is 0x62, as we are using 4 sensors of the same I2C address, alias address is set for the four. 0x40, 0x42, 0x44, 0x46 are the alias addresses of the sensors.
  • Hi Stan

    Do you have any other suggestions for solving this error? I couldn't solve it yet.
  • Hi, ,

    Happy New Year!

    Your question is forwarded to another expert.
    Just to let you know that yet some vacations are on-going and the responses will delay.

    Regards,
    Mariya
  • Hi Blessy,

    Were you able to resolve this?

    If not can you please clarify, post removal of the assert, you were able to capture the video stream and display. Can we infer that sensor could be programmed after the assert was removed?

    Regards, Sujith

  • Hi Sujith,
    We had changed the serializer functional mode. There are two modes of operation, one Operation With External Oscillator as Reference Clock (48MHz) and two, Operation With Pixel Clock from Imager as Reference Clock (2MHz). We went for the second one i.e 24MHz. We were facing the issue as i had mentioned in my previous query. Still we are. We commented out the assertion part and we were able to capture the video stream.

    We tested with 48MHz setup, that time we are NOT seeing this error. We would like to continue with the 24MHz setup. I couldn't find any software code changes for 24MHz setup. Is there something more to do regarding this?

  • Hi Blessy,

    Can you share the UB913 & UB914 configurations that you are using?

    24 MHz pixel clock could be one of the issue, please check UB913/UB914 technical reference manual, the valid range starts from 25 MHz.

    Regards, Sujith

  • Hi Sujith, Please see the below configs.

    BspUtils_Ub960I2cParams gUb960Cfg_IMI[] = {
    {0x01, 0x01, 0xFFF}, /* Digital Reset 0 */
    {0x1F, 0x05, 0x4FF},

    /* IMI OV10640 1 */
    {0x4C, 0x01, 0x0},//RX0
    {0x58, 0x58, 0x0},//BC FREQ SELECT: 2.5 Mbps
    {0x6D, 0x7D, 0x0},
    {0x5D, 0xB0, 0x0},//slaveID[0] = 0XB0 (SERIALIZER = 0XB0?)
    {0x65, ((UInt8) (IMI_PORT_0_SER_ADDR << 1U)), 0x0},
    {0x5E, 0x62,0}, //slaveID[1] = 0x62 (SENSOR = 0X62)
    {0x66, ((UInt8) (IMI_PORT_0_SENSOR_ADDR << 1U)), 0x0},
    {0x7C, 0x00, 0x0},
    {0x6E, 0x99, 0x0},//GPIO
    {0x70, 0x2B, 0x0},//RAW10
    {0x71, 0x2C, 0x0},//RAW12


    /* IMI OV10640 2 */
    {0x4C, 0x12, 0x0},//RX1
    {0x58, 0x58, 0x0},
    {0x6D, 0x7D, 0x0},
    {0x5D, 0xB0, 0x0},//slaveID[0] = 0XB0 (SERIALIZER = 0XB0?)
    {0x65, ((UInt8) (IMI_PORT_1_SER_ADDR << 1U)), 0x0},
    {0x5E, 0x62,0}, //slaveID[1] = 0x62 (SENSOR = 0X62)
    {0x66, ((UInt8) (IMI_PORT_1_SENSOR_ADDR << 1U)), 0x0},
    {0x7C, 0x00, 0x0},
    {0x6E, 0x99, 0x0},
    {0x70, 0x6B, 0x0},
    {0x71, 0x6C, 0x0},


    /* IMI OV10640 3 */
    {0x4C, 0x24, 0x0},
    {0x58, 0x58, 0x0},
    {0x6D, 0x7D, 0x0},
    {0x5D, 0xB0, 0x0},//slaveID[0] = 0XB0 (SERIALIZER = 0XB0?)
    {0x65, ((UInt8) (IMI_PORT_2_SER_ADDR << 1U)), 0x0},
    {0x5E, 0x62,0}, //slaveID[1] = 0x62 (SENSOR = 0X62)
    {0x66, ((UInt8) (IMI_PORT_2_SENSOR_ADDR << 1U)), 0x0},
    {0x7C, 0x00, 0x0},
    {0x6E, 0x99, 0x0},
    {0x70, 0xAB, 0x0},
    {0x71, 0xAC, 0x0},


    /* IMI OV10640 4 */
    {0x4C, 0x38, 0x0},
    {0x58, 0x58, 0x0},
    {0x6D, 0x7D, 0x0},
    {0x5D, 0xB0, 0x0},//slaveID[0] = 0XB0 (SERIALIZER = 0XB0?)
    {0x65, ((UInt8) (IMI_PORT_3_SER_ADDR << 1U)), 0x0},
    {0x5E, 0x62,0}, //slaveID[1] = 0x62 (SENSOR = 0X62)
    {0x66, ((UInt8) (IMI_PORT_3_SENSOR_ADDR << 1U)), 0x0},
    {0x7C, 0x00, 0x0},
    {0x6E, 0x99, 0x0},
    {0x70, 0xEB, 0x0},
    {0x71, 0xEC, 0x0},

    {0xB0, 0x1C, 0xFFF},//CSI2 reserved regs
    {0xB1, 0x13, 0xFFF},
    {0xB2, 0x1F, 0xFFF},

    {0x32, 0x01, 0x0},//CSI0 select
    #ifdef BOARD_TYPE_TDA3XX_RVP
    {0x33, 0x03, 0x0}, /* Enable CSI2 continous clock */
    #else
    {0x33, 0x01, 0x0}, //CSI_EN & CSI0 4L
    #endif
    {0x20, 0x00, 0x0},//forwarding of all RX to CSI0

    {0x10, 0x81, 0x0},//GPIO0 Output Enabled, Framesync signal selected
    {0x11, 0xa1, 0x0},//GPIO1 Output Enabled, RX port pass indication
    {0x12, 0xc1, 0x0},//GPIO2 Output Enabled,
    };


    BspUtils_Ub960I2cParams gUB913SerCfg[] = {
    {0x03, 0xC5, 0x0},
    {0x0D, 0x99, 0x0},

    /* Changing the default I2C clock rate to 100 KHz */
    /* Default 0x82 = 74 kbits/sec
    0x64 = 100 kbps
    0x32 = 400 kbps */
    {0x11, 0x32, 0x0}, /* SCL High period */
    {0x12, 0x32, 0x0} /* SCL Low period */
    };
  • Hi Blessy,

    Can we check on the following 

    1. Ensure the back-channel lock is detected
      1. This is required to ensure communication between UB964 and UB913
      2. Remove the assert (IMI modules that is supported by default operates with external clock mode and back-channel lock check is not required and hence the assert was needed)
      3. After UB964 and UB913 are programmed, check register 0x4D of UB964, bit 0 should be set.
        • Wait until lock is detected
      4. Ensure to check on all receive channels, a receive channel is selected by programming 0x4C with 0x01 for port 0 and 0x12 for port 1, etc...
    2. Pixel Clock
      1. The minimum pixel clock is 25 MHz, recommend to operate with 25 MHz pixel clock
    3. Check back-channel frequency reported at UB913
      1. After UB964 & UB913 are programmed, add a delay of 1 second
      2. Read contents of register 0x14 of UB913, for all the connected UB913's

    Regards, Sujith

  • Hi Sujith,

    Thankyou for your response. I checked with the above mentioned points.

    1. Back-channel lock is detected. After UB964 and UB913 programming - 0X4D registers of each channels were checked. The 0th bit is getting set. Following were the observed values.
    0x4D = 0x13
    0x4D = 0x53
    0x4D = 0x93
    0x4D = 0xd3
    2. Pixel clock obtained is 48MHz
    3. Added a delay of 1 second after programming of UB964 and UB913
    Content of register 0x14 = 0x00 for all the connected UB913's.

    Still facing the same error.
  • Hi Blessy,

    1. Can you please read 0x4D of UB964 for all ports multiple times (2 times) to ensure correct status is indicated.

    2. Try reducing the I2C clock speed, i.e. in UB913 configurations, please comment out values being written into register 0x11 and 0x12. i.e. Let I2C operate at default speeds.

    Interesting thing is that sensors is accessible after the UB964/UB913 are programmed and sensor programming is initiated. So it seems after some delay the sensors are indeed accessible.

    Regards, Sujith

  • Hi Sujith,
    1. I tried reading the register 0x4D of UB964 for all ports multiple times. Each time the last bit was getting set.
    0x4D = 0x13
    0x4D = 0x53
    0x4D = 0x93
    0x4D = 0xd3
    0x4D = 0x03
    0x4D = 0x43
    0x4D = 0x83
    0x4D = 0xc3
    2. Made I2C to operate at default speeds by commenting out the two register values, 0x11 and 0x12

    Got the same error but video is working fine as it was before.
  • Hi Blessy,

    Could I request you to contact TI FAE assisting you, we would require a working session to debug this.

    Regards,
    Sujith