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-Q1: Register configuration suggestion

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

Hi team

Customer is going to use our 953/954 in their camera module. But they need to configure the register based on below requirement.

The CSI_CLK output from the 954 is dual-clock on the hardware side. However, since the customer's previous camera configurations all used single-clock, please configure the CSI_CLK as single-clock. The host side provides an external sync signal to GPIO_0 (Pin 17, FSIN) of the 953, a reset signal to GPIO_1 (Pin 18, RST), and a write protection signal for FLASH to GPIO_2 (Pin 27, WP). The reset signal pulse width is 50 µs, and the external sync signal frequency is 30 Hz. 

Can you please share the recommended register configuation file?

Br

Hanbing

  • Hi Hanbing, 

    To help with script configurations, we will need to know if the 953 is operating in synchronous or non-synchronous mode. 

    If synchronous mode, please include 954 REFCLK frequency. 

    Additionally, I am not sure what you mean by single vs dual clock for 953. Are you referring to the CLK0 and CLK1 pins on the 954? CLK1 pins by default are not used. The intention is to use these pins for within-port replication. 

    Best,

    Zoe

  • Hi All,

    The 953 is operating in synchronous mode, and the reference clock (REFCLK) frequency for the 954 is 25 MHz. Please see the attached images below.

    Regarding the 'dual clock for 953', yes,it refers to the CLK0 and CLK1 pins on the 954。

    Best,

    Redon

  • Hi Redon,

    From the initial post, it was my understanding the FrameSync signal and reset were being input to the UB954. Is this accurate? GPIOs are currently floating on the 954 based on the schematic. Are you intending to drive these signals high through register programming exclusively? 

    Best,

    Zoe 

  • Hi Zoe,

    Based on the UB954 schematic, these GPIO pins are floating. Please drive these signals exclusively through register programming


    Best,
    Redon

  • Hi Zoe,

    As discussed, please provide us with the register configuration based on the following information:

    UB954 REFCLK: 25 MHz
    UB954 GPIOs: Currently floating on the hardware, must be driven exclusively via I2C register programming.
    UB953 GPIO Mapping / Functions:
    GPIO_0 (Pin 17): External FrameSync (FSIN) signal output at 30 Hz
    GPIO_1 (Pin 18): Reset signal (RST) output with a 50 µs pulse width
    GPIO_2 (Pin 27): FLASH Write Protection (WP)

    Best,
    Redon

  • Hi Redon, 

    I was on business travel the previous week and wasn't able to complete this request. Below is an example script but please note the GPIO_1 and GPIO_2 programming will need to be modified based on your system. I provided an example where both pins are held high at the same point in time and then driven low. Default for the pin is LOW. Image sensor start up will also need to be integrated depending on your sensor. 

    """
      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 = 0xDC
    Sensor = 0xC4
    
    # 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.WriteReg(0x4C,0x01) # RX0
    board.WriteReg(0x6E,0x8A) # BC_GPIO_CTL0: FrameSync signal to GPIO0
    
    board.WriteReg(0x4C,0x12) # RX1
    board.WriteReg(0x6E,0x8A) # BC_GPIO_CTL0: FrameSync signal to GPIO0
    
    board.WriteReg(0x19,0x6C)
    board.WriteReg(0x1a,0x81)
    board.WriteReg(0x1b,0x6C)
    board.WriteReg(0x1c,0x81)
    
    # To configure FS_GEN_ENABLE
    print  "Enable FrameSync"
    board.WriteReg(0x18,0x01)
    time.sleep(0.5)
    
    print  "FrameSync signal; Device Status; Enabled"
    board.WriteReg(0x10,0x91)
    time.sleep(0.5)
    
    # Set GPIO0 / GPIO1 / GPIO2 to outputs, where GPIO0 = FrameSync GPIO1 = Reset GPIO2 = WP
    board.WriteI2C(UB953,0x0E,0x70)
    ############# EXAMPLE GPIO PROGRAMMING #################
    # Set GPIO1 and GPIO2 to High - bring sensor out of power down mode
    board.WriteI2C(UB953,0x0D,0x16)
    time.sleep(0.1)
    # Bring GPIO1/GPIO2 low 
    board.WriteI2C(UB953,0x0D,0x10)
    time.sleep(1)
    
    #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])
    
    #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))

    Best,

    Zoe

  • As this is our first time integrating the TI UB953/UB954 architecture on our current platform, in order to fully port the code into our driver code structure and ensure the image is successfully brought up, could you please provide us with the most complete register configuration sequence?

  • Hi, 

    Per your ask, I added the CSI transmitter config example and a place holder for the serializer configs. Since our systems will be different, I can not do any additional configurations. Timing delays for I2C transactions to drive the GPIO high or low will depend on your I2C controller. 

    Sensor start-up will need to be provided from your sensor vendor. 

    I am happy to help if there are any specific questions regarding what has been provided. We also have examples for different sensors provided when downloading ALP here: "C:\Program Files (x86)\Texas Instruments\Analog LaunchPAD v1.57.0010\PreDefScripts\DS90UB954\ovt_1280_1080_30fps_REMOTE_RevE2_ID7a.py" 

    """
      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 foI2Coing 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 I2Carding 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 = 0xDC
    Sensor = 0xC4
    
    # 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(0x4C,0x01) # RX0
    board.WriteI2C(0x6E,0x8A) # BC_GPIO_CTL0: FrameSync signal to GPIO0
    
    board.WriteI2C(0x4C,0x12) # RX1
    board.WriteI2C(0x6E,0x8A) # BC_GPIO_CTL0: FrameSync signal to GPIO0
    
    board.WriteI2C(0x19,0x6C)
    board.WriteI2C(0x1a,0x81)
    board.WriteI2C(0x1b,0x6C)
    board.WriteI2C(0x1c,0x81)
    
    # To configure FS_GEN_ENABLE
    print  "Enable FrameSync"
    board.WriteI2C(0x18,0x01)
    time.sleep(0.5)
    
    print  "FrameSync signal; Device Status; Enabled"
    board.WriteI2C(0x10,0x91)
    time.sleep(0.5)
    
    # Configure SER CSI receiver - default is 4 lane non continuous mode - maintain strap I2C voltage
    board.WriteI2C(UB953,0x02,value)
    
    # Set GPIO0 / GPIO1 / GPIO2 to outputs, where GPIO0 = FrameSync GPIO1 = Reset GPIO2 = WP
    board.WriteI2C(UB953,0x0E,0x70)
    ############# EXAMPLE GPIO PROGRAMMING #################
    # Set GPIO1 and GPIO2 to High - bring sensor out of power down mode
    board.WriteI2C(UB953,0x0D,0x16)
    time.sleep(0.1)
    # Bring GPIO1/GPIO2 low 
    board.WriteI2C(UB953,0x0D,0x10)
    time.sleep(1)
    
    #Initialize Sensor
    #get configuration requirements from sensor manufacturer & write to sensor
    
    board.WriteI2C(Sensor, I2CAddr, value) #if two byte address are required use, board.WriteI2C(Sensor, I2CAddr byte 1, [I2CAddr byte 2, value])
    
    #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))
    
    print "*** RX0 VC=0 ***"
    board.WriteI2C(UB954,0x4C,0x01) # RX0
    board.WriteI2C(UB954,0x70,0x1F) # VC0
    
    print "*** RX1 VC=1 ***"
    board.WriteI2C(UB954,0x4C,0x12) # RX1
    board.WriteI2C(UB954,0x70,0x5F) # VC1
    
    print "configure continuous clock mode"
    board.WriteI2C(UB954,0x33,0x03)
    
    print  "***RR_FWD"
    board.WriteI2C(UB954,0x21,0x03) # RR_FWD
    time.sleep(0.5)
    
    print  "***FWD_PORT all RX to CSI0"
    board.WriteI2C(UB954,0x20,0x00) # forwarding of all RX to CSI0
    time.sleep(0.5)
    
    
    

    Best,

    Zoe

  • Hi Zoe,
    Based on our experience with other camera vendors, the register configuration usually contains hundreds of lines (please see the attached picture). Therefore, I believe the TI register configuration provided previously is incomplete.
    Our camera modules will arrive next week. To prepare for the bring-up, I would like to consult with you on some debugging methods in advance:
    1.How can we read the link LOCK status via registers?
    2.How can we verify if valid video data is being successfully received?"
    Best,
    Redon

  • Hi Redon, 

    Based on our experience with other camera vendors, the register configuration usually contains hundreds of lines (please see the attached picture). Therefore, I believe the TI register configuration provided previously is incomplete.

    Yes, this is correct. Our team will not be able to provide these configurations as they are sensor specific. Please reach out to the camera vendor for these purposes. A place holder is left in the script at "#Initialize sensor" line 95 and below. 

    1.How can we read the link LOCK status via registers?

    For RX port 0: 

    board.WriteI2C(UB954,0x4C,0x01) # RX0

    board.ReadI2C(UB954,0x4D)

    For RX port 1: 

    board.WriteI2C(UB954,0x4C,0x12) # RX1

    board.ReadI2C(UB954,0x4D)

    Register 0x4D[0] = 1 when LOCK is high. 

    For diagnostic purposes, it is recommended to read back 0x4D, 0x4E, 0x55-0x56, 0x7A-0x7B at start-up to clear any errors during initialization.

    2.How can we verify if valid video data is being successfully received?

    Checking on the serializer is included in the script. Below is the code snippet to highlight this function: 

    # 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))

    Checking on the deserializer can be seen below: 

    # Seeing if CSI data is transmitting to deserializer

    board.WriteI2C(UB954,0x4C,0x01) # RX0
    print "LINE_COUNT_HI = ",hex(board.ReadI2C(UB954, 0x73, 1))
    print "LINE_COUNT_LO = ", hex(board.ReadI2C(UB954, 0x74, 1))
    print "LINE_LEN_HI = ", hex(board.ReadI2C(UB954, 0x75, 1))
    print "LINE_LEN_LO = ", hex(board.ReadI2C(UB954, 0x76, 1))

    board.WriteI2C(UB954,0x4C,0x12) #RX1
    print "LINE_COUNT_HI = ",hex(board.ReadI2C(UB954, 0x73, 1))
    print "LINE_COUNT_LO = ", hex(board.ReadI2C(UB954, 0x74, 1))
    print "LINE_LEN_HI = ", hex(board.ReadI2C(UB954, 0x75, 1))
    print "LINE_LEN_LO = ", hex(board.ReadI2C(UB954, 0x76, 1))

    Best,

    Zoe