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: Camera sensor to serializer i2c issue

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

Hello,

I'm developing camera sensor with serdes EVM (DS90UB954/DS90UB953A).

my issue is  DS90UB954 do not read camera sensor register with i2c. 

i was test with ALP script as shown below. 

please, give me any advise. 

# Set up IDs
UB954 = 0x60
UB953ID = 0x30
UB953 = 0x18
SensorID = 0x10
Sensor = 0x00

# Set up Port0
board.WriteI2C(UB954, 0x4C, 0x01)

# Set up Back Channel Config (0x58)
board.WriteI2C(UB954,0x58,0x5E)

# Set up SER ID
#board.WriteI2C(UB954,0x5B,UB953ID)
# Set up SER Alias ID
board.WriteI2C(UB954,0x5C,UB953)
# Set up Slave/Camera ID
board.WriteI2C(UB954,0x5D,SensorID)
# Set up Slave/Camera Alias ID
board.WriteI2C(UB954,0x65,Sensor)

# 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(1)
# Bring GPIO3 high again to prepare sensor for initialization
#board.WriteI2C(UB953,0x0D,0x0C)
print "Sensor Reset"

#Initialize Sensor
#get configuration requirements from sensor manufacturer & write to sensor

#board.WriteI2C(Sensor, regAddr, value) #if two byte address are required use, board.WriteI2C(Sensor, regAddr byte 1, [regAddr byte 2, value])

