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.

DS90UB954-Q1EVM: SerDes with CSI-2 MIPI output issue.

Part Number: DS90UB954-Q1EVM
Other Parts Discussed in Thread: ALP, USB2ANY

Hello All, 

 I'm a enginner developing about cmos camera device driver of nvidia jetson tx2.

 Recently, I am developing a camera system using TI serdes system (ds90ub954, ds90ub953a).

 

1. serdes device driver registration is okay.

2. sensor device driver registeration is okay.

3. camera image preview  is error occurred.

camera can capture images in low resolution (720p). but it runs a few minutes and pause and then serial log error occured.

mipi data  timing or packet  is some problem.  

Where can I start debugging mipi issue?

  • Hi Chae,

    It sounds the display has issue in your case, to make the issue more clear, you need check if the issue is from soc + 953, or from 953 + 954, or from the link between 954 and its following mipi sink.

    for the link between 953 and 954, you can check 954 lock indication, also can check reg. 0x4c/4d/4e/55/56/73/74/75/76/7a/7b etc.

    for the link between sensor and 953, you can check 953's internal CSI2 / DPHY error reg., if these reg. had indicated this link has issue, you should focus on this link debug deeply.

    regards,

    Steven

  • Hi Steven, 

    As your advise,   I tested changed Data rate on EVM with ALP. 

    RX port 0 ,  800Mbos, 2lanes Continous clock Enable,  Synchronized.  

    1.  Resolution   2608X1960   :   transmission fail    0x4e register  BUFFER ERROR is set                              2608x1960x10bit x 30fps  = 1.533Gbps 

    2.  Resolution   2592X1944   :   transmission fail    0x4e register  BUFFER ERROR is set                              2592x1944x10bit x 30fps  = 1.511Gbps 

    3.  Resolution   1920X1080   :   transmission success    current CSI TX Status Pass sts: Pass is display.      1920x1080x10bit x 60fps  =  1.244Gbps  

    As in the datasheet,   800Mhz setup must support 1.6Gbps   but, as above test  1,2 test is not support transmition.

    Is Case 1 and 2 a usable resolution?
    If not available, please let me know what is the cause.

       Best Regards,

       JongPil Chae

     

     

  • JongPil,

    for item1/2, they can't be used. for cis2 protocol, it needs overhead to process the HS/LP transition based on MIPI spec., also your video format need blanking as well. generally if the csi2 bandwidth should be ~1.25 x video data bandwidth. 

    If you need run the item1/2, you should increase the CSI2 bandwidth.

    regards,

    Steven

  • Hi Steven, 

    I tested to verified error status in sensor + evm with ALP.
    error message had none.

    it was stop in camera streamming test (gst-launch in LINUX).

    I excuted V4L2-Ctrl command repeat and repeat. 

    it occured error message sometime as shown below.

    [ 2589.673855] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
    [ 2589.680480] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
    [ 2589.690913] nvcsi 150c0000.nvcsi: csi4_stream_check_status (2) INTR_STATUS 0x00000004
    [ 2589.698946] nvcsi 150c0000.nvcsi: csi4_stream_check_status (2) ERR_INTR_STATUS 0x00000004
    [ 2596.072658] s5k5e8 2-0010: s5k5e8_stop_streaming: stop streaming
    [ 2596.145030] nvcsi 150c0000.nvcsi: csi4_stream_check_status (2) INTR_STATUS 0x00000008
    [ 2596.153541] nvcsi 150c0000.nvcsi: csi4_stream_check_status (2) ERR_INTR_STATUS 0x00000008


    I searched error message in technical reference manual of host processor.  

    intr_stat_pd_crc_err_vc0 --> crc packet error
    err_intr_stat_pd_wc_short_err_vc0 --> short packet error

    What parameters to fix in case of this error?

    Best Regards, 

    Jongpil Chae

  • Hi, you can get detailed bit error note from the SOC. due to csi2 bandwidth limitation, it could result into short packet error.

    regards,

    Steven

  • Hi Chae,

    this reg. is from SoC? you can check detailed meaning of the bit error. for item1, as mentioned, the CSI2 bandwidth is not enough to support, it could result into short packet error. with the same video format, you can reduce the frame rate with ~20% discount, and test it again, if the link has issue or not?

    regards,

    Steven

  • Hello steven,

    As your recommend. i changed resolution 2592x1944 --> 2100x1900 / 30fps.
    I think 2100x1900 is less than 4M Pixel.
    but It also occured error in 2 resolution (1920x1080, 2100x1900).

    In some cases, an error occurs 1 to 2 hours after execution.

    However, in other cases, an error occurs immediately 2-3 minutes after execution.

    sensor + DS90UB953A --> DS90UB954 + ALP
    It could not any error in ALP sw.
    but It occured short packet error in host processor.

    I don't know how to debugging fix error.

  • Hi, can you clarify:

    1. the resolution "2592x1944 " can't work in your system, but if you reduce the resolution to "2100x1900@30fps", the link can be brought up, correct?

    2. if yes, as mentioned 953//953 can't support 2592x1944 due to bandwidth limitation. for low resolution transmission, if the link has error in 3hours, you need check if the link has bit error between 953 and 954, you can check reg. 0x4c/4d/4e/55/56/7a/7b/73/74/75/76. some registers need be cleared before you read them.

    3. if the link between 953/954 has no error but the error is from the 954's sink, you need capture if the 954 output meets the DPHY spec. request in your system.

    regards,

    Steven

  • Hi Steven , 

    1. the resolution "2592x1944 " can't work in your system, but if you reduce the resolution to "2100x1900@30fps", the link can be brought up, correct?
         yes, correct.

    2. if yes, as mentioned 953//953 can't support 2592x1944 due to bandwidth limitation. for low resolution transmission, if the link has error in 3hours, you need check if the link has bit error between 953 and 954, you can check reg. 0x4c/4d/4e/55/56/7a/7b/73/74/75/76. some registers need be cleared before you read them.
       I understand it can't support "2592x1944" resolution.

       Can register values be read using ALP SW while streaming video to host processor?

    3. if the link between 953/954 has no error but the error is from the 954's sink, you need capture if the 954 output meets the DPHY spec. request in your system.
        Do you mean "system" as a host processor?

     

        I know that the 953A/954 supports two types of MIPI clocks of 800MHz /1.6GHz.
        Do I have to set the MIPI clock of the image sensor to one of the two values exactly?
        Currently, the image sensor's MIPI Clock is set to 836MHz.

          

         sensor + 953a   <--> 954 + ALP SW   ,   I check register 0x4c/4d/4e/55/56/7a/7b/73/74/75/76 .  it not found error bit.  

         but  i was run script  and check info tab  i found  1  encorder errs,  what that means?   

       

    Best Regards,

    Jongpil Chae

     

  • Hi Chae,

    for item2, i means you can use 'lower" resolution for transmission since "2592x1944" is over spec. for item3, yes, you need check the SOC since SOC is 954's sink.

    1. Yes, you can read reg. through ALP but please make sure that it has NO I2C confliction in your I2C BUS.

    2. For the ENCODER error, since you also has unlock, so we can't get conclusion here. pls check if the script would make the link re-align? and this could have error. also, you can reset the statistics when you read these error.

    3. in your case, the image sensor's MIPI Clock is set to 836MHz, how many lanes are used here? if 4lanes are designed between sensor and 953, this doesn't work since the 953's input CSI2 bandwidth is over spec. (l953's input CSI2 bandwidth is limited at 25(external clock freq.)  x32 x4 = 3.2Gbps in the same time the FPD-Link rate should be >=3.2Gbps *10/8 = 4Gbps.

    regards,

    Steven 

  • Hello  Steven , 

    1. Yes, you can read reg. through ALP but please make sure that it has NO I2C confliction in your I2C BUS.

    I want to control I2C bus in host system. but ALP sw need to connect I2C Bus to read /write register.
    How to setup to read register in ALP while streaming control in host processor without confliction I2C?

    2. For the ENCODER error, since you also has unlock, so we can't get conclusion here. pls check if the script would make the link re-align? and this could have error. also, you can reset the statistics when you read these error.

    pls, confirm my script link re-align correctly.

    """
      Copyright 2018 Texas Instruments Incorporated. All rights reserved.
    
      IMPORTANT: Your use of this Software is limited to those specific rights
      granted under the terms of a software license agreement between the user who
      downloaded the software, his/her employer (which must be your employer) and
      Texas Instruments Incorporated (the "License"). You may not use this Software
      unless you agree to abide by the terms of the License. The License limits your
      use, and you acknowledge, that the Software may not be modified, copied or
      distributed unless embedded on a Texas Instruments microcontroller which is
      integrated into your product. Other than for the foregoing purpose, you may
      not use, reproduce, copy, prepare derivative works of, modify, distribute,
      perform, display or sell this Software and/or its documentation for any
      purpose.
    
      YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
      PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
      INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
      NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS
      INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
      NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL
      EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
      LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL
      DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS,
      TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT
      LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
    
      Should you have any questions regarding your right to use this Software,
      contact Texas Instruments Incorporated at www.TI.com.
    
    """
    # Generic image sensor setup script                 
    #
    # Version 0.91 
    import time
    
    #reset and initialize sensor from DES using 953
    
    # Set up IDs
    UB954 = 0x60
    UB953ID = 0x30
    UB953 = 0x18
    SensorID = 0x20
    Sensor = 0x20
    
    #board.devAddr = 0x60
    
    
    # Digital Reset except for registers 
    board.WriteI2C(UB953, 0x01, 0x02)   # Reset 953
    time.sleep(0.5)
    board.WriteI2C(UB954, 0x01, 0x01)   # Reset 954
    time.sleep(0.5)
    print "Devices Reset"
    
    
    print "954 Ref CLK = ",hex(board.ReadI2C(UB954, 0xA5, 0x01))
    
    # SER setup
    board.WriteI2C(UB954, 0x4C, 0x01) #0x4C is FPD3_PORT_SEL
    # Set up SER ID
    board.WriteI2C(UB954,0x5B,UB953ID)
    print "953 ID = ",hex(board.ReadI2C(UB954, 0x5b, 0x01))
    # Set up SER Alias ID
    board.WriteI2C(UB954,0x5C,UB953)
    print "953 Alias ID = ",hex(board.ReadI2C(UB954, 0x5c, 0x01))
    # Set up Slave/Camera ID
    board.WriteI2C(UB954,0x5D,SensorID)
    print "Sensor ID = ",hex(board.ReadI2C(UB954, 0x5d, 0x01))
    # Set up Slave/Camera Alias ID
    board.WriteI2C(UB954,0x65,Sensor)
    print "Sensor Alias ID = ",hex(board.ReadI2C(UB954, 0x65, 0x01))
    print ("------------------------------------------------------------------")
    time.sleep(0.5)
    
    # Read Receiver Lock Status
    #print ("Receiver Lock Status (0x04):", hex(board.ReadI2C(UB954, 0x04, 0x1)))
    #0x04 is DEVICE_STS of 954
    #print ("Should read 0xCF")
    #print ("------------------------------------------------------------------")
    #time.sleep(1)
    
    board.WriteI2C(UB954,0x58,0x5E) # Set up Back Channel Config (0x58)
    
    board.WriteI2C(UB954,0x1f,0x02) # 0x02: 800Mbps / 0x00: 1.6Gbps (0x1f)
    board.WriteI2C(UB954,0x20,0x20) # FWD_CTL1 FWD_PORT0_Enable (0x20)   954 MIPI OUT SETTING
    board.WriteI2C(UB954,0x21,0x04) # FWD_CTL1 FWD_PORT0_Enable (0x20)   954 MIPI OUT SETTING
    board.WriteI2C(UB954,0x33,0x23) # CSI_CTL 2LANE, Continuous CLK_Enable, CSI Output Enable (0x33)
    print ("------------------------------------------------------------------")
    time.sleep(1)
    
    
    board.WriteI2C(UB953,0x02,0x53) # SER  MIPI OUTPUT SETTING
    
    # Set GPIO2 and GPIO3 to outputs, where GPIO2 = RESET and GPIO3 = PWDN
    board.WriteI2C(UB953,0x0E,0xC0)
    # Set GPIO2 and GPIO3 to High - bring sensor out of power down mode
    board.WriteI2C(UB953,0x0D,0x0C)
    time.sleep(0.1)
    # Bring GPIO3 low to place sensor in reset
    board.WriteI2C(UB953,0x0D,0x08)
    time.sleep(0.5)
    # Bring GPIO3 high again to prepare sensor for initialization
    board.WriteI2C(UB953,0x0D,0x0C)
    time.sleep(0.5)
    print "S5K5E8 Reset"
    print ("------------------------------------------------------------------")
    
    print "Sensor ID = ",board.ReadI2C(SensorID, 0x00, [0x00, 0x01])
    print "Sensor ID = ",board.ReadI2C(SensorID, 0x00, [0x01, 0x01])
    print "SMIA VER  = ",board.ReadI2C(SensorID, 0x00, [0x04, 0x01])
    
    
    #Initialize S5K5E8 2100 x 1900
    board.WriteI2C(Sensor,0x33, [0x03,0x02])
    #print "Reg 0x3303 = ",board.ReadI2C(SensorID, 0x33, [0x03, 0x01])
    board.WriteI2C(Sensor,0x34, [0x00,0x01])
    #print "Reg 0x3400 = ",board.ReadI2C(SensorID, 0x34, [0x00, 0x01])
    board.WriteI2C(Sensor,0x39, [0x06,0x7E])
    #print "Reg 0x3906 = ",board.ReadI2C(SensorID, 0x39, [0x06, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x01,0x0F])
    #print "Reg 0x3c01 = ",board.ReadI2C(SensorID, 0x3c, [0x01, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x14,0x00])
    #print "Reg 0x3c14 = ",board.ReadI2C(SensorID, 0x3c, [0x14, 0x01])
    board.WriteI2C(Sensor,0x32, [0x35,0x08])
    #print "Reg 0x3235 = ",board.ReadI2C(SensorID, 0x32, [0x35, 0x01])
    board.WriteI2C(Sensor,0x30, [0x63,0x35])
    #print "Reg 0x3063 = ",board.ReadI2C(SensorID, 0x30, [0x63, 0x01])
    board.WriteI2C(Sensor,0x30, [0x7A,0x10])
    #print "Reg 0x307a = ",board.ReadI2C(SensorID, 0x30, [0x7a, 0x01])
    board.WriteI2C(Sensor,0x30, [0x7B,0x0E])
    #print "Reg 0x307b = ",board.ReadI2C(SensorID, 0x30, [0x7b, 0x01])
    board.WriteI2C(Sensor,0x30, [0x79,0x20])
    #print "Reg 0x3079 = ",board.ReadI2C(SensorID, 0x30, [0x79, 0x01])
    board.WriteI2C(Sensor,0x30, [0x70,0x05])
    #print "Reg 0x3070 = ",board.ReadI2C(SensorID, 0x30, [0x70, 0x01])
    board.WriteI2C(Sensor,0x30, [0x67,0x06])
    #print "Reg 0x3067 = ",board.ReadI2C(SensorID, 0x30, [0x67, 0x01])
    board.WriteI2C(Sensor,0x30, [0x71,0x62])
    #print "Reg 0x3071 = ",board.ReadI2C(SensorID, 0x30, [0x71, 0x01])
    board.WriteI2C(Sensor,0x30, [0x72,0x13])
    #print "Reg 0x3072 = ",board.ReadI2C(SensorID, 0x30, [0x72, 0x01])
    board.WriteI2C(Sensor,0x32, [0x03,0x43])
    #print "Reg 0x3203 = ",board.ReadI2C(SensorID, 0x32, [0x03, 0x01])
    board.WriteI2C(Sensor,0x32, [0x05,0x43])  
    #print "Reg 0x3205 = ",board.ReadI2C(SensorID, 0x32, [0x05, 0x01])
    board.WriteI2C(Sensor,0x32, [0x0B,0x42])
    #print "Reg 0x320b = ",board.ReadI2C(SensorID, 0x32, [0x0b, 0x01])
    board.WriteI2C(Sensor,0x30, [0x07,0x00])
    #print "Reg 0x3007 = ",board.ReadI2C(SensorID, 0x30, [0x07, 0x01])
    board.WriteI2C(Sensor,0x30, [0x08,0x14])
    #print "Reg 0x3008 = ",board.ReadI2C(SensorID, 0x30, [0x08, 0x01])
    board.WriteI2C(Sensor,0x30, [0x20,0x58])
    #print "Reg 0x3020 = ",board.ReadI2C(SensorID, 0x30, [0x20, 0x01])
    board.WriteI2C(Sensor,0x30, [0x0D,0x34])
    #print "Reg 0x300d = ",board.ReadI2C(SensorID, 0x30, [0x0d, 0x01])
    board.WriteI2C(Sensor,0x30, [0x0E,0x17])
    #print "Reg 0x300e = ",board.ReadI2C(SensorID, 0x30, [0x0e, 0x01])
    board.WriteI2C(Sensor,0x30, [0x21,0x02])
    #print "Reg 0x3021 = ",board.ReadI2C(SensorID, 0x30, [0x21, 0x01])
    board.WriteI2C(Sensor,0x30, [0x10,0x59])
    #print "Reg 0x3010 = ",board.ReadI2C(SensorID, 0x30, [0x10, 0x01])
    board.WriteI2C(Sensor,0x30, [0x02,0x01])
    #print "Reg 0x3002 = ",board.ReadI2C(SensorID, 0x30, [0x02, 0x01])
    board.WriteI2C(Sensor,0x30, [0x05,0x01])
    #print "Reg 0x3005 = ",board.ReadI2C(SensorID, 0x30, [0x05, 0x01])
    board.WriteI2C(Sensor,0x30, [0x08,0x04])
    #print "Reg 0x3008 = ",board.ReadI2C(SensorID, 0x30, [0x08, 0x01])
    board.WriteI2C(Sensor,0x30, [0x0F,0x70])
    #print "Reg 0x300f = ",board.ReadI2C(SensorID, 0x30, [0x0f, 0x01])
    board.WriteI2C(Sensor,0x30, [0x10,0x69])
    #print "Reg 0x3010 = ",board.ReadI2C(SensorID, 0x30, [0x10, 0x01])
    board.WriteI2C(Sensor,0x30, [0x17,0x10])
    #print "Reg 0x3017 = ",board.ReadI2C(SensorID, 0x30, [0x17, 0x01])
    board.WriteI2C(Sensor,0x30, [0x19,0x19])
    #print "Reg 0x3019 = ",board.ReadI2C(SensorID, 0x30, [0x19, 0x01])
    board.WriteI2C(Sensor,0x30, [0x0C,0x62])
    #print "Reg 0x300c = ",board.ReadI2C(SensorID, 0x30, [0x0c, 0x01])
    board.WriteI2C(Sensor,0x30, [0x64,0x10])
    #print "Reg 0x3064 = ",board.ReadI2C(SensorID, 0x30, [0x64, 0x01])
    board.WriteI2C(Sensor,0x32, [0x90,0x70])
    #print "Reg 0x3290 = ",board.ReadI2C(SensorID, 0x32, [0x90, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x08,0x0E])
    #print "Reg 0x3c08 = ",board.ReadI2C(SensorID, 0x3c, [0x08, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x09,0x10])
    #print "Reg 0x3c09 = ",board.ReadI2C(SensorID, 0x3c, [0x09, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x31,0x0D])
    #print "Reg 0x3c31 = ",board.ReadI2C(SensorID, 0x3c, [0x31, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x32,0xAC])
    #print "Reg 0x3c32 = ",board.ReadI2C(SensorID, 0x3c, [0x32, 0x01])
    board.WriteI2C(Sensor,0x01, [0x36,0x18])  #Mode setting
    #print "Reg 0x0136 = ",board.ReadI2C(SensorID, 0x01, [0x36, 0x01])
    board.WriteI2C(Sensor,0x01, [0x37,0x00])
    #print "Reg 0x0137 = ",board.ReadI2C(SensorID, 0x01, [0x37, 0x01])
    board.WriteI2C(Sensor,0x03, [0x05,0x06])
    #print "Reg 0x0305 = ",board.ReadI2C(SensorID, 0x03, [0x05, 0x01])
    board.WriteI2C(Sensor,0x03, [0x06,0x18])
    #print "Reg 0x0306 = ",board.ReadI2C(SensorID, 0x03, [0x06, 0x01])
    board.WriteI2C(Sensor,0x03, [0x07,0xAA])
    #print "Reg 0x0307 = ",board.ReadI2C(SensorID, 0x03, [0x07, 0x01])
    board.WriteI2C(Sensor,0x03, [0x08,0x32])
    #print "Reg 0x0308 = ",board.ReadI2C(SensorID, 0x03, [0x08, 0x01])
    board.WriteI2C(Sensor,0x03, [0x09,0x42])
    #print "Reg 0x0309 = ",board.ReadI2C(SensorID, 0x03, [0x09, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x1F,0x00])
    #print "Reg 0x3c1f = ",board.ReadI2C(SensorID, 0x3c, [0x1f, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x17,0x00])
    #print "Reg 0x3c17 = ",board.ReadI2C(SensorID, 0x3c, [0x17, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x0B,0x04])
    #print "Reg 0x3c0b = ",board.ReadI2C(SensorID, 0x3c, [0x0b, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x1C,0x47])
    #print "Reg 0x3c1c = ",board.ReadI2C(SensorID, 0x3c, [0x1c, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x1D,0x15])
    #print "Reg 0x3c1d = ",board.ReadI2C(SensorID, 0x3c, [0x1d, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x14,0x04])
    #print "Reg 0x3c14 = ",board.ReadI2C(SensorID, 0x3c, [0x14, 0x01])
    board.WriteI2C(Sensor,0x3C, [0x16,0x00])
    #print "Reg 0x3c16 = ",board.ReadI2C(SensorID, 0x3c, [0x16, 0x01])
    board.WriteI2C(Sensor,0x08, [0x20,0x03])
    #print "Reg 0x0820 = ",board.ReadI2C(SensorID, 0x08, [0x20, 0x01])
    board.WriteI2C(Sensor,0x08, [0x21,0x24])
    #print "Reg 0x0821 = ",board.ReadI2C(SensorID, 0x08, [0x21, 0x01])
    board.WriteI2C(Sensor,0x01, [0x12,0x0a])
    #print "Reg 0x0112 = ",board.ReadI2C(SensorID, 0x01, [0x12, 0x01])
    board.WriteI2C(Sensor,0x01, [0x13,0x0a])
    #print "Reg 0x0113 = ",board.ReadI2C(SensorID, 0x01, [0x13, 0x01])
    board.WriteI2C(Sensor,0x01, [0x14,0x01])
    #print "Reg 0x0114 = ",board.ReadI2C(SensorID, 0x01, [0x14, 0x01])
    board.WriteI2C(Sensor,0x03, [0x44,0x00])
    #print "Reg 0x0344 = ",board.ReadI2C(SensorID, 0x03, [0x44, 0x01])
    board.WriteI2C(Sensor,0x03, [0x45,0x00])
    #print "Reg 0x0345 = ",board.ReadI2C(SensorID, 0x03, [0x45, 0x01])
    board.WriteI2C(Sensor,0x03, [0x46,0x00])
    #print "Reg 0x0346 = ",board.ReadI2C(SensorID, 0x03, [0x46, 0x01])
    board.WriteI2C(Sensor,0x03, [0x47,0x00])
    #print "Reg 0x0347 = ",board.ReadI2C(SensorID, 0x03, [0x47, 0x01])
    board.WriteI2C(Sensor,0x03, [0x48,0x08])
    #print "Reg 0x0348 = ",board.ReadI2C(SensorID, 0x03, [0x48, 0x01])
    board.WriteI2C(Sensor,0x03, [0x49,0x33])  
    #print "Reg 0x0349 = ",board.ReadI2C(SensorID, 0x03, [0x49, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4A,0x07])
    #print "Reg 0x034a = ",board.ReadI2C(SensorID, 0x03, [0x4a, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4B,0x6b])
    #print "Reg 0x034b = ",board.ReadI2C(SensorID, 0x03, [0x4b, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4C,0x08])
    #print "Reg 0x034c = ",board.ReadI2C(SensorID, 0x03, [0x4c, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4D,0x34])
    #print "Reg 0x034d = ",board.ReadI2C(SensorID, 0x03, [0x4d, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4E,0x07])
    #print "Reg 0x034e = ",board.ReadI2C(SensorID, 0x03, [0x4e, 0x01])
    board.WriteI2C(Sensor,0x03, [0x4F,0x6c])
    #print "Reg 0x034f = ",board.ReadI2C(SensorID, 0x03, [0x4f, 0x01])
    board.WriteI2C(Sensor,0x09, [0x00,0x00])
    #print "Reg 0x0900 = ",board.ReadI2C(SensorID, 0x09, [0x00, 0x01])
    board.WriteI2C(Sensor,0x09, [0x01,0x00])
    #print "Reg 0x0901 = ",board.ReadI2C(SensorID, 0x09, [0x01, 0x01])
    board.WriteI2C(Sensor,0x03, [0x81,0x01])
    #print "Reg 0x0381 = ",board.ReadI2C(SensorID, 0x03, [0x81, 0x01])
    board.WriteI2C(Sensor,0x03, [0x83,0x01])
    #print "Reg 0x0383 = ",board.ReadI2C(SensorID, 0x03, [0x83, 0x01])
    board.WriteI2C(Sensor,0x03, [0x85,0x01])
    #print "Reg 0x0385 = ",board.ReadI2C(SensorID, 0x03, [0x85, 0x01])
    board.WriteI2C(Sensor,0x03, [0x87,0x01])
    #print "Reg 0x0387 = ",board.ReadI2C(SensorID, 0x03, [0x87, 0x01])
    board.WriteI2C(Sensor,0x33, [0x01,0x00])
    #print "Reg 0x3301 = ",board.ReadI2C(SensorID, 0x33, [0x01, 0x01])
    board.WriteI2C(Sensor,0x33, [0x06,0x00])
    #print "Reg 0x3306 = ",board.ReadI2C(SensorID, 0x33, [0x06, 0x01])
    board.WriteI2C(Sensor,0x33, [0x07,0x00])
    #print "Reg 0x3307 = ",board.ReadI2C(SensorID, 0x33, [0x07, 0x01])
    board.WriteI2C(Sensor,0x33, [0x08,0x0A])
    #print "Reg 0x3308 = ",board.ReadI2C(SensorID, 0x33, [0x08, 0x01])
    board.WriteI2C(Sensor,0x33, [0x09,0x2F])
    #print "Reg 0x3309 = ",board.ReadI2C(SensorID, 0x33, [0x09, 0x01])
    board.WriteI2C(Sensor,0x33, [0x0A,0x01])
    #print "Reg 0x330a = ",board.ReadI2C(SensorID, 0x33, [0x0a, 0x01])
    board.WriteI2C(Sensor,0x33, [0x0B,0x01])
    #print "Reg 0x330b = ",board.ReadI2C(SensorID, 0x33, [0x0b, 0x01])
    board.WriteI2C(Sensor,0x33, [0x0E,0x00])
    #print "Reg 0x330e = ",board.ReadI2C(SensorID, 0x33, [0x0e, 0x01])
    board.WriteI2C(Sensor,0x33, [0x0F,0x00])
    #print "Reg 0x330f = ",board.ReadI2C(SensorID, 0x33, [0x0f, 0x01])
    board.WriteI2C(Sensor,0x33, [0x10,0x07])
    #print "Reg 0x3310 = ",board.ReadI2C(SensorID, 0x33, [0x10, 0x01])
    board.WriteI2C(Sensor,0x33, [0x11,0xA7])
    #print "Reg 0x3311 = ",board.ReadI2C(SensorID, 0x33, [0x11, 0x01])
    board.WriteI2C(Sensor,0x33, [0x12,0x01])
    #print "Reg 0x3312 = ",board.ReadI2C(SensorID, 0x33, [0x12, 0x01])
    board.WriteI2C(Sensor,0x33, [0x13,0x01])
    #print "Reg 0x3313 = ",board.ReadI2C(SensorID, 0x33, [0x13, 0x01])
    board.WriteI2C(Sensor,0x33, [0x21,0x04])
    #print "Reg 0x3321 = ",board.ReadI2C(SensorID, 0x33, [0x21, 0x01])
    board.WriteI2C(Sensor,0x03, [0x40,0x07])
    #print "Reg 0x3340 = ",board.ReadI2C(SensorID, 0x03, [0x40, 0x01])
    board.WriteI2C(Sensor,0x03, [0x41,0xc0])
    #print "Reg 0x0341 = ",board.ReadI2C(SensorID, 0x03, [0x41, 0x01])
    board.WriteI2C(Sensor,0x03, [0x42,0x0B])
    #print "Reg 0x0342 = ",board.ReadI2C(SensorID, 0x03, [0x42, 0x01])
    board.WriteI2C(Sensor,0x03, [0x43,0x28])
    #print "Reg 0x0343 = ",board.ReadI2C(SensorID, 0x03, [0x43, 0x01])
    board.WriteI2C(Sensor,0x02, [0x00,0x00])
    #print "Reg 0x0200 = ",board.ReadI2C(SensorID, 0x02, [0x00, 0x01])
    board.WriteI2C(Sensor,0x02, [0x01,0x00])
    #print "Reg 0x0201 = ",board.ReadI2C(SensorID, 0x02, [0x01, 0x01])
    board.WriteI2C(Sensor,0x02, [0x02,0x07])
    #print "Reg 0x0202 = ",board.ReadI2C(SensorID, 0x02, [0x02, 0x01])
    board.WriteI2C(Sensor,0x02, [0x03,0xba])
    #print "Reg 0x0203 = ",board.ReadI2C(SensorID, 0x02, [0x03, 0x01])
    board.WriteI2C(Sensor,0x02, [0x04,0x00])
    #print "Reg 0x0204 = ",board.ReadI2C(SensorID, 0x02, [0x04, 0x01])
    board.WriteI2C(Sensor,0x02, [0x05,0x80])
    #print "Reg 0x0205 = ",board.ReadI2C(SensorID, 0x02, [0x05, 0x01])
    
    board.WriteI2C(Sensor,0x01, [0x00,0x01])
    print "Reg 0x0100 = ",board.ReadI2C(SensorID, 0x01, [0x00, 0x01])
    time.sleep(1)
    
    #time.sleep(10)
    #board.WriteI2C(Sensor,0x01, [0x00,0x00])
    #print "Reg 0x0100 = ",board.ReadI2C(SensorID, 0x01, [0x00, 0x01])
    
    #repeat as required
    # Seeing if CSI data is transmitting
    print "CSI Error = ",hex(board.ReadI2C(UB953, 0x5C, 1))
    print "Packet Header data = ", hex(board.ReadI2C(UB953, 0x61, 1))
    print "Packer Header Word Count 0 = ", hex(board.ReadI2C(UB953, 0x62, 1))
    print "Packer Header Word Count 1 = ", hex(board.ReadI2C(UB953, 0x63, 1))

    3. in your case, the image sensor's MIPI Clock is set to 836MHz, how many lanes are used here? if 4lanes are designed between sensor and 953, this doesn't work since the 953's input CSI2 bandwidth is over spec. (l953's input CSI2 bandwidth is limited at 25(external clock freq.) x32 x4 = 3.2Gbps in the same time the FPD-Link rate should be >=3.2Gbps *10/8 = 4Gbps.

    Image sensor's has 2 lanes , i think it no problems.

  • Hi Chae,

    1. you can read the reg. in the "scripting' tap in ALP tool, then you can use the command like below in your script.

    # Read Receiver Lock Status
    hex(board.ReadI2C(UB954, 0x04, 0x1))

    # Read sensor ID

    hex(board.ReadI2C(SensorID, 0x00, [0x01, 0x01]))

    2. in this script, it has "reset", so the link could be unlocked for 1 or 2 times based on ALP error sampling time.

    # Digital Reset except for registers 

    board.WriteI2C(UB953, 0x01, 0x02) # Reset 953
    time.sleep(0.5)
    board.WriteI2C(UB954, 0x01, 0x01) # Reset 954
    time.sleep(0.5)

    3. that is ok for 2lanes *836Mbps. btw, what is the FC rate? and what is the 954 output CSI2 rate? 

    best regards,

    Steven

  • Hello Steven,

    1. you can read the reg. in the "scripting' tap in ALP tool, then you can use the command like below in your script.

    # Read Receiver Lock Status
    hex(board.ReadI2C(UB954, 0x04, 0x1))

    # Read sensor ID
    hex(board.ReadI2C(SensorID, 0x00, [0x01, 0x01]))

    Do you mean i can read status reg in ALP tool with Read script ?
    but, ALP software occured i2c error in host processor connect with 954 EVM board.
    how to setup connect host processor without confliction I2C?

    3. that is ok for 2lanes *836Mbps. btw, what is the FC rate? and what is the 954 output CSI2 rate?

    FPD3_PCLK was setup 100MHz
    the BC rate was setup 50MHz.
    the 954 output CSI2 rate was setup 800Mbps.

    Do I need to set the mipi clock to 800Mbps accurately?


    I was set bit FWD_SYNC_AS_AVAIL in FWD_CTL2 .
    Is it setup nessesary in synchronous mode?

    Best Regards,
    Jongpil Chae

  • Hi Jongpil, 

    1. Yes you can read the register values through the register tab, but please make sure to select the RX port at the top. How are you connecting the 954 EVM? Are you using the external USB2ANY or are you connecting the mini USB cable directly? 

    3. The CSI-2 output rate on the 954 has discrete rates that should be set in register 0x1F. It looks like you only have 1x953 to 1x954 so you do not need to set that bit. 

    Thanks 
    Sally