print "Sensor ID = ",board.ReadI2C(SensorID, 0x00, [0x00])
print "Sensor ID = ",board.ReadI2C(SensorID, 0x00, [0x01])

 

  • Hi Jongpil,

    Are you getting lock? You can read register 0x4D to check for lock status?

    When talking to the camera, use the alias ID you set. In your code you set it to 0x00. I would advice a different i2c address.

    Best,

    Jiashow

  • Hello.  Jiashow,

    I checked 0x4D register. 

    Lock status is set  as shown below.

     Could you explain me , 

     how to setup  unlock status.   

     and  I don't understand   what is different 0x5D  slaveID  and 0x65 slaveAlias regiser.    

     camera sensor ID is 0x10 .  

     you mean  0x65 register put 0x10.   

     what value should i put in the 0x5D register? 

     and also i checked  i2c signal on camera sensor board.  it was not any change  status on signals (SCL , SDA). 

     I' m  waiting for your answer.  

    Best,

    Jongpil Chae

     

     

  • Hi Jongpil,

    The image link is broken. What value do you read in reg 0x4D?

    Reg 0x5D is the real I2C address of the camera. You need to look up the camera you're using and set the I2C address accordingly.

    Reg 0x65 is the alias (arbitrary ID) of the camera. 0x65 can be set to any even number you want.

    Once you set the alias ID, you talk to the camera only using the alias ID.

  • Hello.  Jiashow, 

    Thank you for your explain about slave id.  

    Read issue is caused by wrong  i2c address. 

    real access  i2c address is  0x10  but,  Reg 0x5d  want to  7bit address.  so  i change  address  0x20. 

    so i read the id register as shown  below.   

    Let me know how to camera sensor to send mipi data. 

    and Is possible to display camera image on ALP SW?

    I attached test script  as shown below.  

      

    import time
    #reset and initialize sensor from DES using 953
    
    # Set up IDs
    UB954 = 0x60
    UB953ID = 0x30
    UB953 = 0x18
    SensorID = 0x20
    Sensor = 0x20
    
    # Set up Port0
    board.WriteI2C(UB954, 0x4C, 0x01)
    
    # Set up Back Channel Config (0x58)
    board.WriteI2C(UB954,0x58,0x5E)
    
    # Set up SER ID
    #board.WriteI2C(UB954,0x5B,UB953ID)
    # Set up SER Alias ID
    board.WriteI2C(UB954,0x5C,UB953)
    # Set up Slave/Camera ID
    board.WriteI2C(UB954,0x5D,SensorID)
    # Set up Slave/Camera Alias ID
    board.WriteI2C(UB954,0x65,Sensor)
    
    board.WriteI2C(UB954,0x7C,0x00) #PORT SELECT 
    
    board.WriteI2C(UB954,0x6E,0x99) #BC GPIO
    
    board.WriteI2C(UB954,0x70,0x1F) #RAW ID
    
    board.WriteI2C(UB954,0x71,0x1F) #RAW ID
    
    board.WriteI2C(UB954,0x7C,0xC0) #RAW 10 8BIT
    
    board.WriteI2C(UB954,0x32,0x01) #CSI TX PORT1
    
    board.WriteI2C(UB954,0x33,0x23) #2LANES , CSI OUT ENABLE
    
    board.WriteI2C(UB954,0x20,0x0) #CSI FORWARDING
    
    time.sleep(1)
    
    
    # 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(1)
    # Bring GPIO3 high again to prepare sensor for initialization
    board.WriteI2C(UB953,0x0D,0x0C)
    time.sleep(0.1)
    
    #board.WriteI2C(UB953,0x1C,0x3F)
    #board.WriteI2C(UB953,0x1E,0x03)
    board.WriteI2C(UB953,0x49,0x28)        # BIST CRC Clear,  CRC error Clear
    board.WriteI2C(UB954,0x1F,0x03)
    print "Sensor Reset"
    
    # Set up LOCK_STS Disable
    #print ("Receiver Lock Status (0x04):", hex(board.ReadI2C(UB954, 0x04, 0x1)))
    #Initialize Sensor
    #get configuration requirements from sensor manufacturer & write to sensor
    
    #board.WriteI2C(Sensor, regAddr, value) #if two byte address are required use, board.WriteI2C(Sensor, regAddr byte 1, [regAddr byte 2, value])
    
    print "Sensor ID = ",board.ReadI2C(Sensor, 0x00, [0x00, 0x01])
    print "Sensor ID = ",board.ReadI2C(Sensor, 0x00, [0x01, 0x01])
    print "SMIA VER  = ",board.ReadI2C(Sensor, 0x00, [0x04, 0x01])
    
    print "S5K5E8 Reset"
    
    #Initialize S5K5E8
    board.WriteI2C(SensorID,0x01, [0x00,0x00])
    time.sleep(0.1)
    
    # Mode setup_1920x1080
    board.WriteI2C(SensorID,0x33, [0x03,0x02])
    board.WriteI2C(SensorID,0x34, [0x00,0x01])
    board.WriteI2C(SensorID,0x39, [0x06,0x7E])
    board.WriteI2C(SensorID,0x3C, [0x01,0x0F])
    board.WriteI2C(SensorID,0x3C, [0x14,0x00])
    board.WriteI2C(SensorID,0x32, [0x35,0x08])
    board.WriteI2C(SensorID,0x30, [0x63,0x35])
    board.WriteI2C(SensorID,0x30, [0x7A,0x10])
    board.WriteI2C(SensorID,0x30, [0x7B,0x0E])
    board.WriteI2C(SensorID,0x30, [0x79,0x20])
    board.WriteI2C(SensorID,0x30, [0x70,0x05])
    board.WriteI2C(SensorID,0x30, [0x67,0x06])
    board.WriteI2C(SensorID,0x30, [0x71,0x62])
    board.WriteI2C(SensorID,0x30, [0x72,0x13])
    board.WriteI2C(SensorID,0x32, [0x03,0x43])
    board.WriteI2C(SensorID,0x32, [0x05,0x43])
    board.WriteI2C(SensorID,0x32, [0x0B,0x42])
    board.WriteI2C(SensorID,0x30, [0x07,0x00])
    board.WriteI2C(SensorID,0x30, [0x08,0x14])
    board.WriteI2C(SensorID,0x30, [0x20,0x58])
    board.WriteI2C(SensorID,0x30, [0x0D,0x34])
    board.WriteI2C(SensorID,0x30, [0x0E,0x17])
    board.WriteI2C(SensorID,0x30, [0x21,0x02])
    board.WriteI2C(SensorID,0x30, [0x10,0x59])
    board.WriteI2C(SensorID,0x30, [0x02,0x01])
    board.WriteI2C(SensorID,0x30, [0x05,0x01])
    board.WriteI2C(SensorID,0x30, [0x08,0x04])
    board.WriteI2C(SensorID,0x30, [0x0F,0x70])
    board.WriteI2C(SensorID,0x30, [0x10,0x69])
    board.WriteI2C(SensorID,0x30, [0x17,0x10])
    board.WriteI2C(SensorID,0x30, [0x19,0x19])
    board.WriteI2C(SensorID,0x30, [0x0C,0x62])
    board.WriteI2C(SensorID,0x30, [0x64,0x10])
    board.WriteI2C(SensorID,0x32, [0x90,0x70])
    board.WriteI2C(SensorID,0x3C, [0x08,0x0E])
    board.WriteI2C(SensorID,0x3C, [0x09,0x10])
    board.WriteI2C(SensorID,0x3C, [0x31,0x0D])
    board.WriteI2C(SensorID,0x3C, [0x32,0xAC])
    
    #Mode setting
    board.WriteI2C(SensorID,0x01, [0x36,0x18])
    board.WriteI2C(SensorID,0x01, [0x37,0x00])
    board.WriteI2C(SensorID,0x03, [0x05,0x06])
    board.WriteI2C(SensorID,0x03, [0x06,0x18])
    board.WriteI2C(SensorID,0x03, [0x07,0xAA])
    board.WriteI2C(SensorID,0x03, [0x08,0x34])
    board.WriteI2C(SensorID,0x03, [0x09,0x42])
    board.WriteI2C(SensorID,0x3C, [0x1F,0x00])
    board.WriteI2C(SensorID,0x3C, [0x17,0x00])
    board.WriteI2C(SensorID,0x3C, [0x0B,0x04])
    board.WriteI2C(SensorID,0x3C, [0x1C,0x47])
    board.WriteI2C(SensorID,0x3C, [0x1D,0x15])
    board.WriteI2C(SensorID,0x3C, [0x14,0x04])
    board.WriteI2C(SensorID,0x3C, [0x16,0x00])
    board.WriteI2C(SensorID,0x08, [0x20,0x03])
    board.WriteI2C(SensorID,0x08, [0x21,0x44])
    board.WriteI2C(SensorID,0x01, [0x12,0x0A])   #RAW Format
    board.WriteI2C(SensorID,0x01, [0x13,0x0A])   #RAW Format
    board.WriteI2C(SensorID,0x03, [0x40,0x04])
    board.WriteI2C(SensorID,0x03, [0x41,0x51])
    board.WriteI2C(SensorID,0x03, [0x42,0x0B])
    board.WriteI2C(SensorID,0x03, [0x43,0x28])
    board.WriteI2C(SensorID,0x02, [0x00,0x00])
    board.WriteI2C(SensorID,0x02, [0x01,0x00])
    board.WriteI2C(SensorID,0x02, [0x02,0x03])
    board.WriteI2C(SensorID,0x02, [0x03,0xDE])
    board.WriteI2C(SensorID,0x02, [0x04,0x00])
    board.WriteI2C(SensorID,0x02, [0x05,0x80])
    
    board.WriteI2C(SensorID,0x06, [0x01,0x02])
    
    print "S5K5E8 initialization"
    time.sleep(0.5)
    
    board.WriteI2C(SensorID,0x3C, [0x16,0x00])
    board.WriteI2C(SensorID,0x3C, [0x0D,0x04])
    board.WriteI2C(SensorID,0x01, [0x00,0x01])
    
    
    # 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))

    Best,

  • Hello,

    It looks like you're able to access the I2C address of the sensor:

    print "Sensor ID = ",board.ReadI2C(Sensor, 0x00, [0x00, 0x01])
    print "Sensor ID = ",board.ReadI2C(Sensor, 0x00, [0x01, 0x01])
    print "SMIA VER  = ",board.ReadI2C(Sensor, 0x00, [0x04, 0x01])

    In order to have the imager to start sending MIPI data, you would need an initialization script from the camera vendor. You might want to follow up with them on that.

    ALP doesn't display actual CSI data, but it can detect the camera resolution and payload from the SER and DES registers.

    Best,

    Jiashow

  • Hello, 

    As you mentioned, i added the camera sensor initialization script to start sending MIPI data.

    I sent the streaming start command to camera register.
    but Information tab doesn't any changed "current RX port Status".
    I think if streaming function set on to camera sensor register then Horizontal and Vertical values of current RX Port Status information must changed.

    I checked changing status "Pass Sts of Current CSI TX Status" as shown below.

    Is it possible to MIPI data test without isp processor?
    now i test only camera sensor part is attached.

    camera sensor + ds90ub953 ----> ds90ub954 + PC (ALP)

    Please, let me know How to detect the camera resolution and payload from SER and DES registers.

    Best,

    Jongpil Chae

  • Hi Jongpil,

    It doesn't look like the camera sensor is sending MIPI data. Right now your "Pass Threshold" (on ALP) is disabled. If you change it to one frame, pass should not assert anymore.

    If camera sensor is sending proper MIPI data, you should see the horizontal and vertical resolution. Right now it says "0 byte" and "0 lines".

    Best,

    Jiashow 

  • Hello  Jiashow,

     you mean if "pass threshold" set to one frame then to display Horizontal, Vertical Resoultion on ALP?

     please , review my sensor setup workflow. 

     1. SER/DES/ Sensor ID setup 

      board.WriteI2C(UB954,0x5B,UB953ID)  

      board.WriteI2C(UB954,0x5C,UB953)

      board.WriteI2C(UB954,0x5D,sensorID)

      board.WriteI2C(UB954,0x65,sensorAlias) 

     2. DES setup 

      board.WriteI2C(UB954, 0x4C, 0x01)    # Set up Port0

      board.WriteI2C(UB954,0x58,0x5E)      # Set up Back Channel Config (0x58)

     3. SER GPIO - SENSOR  RESET  

      board.WriteI2C(UB953,0x0E,0xC0)

      board.WriteI2C(UB953,0x0D,0x0C)
      time.sleep(0.1)
      board.WriteI2C(UB953,0x0D,0x08)
      time.sleep(1)
      board.WriteI2C(UB953,0x0D,0x0C)

     4. Sensor Register initialize  (16bit address , 8bit data)

       board.WriteI2C(sensorAlias,0x30, [0x13,0x01])

        ....

       board.WriteI2C(SensorAlias,0x01, [0x00,0x01])   #mipi streaming start 

     

      5. Check Information tap "Current RX Port Status"  on ALP  

       

       I checked mipi data sent to Serializer with ocsilloscope after step4 finished.

       What should i check to send mipi data?

  • Hello,

    If there's CSI data available at the serialzier, you should see the resolution of the camera (regardless whether you configure PASS or not). You can probe the MIPI data lanes coming from camera to verify if there's MIPI activities.

    This is what I recommend:

     1. SER/DES/ Sensor ID setup 

      board.WriteI2C(UB954, 0x4C, 0x01)    # Set up Port0 This goes first

      board.WriteI2C(UB954,0x5B,UB953ID)  

      board.WriteI2C(UB954,0x5C,UB953)

      board.WriteI2C(UB954,0x5D,sensorID)

      board.WriteI2C(UB954,0x65,sensorAlias) 

     2. DES setup 

      board.WriteI2C(UB954,0x58,0x5E)      # Set up Back Channel Config (0x58)

     3. SER GPIO - SENSOR  RESET  

      board.WriteI2C(UB953,0x0E,0xC0)

      board.WriteI2C(UB953,0x0D,0x0C)
      time.sleep(0.1)
      board.WriteI2C(UB953,0x0D,0x08)
      time.sleep(1)
      board.WriteI2C(UB953,0x0D,0x0C) This depends on which serializer GPIOs connect to the sensor reset pin. You might want to double check this

     4. Sensor Register initialize  (16bit address , 8bit data)

       board.WriteI2C(sensorAlias,0x30, [0x13,0x01])

        ....

       board.WriteI2C(SensorAlias,0x01, [0x00,0x01])   #mipi streaming start 

  • Hello  Jiashow , 

    Thank you for your help.  

    As you recommand , i edited script. 

    I found miss the setting for Forwarding Register of DES and  General_CFG of SER.

    I edited camera sensor resolution 1280x720

    It displayed information tab in ALP  as shown below 

    I think Vertical value is right (720).
    but Horizontal value is wrong (1600 --> 1280) .

    sensor output register value is 1280.

    What register is adjust to size MIPI data packet coming from sensor output?

    Best,

    Jongpil Chae

  • Hi Jongpil,

    Horizontal Res (pixels) = Horizontal line (in byte) * 8 (bits/byte) / # bpp 

    Best,

    Jiashow