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: line concatenation synchronous mode setup with 2 x ds90ub953 streaming test colour bars

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

We want to test line concatenation mode in the 954 by streaming 1080p yuv422 8 bit colour bars from 2 attached ds90ub953

We can toggle between both streams using port select tab in ALP  and set up the sync mode 

How do we setup for line concatenation to yield a 3640 x 1080 output in the csi2 transmitter 

and what registers would show the size of the output frame ? 

Is there anything else required of the color bar scripts ..

  • Hi Martin,

    There's an example of this in the DS90UB954-Q1 Datasheet, you can see it below. I modified it slightly to have the VC0 on RX1 mapped to VC1. You can change that as desired in register 0x72. You can only check the input line count and length in registers 0x73-0x76. Also, are you able to stream okay in Round Robin?

    # "*** RX0 VC=0 ***"
    WriteI2C(0x4C,0x01) # RX0
    WriteI2C(0x72,0xE4) # Map Sensor A VC0 to CSI-Tx VC0

    # "*** RX1 VC=1 ***"
    WriteI2C(0x4C,0x12) # RX1
    WriteI2C(0x72,0xE1) # Map Sensor B VC0 to CSI-Tx VC1

    # "CSI_EN"
    WriteI2C(0x33,0x1) # CSI_EN & CSI0 4L

    # "*** CSI0_SYNC_FWD synchronous forwarding with line concatenation ***"
    WriteI2C(0x21,0x3c) # synchronous forwarding with line concatenation

    # "***FWD_PORT all RX to CSI0"
    WriteI2C(0x20,0x00) # forwarding of all RX to CSI0

    Regards,
    Mandeep Singh
  • Hi Mandeep ,

    We stream the 954 csi 2 into a cypress cx3 mipi to usb3 device, At this time we do not think it can support round robin so

    we want to concatenate the streams. 

    To help with this we wanted to see if by settting the 953 to output 1080p color bar yuv422 8 bit we could obtain a concatenated frame displayed on the cx3 device.

    So far no luck, this is raised in a separate post.

    Also we have set up the two ISP devices attached to the 9 2 ds90ub953  to output 1080p yuv 422 8 bit 30ips and are again trying to setup line concatenation mode for this. 

    Again this is raised in a desperate post. 

  • Hi Martin,

    I'm going to just move the questions from the other posts here.

    I don't know if this is the order you are setting the registers but can you configure the high/low time for the framesync signal first, then enable it versus enabling it first then setting those values.

    This command has the CSI Continous Clock disabled. Set it to 0x03
    board.WriteI2C(UB954,0x33,0x01) # continuous clock

    Can you share a reg dump.

    Regards,
    Mandeep Singh
  • thought I posted code and reg dumps to this thread yesterday ..  will have to repeat this tomorrow.

    Just FYI  on todays tests.

    If we set line concat on in alp and both rx ports on with the 2 ds90ub953 in yuv 422 8bit 1080p color bar mode . we get   0x01 in reg 0x35  and the debug uart on the cx3 reports nonsense frame size values.

    If  we turn off one rx port on the DS90ub954  but still concat mode on then 0x35  get 0x03  and the cx3 debug uart shows the correct 8MB per frame value. 

    Cannot display the frame yet locally at this resolution. So it could be down to the question is it possible to sync two 953 in color bar mode enough for line concat mode to work .. ?

  • The script for 2 color bars is attached along with the reg dumps .

    Frame size is 8294400 when one port active in long concat mode which would be correct. With both ports enabled , random sizes are reported by the CX3 debug port.

    ###################################################################################
    UB954 = 0x60 # 8-bit for second port
    LED_IR_R = 0xC0 # 8-bit
    LED_G_B = 0xC2 # 8-bit
    ISPA = 0x78 # 8 bit
    ISPB = 0x7A # 8 bit
    ACCEL = 0x32 # 8 bit
    TMP_HUM = 0x80 # 8 bit
    ###################################################################################
    UB953A_alias = 0x18 # 8-bit
    UB953B_alias = 0x1A # 8-bit
    LED_IR_R_alias = 0x36 # 8-bit
    LED_G_B_alias = 0x38 # 8-bit
    ISPA_alias = 0x3A # 8-bit
    ISPB_alias = 0x3C # 8-bit
    ACCEL_alias = 0x3E # 8 bit
    TMP_HUM_alias = 0x42 # 8 bit
    ####################################################################################
    # setup the 954 to be csi/ and 50MHz
    ###################################################################################
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    board.WriteI2C (UB954,0x6d,0x78) # port config csi mode and stp cable 
    board.WriteI2C (UB954,0x4c,0x12) # RX_PORT 1 read / write
    board.WriteI2C (UB954,0x6d,0x78) # port config csi mode and stp cable
    # Setup DeviceID and associated Aliases 
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    board.WriteI2C (UB954,0x5d,LED_IR_R) # SlaveID[0]
    print "Port 0 SlaveID[0] LED driver Red,IR      ",hex(board.ReadI2C(UB954,0x5d,0x01))
    board.WriteI2C (UB954,0x5e,LED_G_B) # SlaveID[1]
    print "Port 0 SlaveID[1] LED driver GRN, BLU    ",hex(board.ReadI2C(UB954,0x5e,0x01))
    board.WriteI2C (UB954,0x5f,ISPA) # SlaveID[2]
    print "Port 0 SlaveID[2] ISPA                   ",hex(board.ReadI2C(UB954,0x5f,0x01))
    board.WriteI2C (UB954,0x60,ACCEL) # SlaveID[3]
    print "Port 0 SlaveID[3] ACCEL                  ",hex(board.ReadI2C(UB954,0x60,0x01))
    board.WriteI2C (UB954,0x61,TMP_HUM) # SlaveID[4]
    print "Port 0 SlaveID[4] TMP_HUM                ",hex(board.ReadI2C(UB954,0x61,0x01))
    board.WriteI2C (UB954,0x5c,UB953A_alias) # SerAlias
    print "Port 0 SerAlias                          ",hex(board.ReadI2C(UB954,0x5c,0x01))
    board.WriteI2C (UB954,0x65,LED_IR_R_alias) # SlaveAlias[0]
    print "Port 0 SlaveAlias[0] LED driver Red,IR   ",hex(board.ReadI2C(UB954,0x65,0x01))
    board.WriteI2C (UB954,0x66,LED_G_B_alias) # SlaveAlias[1]
    print "Port 0 SlaveAlias[1] LED driver GRN, BLU ",hex(board.ReadI2C(UB954,0x66,0x01))
    board.WriteI2C (UB954,0x67,ISPA_alias) # SlaveAlias[2]
    print "Port 0 SlaveAlias[2] ISPA                ",hex(board.ReadI2C(UB954,0x67,0x01))
    board.WriteI2C (UB954,0x68,ACCEL_alias) # SlaveAlias[3]
    print "Port 0 SlaveAlias[3] ACCEL               ",hex(board.ReadI2C(UB954,0x68,0x01))
    board.WriteI2C (UB954,0x69,TMP_HUM_alias) # SlaveAlias[4]
    print "Port 0 SlaveAlias[4] TMP_HUM             ",hex(board.ReadI2C(UB954,0x69,0x01))
    board.WriteI2C (UB954,0x4c,0x12) # RX_PORT 1 read / write
    board.WriteI2C (UB954,0x5d,ISPB) # SlaveID[0]
    print "Port 1 SlaveID[0] ISPB                   ",hex(board.ReadI2C(UB954,0x5d,0x01))
    board.WriteI2C (UB954,0x5c,UB953B_alias) # SerAlias
    print "Port 1 SerAlias                          ",hex(board.ReadI2C(UB954,0x5c,0x01))
    board.WriteI2C (UB954,0x65,ISPB_alias) # SlaveAlias[0]
    print "Port 1 SlaveAlias[0] ISPB                ",hex(board.ReadI2C(UB954,0x65,0x01))
    ###############################################################################################
    # Setup both ports
    ###############################################################################################
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    board.WriteI2C(UB954,0x58,0x5e)	# BC to 25 Mbps, I2C pass thru and pass thru all - seems to be required
    board.WriteI2C(UB954,0x72,0xe4)	# csi vc map to 0x2c for raw12 
    board.WriteI2C (UB954,0x4c,0x12) # RX_PORT 1 read / write
    board.WriteI2C(UB954,0x58,0x5e)	# BC to 25 Mbps : to set to 50 use 0x5e
    board.WriteI2C(UB954,0x72,0xe1)	# csi vc map to 0x2c for raw12 
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    
    # Toggle UB953A GPIO pins
    #UB953A_alias = 0x18
    board.WriteI2C (UB953A_alias,0x0e,0xf0) # sets all GPIO as outputs
    print "Read USB953A GPIO pin status - 0xF0 means set as outputs     ",hex(board.ReadI2C(UB953A_alias,0x0e,0x01))
    board.WriteI2C (UB953A_alias,0x0d,0x0f) # sets logical outputs to '1' on all GPIO
    print "Read USB953A GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953A_alias,0x0d,0x01))
    board.WriteI2C (UB953A_alias,0x0d,0x00) # sets logical outputs to '0' on all GPIO
    print "Read USB953A GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953A_alias,0x0d,0x01))
    board.WriteI2C (UB953A_alias,0x0d,0x0f) # sets logical outputs to '1' on all GPIO
    print "Read USB953A GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953A_alias,0x0d,0x01))
    
    board.WriteI2C (UB954,0x4c,0x12) # RX_PORT 0 read / write
    
    # Toggle UB953B GPIO pins - leave as '1' to keep ISP out of reset
    board.WriteI2C (UB953B_alias,0x0e,0xf0) # sets all GPIO as outputs
    print "Read USB953B GPIO pin status - 0xF0 means set as outputs     ",hex(board.ReadI2C(UB953B_alias,0x0e,0x01))
    board.WriteI2C (UB953B_alias,0x0d,0x0f) # sets logical outputs to '1' on all GPIO
    print "Read USB953B GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953B_alias,0x0d,0x01))
    board.WriteI2C (UB953B_alias,0x0d,0x00) # sets logical outputs to '0' on all GPIO
    print "Read USB953B GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953B_alias,0x0d,0x01))
    board.WriteI2C (UB953B_alias,0x0d,0x0f) # sets logical outputs to '1' on all GPIO
    print "Read USB953B GPIO pin level - 0x0F means '1', 0x00 means '0' ",hex(board.ReadI2C(UB953B_alias,0x0d,0x01))
    
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    print "Read first 6 registers of ISPA           ",board.ReadI2C(ISPA_alias,0x00,0x06)
    print "Read WHO AM I reg of ACCEL expect 0x33   ",hex(board.ReadI2C(ACCEL_alias,0x0F,0x01))
    print "Read ID Reg of TMP_HUM expect [1,77]     ",board.ReadI2C(TMP_HUM_alias,0xFB,0x02)
    
    board.WriteI2C (UB954,0x4c,0x12) # RX_PORT 0 read / write
    print "Read first 6 registers of ISPB           ",board.ReadI2C(ISPB_alias,0x00,0x06)
    
    board.WriteI2C (UB954,0x4c,0x01) # RX_PORT 0 read / write
    #########################################################################################################
    # set clock to 72 Mhz for CX3 aptina10 compatablity : later need 48MHz for the AP1302 ISP 
    #########################################################################################################
    board.WriteI2C (UB953B_alias,0x06, 0x2c) # set prescalar : div FC by 1=000,2=001,4=010,8 16 and M =1-31
    board.WriteI2C (UB953B_alias,0x07, 0xfa) # Set N value , 0--255 range , default is 28
    board.WriteI2C (UB953A_alias,0x06, 0x2c) # set prescalar : div FC by 1=000,2=001,4=010,8 16 and M =1-31
    board.WriteI2C (UB953A_alias,0x07, 0xfa) # Set N value , 0--255 range , default is 28
    # for 72MHZ use M=9 , N=250 and div =1
    # for 48MHZ use M=6 , N=250 and div =1 , SO WE ARE AT 48MHz 
    #############################################################################
    # setup 400MHz CSI clock
    #############################################################################
    # Enable 400Mbps CSI in UB954
    #
    # Set CSI_TX_SPEED to select 400Mbps
    board.WriteI2C(UB954, 0x1F, 0x02)
    """ # Set PLL Clock divider to 32
    #board.Ind_Acc_Write(7, 0xA, 0x80)
    board.WriteI2C(UB954, 0xB0, (0x7 << 2))
    board.WriteI2C(UB954, 0xB1, 0xA)
    board.WriteI2C(UB954, 0xB2, 0x80)
    # Set PLL CP current
    #board.Ind_Acc_Write(0x7, 0x7, 0xE2)
    board.WriteI2C(UB954, 0xB0, (0x7 << 2))
    board.WriteI2C(UB954, 0xB1, 0x7)
    board.WriteI2C(UB954, 0xB2, 0xE2)
    # Set CSI Timing parameters
    #board.Ind_Acc_Write(0x0, 0x40, [0x83, 0x8D, 0x87, 0x87, 0x83, 0x86, 0x84, 0x86, 0x84]])
    board.WriteI2C(UB954, 0xB0, 0x2)    # set auto-increment, page 0
    board.WriteI2C(UB954, 0xB1, 0x40)   # CSI Port 0
    board.WriteI2C(UB954, 0xB2, 0x83)   # TCK Prep
    board.WriteI2C(UB954, 0xB2, 0x8D)   # TCK Zero
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Trail
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Post
    board.WriteI2C(UB954, 0xB2, 0x83)   # THS Prep
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Zero
    board.WriteI2C(UB954, 0xB2, 0x84)   # THS Trail
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Exit
    board.WriteI2C(UB954, 0xB2, 0x84)   # TLPX
    # Set CSI Timing parameters
    #board.Ind_Acc_Write(0x0, 0x60, [0x83, 0x8D, 0x87, 0x87, 0x83, 0x86, 0x84, 0x86, 0x84]])
    board.WriteI2C(UB954, 0xB0, 0x2)    # set auto-increment, page 0
    board.WriteI2C(UB954, 0xB1, 0x60)   # CSI Port 1
    board.WriteI2C(UB954, 0xB2, 0x83)   # TCK Prep
    board.WriteI2C(UB954, 0xB2, 0x8D)   # TCK Zero
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Trail
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Post
    board.WriteI2C(UB954, 0xB2, 0x83)   # THS Prep
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Zero
    board.WriteI2C(UB954, 0xB2, 0x84)   # THS Trail
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Exit
    board.WriteI2C(UB954, 0xB2, 0x84)   # TLPX """
    #########################################################################################################
    board.WriteI2C(UB954,0x33,0x00)     # disable CSI port , before issuing a command
    board.WriteI2C(UB954,0x33,0x01)     # ENABLE CSI port , continous clock disabled.
    print " ENABLE CSI pass through and contious clock and periodic calibration  "
    print " Forward RX1 to CSI 0 "
    board.WriteI2C(UB954,0x20,0x10) #CSI FORWARDING enable for port 1 AND PORT 0 : 0x10 > port 1 , 0x20 port 0 , 0x00 both ports 
    
    #########################################################################################################
    # 953 config : yuv 422 720p : 24 ips 
    #runTime = 3
    #board.devAddr = 0x18
    # # CSI sel and CSI enable
    # board.WriteReg(0x32, 0x01)
    # time.sleep(0.5)
    # board.WriteReg(0x33, 0x01)
    # time.sleep(0.5)
    
    # enable pat generator for portB : as port A on board 2 is bust : here portb is 1080p 
    
    board.WriteI2C (UB953B_alias,0xB0, 0x00)
    board.WriteI2C (UB953B_alias,0xB1, 0x01)
    board.WriteI2C (UB953B_alias,0xB2, 0x01) #enable pattern generator
    board.WriteI2C (UB953B_alias,0xB1, 0x02)
    board.WriteI2C (UB953B_alias,0xB2, 0x23) #fixed color pattern, 8 color bars, block size of 5
    
    board.WriteI2C (UB953B_alias,0xB1, 0x03)
    board.WriteI2C (UB953B_alias,0xB2, 0x1e) #CSI Data Identifier (0x24 = RGB888, 0x2C = RAW12, 0x2B = RAW10)
    board.WriteI2C (UB953B_alias,0xB1, 0x04)
    board.WriteI2C (UB953B_alias,0xB2, 0x0f) #line size (15:8)
    board.WriteI2C (UB953B_alias,0xB1, 0x05)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #line size (7:0)
    board.WriteI2C (UB953B_alias,0xB1, 0x06)
    board.WriteI2C (UB953B_alias,0xB2, 0x01) #bar size (15:8)
    board.WriteI2C (UB953B_alias,0xB1, 0x07)
    board.WriteI2C (UB953B_alias,0xB2, 0xe0) #bar size (7:0)
    board.WriteI2C (UB953B_alias,0xB1, 0x08)
    board.WriteI2C (UB953B_alias,0xB2, 0x04) #active lines per frame (15:8)
    board.WriteI2C (UB953B_alias,0xB1, 0x09)
    board.WriteI2C (UB953B_alias,0xB2, 0x38) #active lines per frame (7:0)
    board.WriteI2C (UB953B_alias,0xB1, 0x0a)
    board.WriteI2C (UB953B_alias,0xB2, 0x04) #total lines per frame (15:8)
    board.WriteI2C (UB953B_alias,0xB1, 0x0b)
    board.WriteI2C (UB953B_alias,0xB2, 0x65) #total lines per frame (7:0)
    board.WriteI2C (UB953B_alias,0xB1, 0x0C)
    board.WriteI2C (UB953B_alias,0xB2, 0x0b) #line period (15:8)
    board.WriteI2C (UB953B_alias,0xB1, 0x0d)
    board.WriteI2C (UB953B_alias,0xB2, 0x93) #line period (7:0)
    board.WriteI2C (UB953B_alias,0xB1, 0x0e)
    board.WriteI2C (UB953B_alias,0xB2, 0x21) #vertical back porch
    board.WriteI2C (UB953B_alias,0xB1, 0x0f)
    board.WriteI2C (UB953B_alias,0xB2, 0x0a) #vertical front porch
    #
    board.WriteI2C (UB953B_alias,0xB1, 0x10)
    board.WriteI2C (UB953B_alias,0xB2, 0xaa) #1st byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x11)
    board.WriteI2C (UB953B_alias,0xB2, 0x33) #2nd byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x12)
    board.WriteI2C (UB953B_alias,0xB2, 0xf0) #3rd byte of fixed color"""
    
    board.WriteI2C (UB953B_alias,0xB1, 0x13)
    board.WriteI2C (UB953B_alias,0xB2, 0x7f) #4th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x14)
    board.WriteI2C (UB953B_alias,0xB2, 0x55) #5th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x15)
    board.WriteI2C (UB953B_alias,0xB2, 0xcc) #6th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x16)
    board.WriteI2C (UB953B_alias,0xB2, 0x0f) #7th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x17)
    board.WriteI2C (UB953B_alias,0xB2, 0x80) #8th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x18)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #9th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x19)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #10th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1A)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #11th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1B)
    board.WriteI2C (UB953B_alias,0xB1, 0x00) #12th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1C)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #13th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1D)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #14th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1e)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #15th byte of fixed color
    board.WriteI2C (UB953B_alias,0xB1, 0x1F)
    board.WriteI2C (UB953B_alias,0xB2, 0x00) #16th byte of fixed color 
    #########################################################################################################
    # 953 config : yuv 422 720p : 24 ips 
    #runTime = 3
    #board.devAddr = 0x18
    # # CSI sel and CSI enable
    # board.WriteReg(0x32, 0x01)
    # time.sleep(0.5)
    # board.WriteReg(0x33, 0x01)
    # time.sleep(0.5)
    
    # enable pat generator for portB : as port A on board 2 is bust : port a now 1080p 
    
    board.WriteI2C (UB953A_alias,0xB0, 0x00)
    board.WriteI2C (UB953A_alias,0xB1, 0x01)
    board.WriteI2C (UB953A_alias,0xB2, 0x01) #enable pattern generator
    board.WriteI2C (UB953A_alias,0xB1, 0x02)
    board.WriteI2C (UB953A_alias,0xB2, 0x33) #fixed color pattern, 8 color bars, block size of 5
    board.WriteI2C (UB953A_alias,0xB1, 0x03)
    board.WriteI2C (UB953A_alias,0xB2, 0x1e) #CSI Data Identifier (0x24 = RGB888, 0x2C = RAW12, 0x2B = RAW10)
    board.WriteI2C (UB953A_alias,0xB1, 0x04)
    board.WriteI2C (UB953A_alias,0xB2, 0x0f) #line size (15:8)
    board.WriteI2C (UB953A_alias,0xB1, 0x05)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #line size (7:0)
    board.WriteI2C (UB953A_alias,0xB1, 0x06)
    board.WriteI2C (UB953A_alias,0xB2, 0x01) #bar size (15:8)
    board.WriteI2C (UB953A_alias,0xB1, 0x07)
    board.WriteI2C (UB953A_alias,0xB2, 0xe0) #bar size (7:0)
    board.WriteI2C (UB953A_alias,0xB1, 0x08)
    board.WriteI2C (UB953A_alias,0xB2, 0x04) #active lines per frame (15:8)
    board.WriteI2C (UB953A_alias,0xB1, 0x09)
    board.WriteI2C (UB953A_alias,0xB2, 0x38) #active lines per frame (7:0)
    board.WriteI2C (UB953A_alias,0xB1, 0x0a)
    board.WriteI2C (UB953A_alias,0xB2, 0x04) #total lines per frame (15:8)
    board.WriteI2C (UB953A_alias,0xB1, 0x0b)
    board.WriteI2C (UB953A_alias,0xB2, 0x65) #total lines per frame (7:0)
    board.WriteI2C (UB953A_alias,0xB1, 0x0c)
    board.WriteI2C (UB953A_alias,0xB2, 0x0b) #line period (15:8)
    board.WriteI2C (UB953A_alias,0xB1, 0x0d)
    board.WriteI2C (UB953A_alias,0xB2, 0x93) #line period (7:0)
    board.WriteI2C (UB953A_alias,0xB1, 0x0e)
    board.WriteI2C (UB953A_alias,0xB2, 0x21) #vertical back porch
    board.WriteI2C (UB953A_alias,0xB1, 0x0f)
    board.WriteI2C (UB953A_alias,0xB2, 0x0a) #vertical front porch
    #
    board.WriteI2C (UB953A_alias,0xB1, 0x10)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #1st byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x11)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #2nd byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x12)
    board.WriteI2C (UB953A_alias,0xB2, 0xFf) #3rd byte of fixed color
    """
    board.WriteI2C (UB953A_alias,0xB1, 0x13)
    board.WriteI2C (UB953A_alias,0xB2, 0x7f) #4th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x14)
    board.WriteI2C (UB953A_alias,0xB2, 0x55) #5th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x15)
    board.WriteI2C (UB953A_alias,0xB2, 0xcc) #6th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x16)
    board.WriteI2C (UB953A_alias,0xB2, 0x0f) #7th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x17)
    board.WriteI2C (UB953A_alias,0xB2, 0x80) #8th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x18)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #9th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x19)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #10th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1A)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #11th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1B)
    board.WriteI2C (UB953A_alias,0xB1, 0x00) #12th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1C)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #13th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1D)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #14th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1E)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #15th byte of fixed color
    board.WriteI2C (UB953A_alias,0xB1, 0x1F)
    board.WriteI2C (UB953A_alias,0xB2, 0x00) #16th byte of fixed color """
    
    ######################################################################################################
    # read sensor ID
    ######################################################################################################
    
    #########################################################################################################
    board.WriteI2C(UB954,0x33,0x00)     # disable CSI port , before issuing a command
    board.WriteI2C(UB954,0x4c,0x01)
    board.WriteI2C(UB954,0x72,0xe4)     # vc-id re-map
    board.WriteI2C(UB954,0x4c,0x12)
    board.WriteI2C(UB954,0x72,0xe1)     # vc - id re map 
    board.WriteI2C(UB954,0x33,0x03)     # ENABLE CSI port , continous clock disabled.
    print " ENABLE CSI pass through and contious clock and periodic calibration  "
    print " Forward RX1 to CSI 0 "
    board.WriteI2C(UB954,0x21,0x3c) # line concat
    board.WriteI2C(UB954,0x20,0x10) #CSI FORWARDING enable for port 1 AND PORT 0 : 0x10 > port 1 , 0x20 port 0 , 0x00 both ports
    
    # hit the clock
    board.WriteI2C(UB954, 0x1F, 0x02)  # 800 again
    print " hit the clock " 
    board.WriteI2C(UB954, 0x1F, 0x03)
    # Set PLL Clock divider to 32
    #board.Ind_Acc_Write(7, 0xA, 0x80)
    board.WriteI2C(UB954, 0xB0, (0x7 << 2))
    board.WriteI2C(UB954, 0xB1, 0xA)
    board.WriteI2C(UB954, 0xB2, 0x80)
    # Set PLL CP current
    #board.Ind_Acc_Write(0x7, 0x7, 0xE2)
    board.WriteI2C(UB954, 0xB0, (0x7 << 2))
    board.WriteI2C(UB954, 0xB1, 0x7)
    board.WriteI2C(UB954, 0xB2, 0xE2)
    # Set CSI Timing parameters
    #board.Ind_Acc_Write(0x0, 0x40, [0x83, 0x8D, 0x87, 0x87, 0x83, 0x86, 0x84, 0x86, 0x84]])
    board.WriteI2C(UB954, 0xB0, 0x2)    # set auto-increment, page 0
    board.WriteI2C(UB954, 0xB1, 0x40)   # CSI Port 0
    board.WriteI2C(UB954, 0xB2, 0x83)   # TCK Prep
    board.WriteI2C(UB954, 0xB2, 0x8D)   # TCK Zero
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Trail
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Post
    board.WriteI2C(UB954, 0xB2, 0x83)   # THS Prep
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Zero
    board.WriteI2C(UB954, 0xB2, 0x84)   # THS Trail
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Exit
    board.WriteI2C(UB954, 0xB2, 0x84)   # TLPX
    # Set CSI Timing parameters
    #board.Ind_Acc_Write(0x0, 0x60, [0x83, 0x8D, 0x87, 0x87, 0x83, 0x86, 0x84, 0x86, 0x84]])
    board.WriteI2C(UB954, 0xB0, 0x2)    # set auto-increment, page 0
    board.WriteI2C(UB954, 0xB1, 0x60)   # CSI Port 1
    board.WriteI2C(UB954, 0xB2, 0x83)   # TCK Prep
    board.WriteI2C(UB954, 0xB2, 0x8D)   # TCK Zero
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Trail
    board.WriteI2C(UB954, 0xB2, 0x87)   # TCK Post
    board.WriteI2C(UB954, 0xB2, 0x83)   # THS Prep
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Zero
    board.WriteI2C(UB954, 0xB2, 0x84)   # THS Trail
    board.WriteI2C(UB954, 0xB2, 0x86)   # THS Exit
    board.WriteI2C(UB954, 0xB2, 0x84)   # TLPX
    
    

  • [REGISTERS]
    Device = ALP Nano 1 - DS90UB954, Connector 1
    Comments = "port0"
    Date = 06/06/2019
    Time = 12:29:46
    Reg = 0,0x0000,0x60
    Reg = 0,0x0001,0x00
    Reg = 0,0x0002,0x1E
    Reg = 0,0x0003,0x20
    Reg = 0,0x0004,0xDF
    Reg = 0,0x0005,0x01
    Reg = 0,0x0006,0x00
    Reg = 0,0x0007,0xFE
    Reg = 0,0x0008,0x1C
    Reg = 0,0x0009,0x10
    Reg = 0,0x000A,0x7A
    Reg = 0,0x000B,0x7A
    Reg = 0,0x000C,0x83
    Reg = 0,0x000D,0x09
    Reg = 0,0x000E,0x00
    Reg = 0,0x000F,0x7F
    Reg = 0,0x0010,0x00
    Reg = 0,0x0011,0x00
    Reg = 0,0x0012,0x00
    Reg = 0,0x0013,0x00
    Reg = 0,0x0014,0x00
    Reg = 0,0x0015,0x00
    Reg = 0,0x0016,0x00
    Reg = 0,0x0017,0x00
    Reg = 0,0x0018,0x01
    Reg = 0,0x0019,0x02
    Reg = 0,0x001A,0x2C
    Reg = 0,0x001B,0xD6
    Reg = 0,0x001C,0xDC
    Reg = 0,0x001D,0x00
    Reg = 0,0x001E,0x04
    Reg = 0,0x001F,0x03
    Reg = 0,0x0020,0x10
    Reg = 0,0x0021,0x0C
    Reg = 0,0x0022,0x05
    Reg = 0,0x0023,0x00
    Reg = 0,0x0024,0x00
    Reg = 0,0x0025,0x00
    Reg = 0,0x0026,0x00
    Reg = 0,0x0027,0x00
    Reg = 0,0x0028,0x00
    Reg = 0,0x0029,0x00
    Reg = 0,0x002A,0x00
    Reg = 0,0x002B,0x00
    Reg = 0,0x002C,0x00
    Reg = 0,0x002D,0x00
    Reg = 0,0x002E,0x00
    Reg = 0,0x002F,0x00
    Reg = 0,0x0030,0x00
    Reg = 0,0x0031,0x00
    Reg = 0,0x0032,0x00
    Reg = 0,0x0033,0x03
    Reg = 0,0x0034,0x40
    Reg = 0,0x0035,0x03
    Reg = 0,0x0036,0x00
    Reg = 0,0x0037,0x0F
    Reg = 0,0x0038,0x00
    Reg = 0,0x0039,0x00
    Reg = 0,0x003A,0x00
    Reg = 0,0x003B,0x01
    Reg = 0,0x003C,0x14
    Reg = 0,0x003D,0x6F
    Reg = 0,0x003E,0x00
    Reg = 0,0x003F,0x40
    Reg = 0,0x0040,0x00
    Reg = 0,0x0041,0xA7
    Reg = 0,0x0042,0x71
    Reg = 0,0x0043,0x01
    Reg = 0,0x0044,0x00
    Reg = 0,0x0045,0x00
    Reg = 0,0x0046,0x00
    Reg = 0,0x0047,0x00
    Reg = 0,0x0048,0x00
    Reg = 0,0x0049,0x00
    Reg = 0,0x004A,0x00
    Reg = 0,0x004B,0x12
    Reg = 0,0x004C,0x01
    Reg = 0,0x004D,0x03
    Reg = 0,0x004E,0x0C
    Reg = 0,0x004F,0x64
    Reg = 0,0x0050,0x00
    Reg = 0,0x0051,0x00
    Reg = 0,0x0052,0x00
    Reg = 0,0x0053,0x03
    Reg = 0,0x0054,0x00
    Reg = 0,0x0055,0x00
    Reg = 0,0x0056,0x00
    Reg = 0,0x0057,0x00
    Reg = 0,0x0058,0x5E
    Reg = 0,0x0059,0x00
    Reg = 0,0x005A,0x00
    Reg = 0,0x005B,0x30
    Reg = 0,0x005C,0x18
    Reg = 0,0x005D,0xC0
    Reg = 0,0x005E,0xC2
    Reg = 0,0x005F,0x78
    Reg = 0,0x0060,0x32
    Reg = 0,0x0061,0x80
    Reg = 0,0x0062,0x00
    Reg = 0,0x0063,0x00
    Reg = 0,0x0064,0x00
    Reg = 0,0x0065,0x36
    Reg = 0,0x0066,0x38
    Reg = 0,0x0067,0x3A
    Reg = 0,0x0068,0x3E
    Reg = 0,0x0069,0x42
    Reg = 0,0x006A,0x00
    Reg = 0,0x006B,0x00
    Reg = 0,0x006C,0x00
    Reg = 0,0x006D,0x78
    Reg = 0,0x006E,0x88
    Reg = 0,0x006F,0x8A
    Reg = 0,0x0070,0x2B
    Reg = 0,0x0071,0x2C
    Reg = 0,0x0072,0xE4
    Reg = 0,0x0073,0x04
    Reg = 0,0x0074,0x38
    Reg = 0,0x0075,0x0F
    Reg = 0,0x0076,0x00
    Reg = 0,0x0077,0xC5
    Reg = 0,0x0078,0x00
    Reg = 0,0x0079,0x01
    Reg = 0,0x007A,0x0F
    Reg = 0,0x007B,0xFF
    Reg = 0,0x007C,0x20
    Reg = 0,0x007D,0x00
    Reg = 0,0x007E,0x00
    Reg = 0,0x007F,0x00
    Reg = 0,0x00A0,0x02
    Reg = 0,0x00A1,0x0F
    Reg = 0,0x00A2,0x00
    Reg = 0,0x00A3,0x00
    Reg = 0,0x00A4,0x08
    Reg = 0,0x00A5,0x19
    Reg = 0,0x00A7,0x00
    Reg = 0,0x00A8,0x00
    Reg = 0,0x00A9,0x00
    Reg = 0,0x00AA,0x00
    Reg = 0,0x00AB,0x00
    Reg = 0,0x00AC,0x00
    Reg = 0,0x00AD,0x00
    Reg = 0,0x00AE,0x00
    Reg = 0,0x00AF,0x00
    Reg = 0,0x00B0,0x02
    Reg = 0,0x00B1,0x69
    Reg = 0,0x00B2,0x00
    Reg = 0,0x00B3,0x08
    Reg = 0,0x00B4,0x25
    Reg = 0,0x00B5,0x00
    Reg = 0,0x00B6,0x18
    Reg = 0,0x00B7,0x00
    Reg = 0,0x00B8,0x8A
    Reg = 0,0x00B9,0x33
    Reg = 0,0x00BA,0x83
    Reg = 0,0x00BB,0x74
    Reg = 0,0x00BC,0x80
    Reg = 0,0x00BD,0x00
    Reg = 0,0x00BE,0x00
    Reg = 0,0x00BF,0x00
    Reg = 0,0x00D0,0x00
    Reg = 0,0x00D2,0x94
    Reg = 0,0x00D3,0x02
    Reg = 0,0x00D4,0x60
    Reg = 0,0x00D5,0xF2
    Reg = 0,0x00D6,0x00
    Reg = 0,0x00D7,0x03
    Reg = 0,0x00D8,0x00
    Reg = 0,0x00D9,0x00
    Reg = 0,0x00DA,0x00
    Reg = 0,0x00DB,0x00
    Reg = 0,0x00DC,0x00
    Reg = 0,0x00DD,0x00
    Reg = 0,0x00DE,0x00
    Reg = 0,0x00DF,0x00
    Reg = 0,0x00F0,0x5F
    Reg = 0,0x00F1,0x55
    Reg = 0,0x00F2,0x42
    Reg = 0,0x00F3,0x39
    Reg = 0,0x00F4,0x35
    Reg = 0,0x00F5,0x34
    Reg = 0,0x00F8,0x00
    Reg = 0,0x00F9,0x00
    Reg = 0,0x00FA,0x00
    Reg = 0,0x00FB,0x00
    
    [REGISTERS]
    Device = ALP Nano 1 - DS90UB954, Connector 1
    Comments = "port1"
    Date = 06/06/2019
    Time = 12:30:47
    Reg = 0,0x0000,0x60
    Reg = 0,0x0001,0x00
    Reg = 0,0x0002,0x1E
    Reg = 0,0x0003,0x20
    Reg = 0,0x0004,0xDF
    Reg = 0,0x0005,0x01
    Reg = 0,0x0006,0x00
    Reg = 0,0x0007,0xFE
    Reg = 0,0x0008,0x1C
    Reg = 0,0x0009,0x10
    Reg = 0,0x000A,0x7A
    Reg = 0,0x000B,0x7A
    Reg = 0,0x000C,0x83
    Reg = 0,0x000D,0x09
    Reg = 0,0x000E,0x00
    Reg = 0,0x000F,0x7F
    Reg = 0,0x0010,0x00
    Reg = 0,0x0011,0x00
    Reg = 0,0x0012,0x00
    Reg = 0,0x0013,0x00
    Reg = 0,0x0014,0x00
    Reg = 0,0x0015,0x00
    Reg = 0,0x0016,0x00
    Reg = 0,0x0017,0x00
    Reg = 0,0x0018,0x01
    Reg = 0,0x0019,0x02
    Reg = 0,0x001A,0x2C
    Reg = 0,0x001B,0xD6
    Reg = 0,0x001C,0xDC
    Reg = 0,0x001D,0x00
    Reg = 0,0x001E,0x04
    Reg = 0,0x001F,0x03
    Reg = 0,0x0020,0x10
    Reg = 0,0x0021,0x0C
    Reg = 0,0x0022,0x01
    Reg = 0,0x0023,0x00
    Reg = 0,0x0024,0x00
    Reg = 0,0x0025,0x00
    Reg = 0,0x0026,0x00
    Reg = 0,0x0027,0x00
    Reg = 0,0x0028,0x00
    Reg = 0,0x0029,0x00
    Reg = 0,0x002A,0x00
    Reg = 0,0x002B,0x00
    Reg = 0,0x002C,0x00
    Reg = 0,0x002D,0x00
    Reg = 0,0x002E,0x00
    Reg = 0,0x002F,0x00
    Reg = 0,0x0030,0x00
    Reg = 0,0x0031,0x00
    Reg = 0,0x0032,0x00
    Reg = 0,0x0033,0x03
    Reg = 0,0x0034,0x40
    Reg = 0,0x0035,0x03
    Reg = 0,0x0036,0x00
    Reg = 0,0x0037,0x00
    Reg = 0,0x0038,0x00
    Reg = 0,0x0039,0x00
    Reg = 0,0x003A,0x00
    Reg = 0,0x003B,0x01
    Reg = 0,0x003C,0x14
    Reg = 0,0x003D,0x6F
    Reg = 0,0x003E,0x00
    Reg = 0,0x003F,0x40
    Reg = 0,0x0040,0x00
    Reg = 0,0x0041,0xA7
    Reg = 0,0x0042,0x71
    Reg = 0,0x0043,0x01
    Reg = 0,0x0044,0x00
    Reg = 0,0x0045,0x00
    Reg = 0,0x0046,0x00
    Reg = 0,0x0047,0x00
    Reg = 0,0x0048,0x00
    Reg = 0,0x0049,0x00
    Reg = 0,0x004A,0x00
    Reg = 0,0x004B,0x12
    Reg = 0,0x004C,0x12
    Reg = 0,0x004D,0x43
    Reg = 0,0x004E,0x0C
    Reg = 0,0x004F,0x64
    Reg = 0,0x0050,0x00
    Reg = 0,0x0051,0x00
    Reg = 0,0x0052,0x00
    Reg = 0,0x0053,0x03
    Reg = 0,0x0054,0x00
    Reg = 0,0x0055,0x00
    Reg = 0,0x0056,0x00
    Reg = 0,0x0057,0x00
    Reg = 0,0x0058,0x5E
    Reg = 0,0x0059,0x00
    Reg = 0,0x005A,0x00
    Reg = 0,0x005B,0x32
    Reg = 0,0x005C,0x1A
    Reg = 0,0x005D,0x7A
    Reg = 0,0x005E,0x00
    Reg = 0,0x005F,0x00
    Reg = 0,0x0060,0x00
    Reg = 0,0x0061,0x00
    Reg = 0,0x0062,0x00
    Reg = 0,0x0063,0x00
    Reg = 0,0x0064,0x00
    Reg = 0,0x0065,0x3C
    Reg = 0,0x0066,0x00
    Reg = 0,0x0067,0x00
    Reg = 0,0x0068,0x00
    Reg = 0,0x0069,0x00
    Reg = 0,0x006A,0x00
    Reg = 0,0x006B,0x00
    Reg = 0,0x006C,0x00
    Reg = 0,0x006D,0x78
    Reg = 0,0x006E,0x88
    Reg = 0,0x006F,0x8A
    Reg = 0,0x0070,0x6B
    Reg = 0,0x0071,0x6C
    Reg = 0,0x0072,0xE1
    Reg = 0,0x0073,0x04
    Reg = 0,0x0074,0x38
    Reg = 0,0x0075,0x0F
    Reg = 0,0x0076,0x00
    Reg = 0,0x0077,0xC5
    Reg = 0,0x0078,0x00
    Reg = 0,0x0079,0x01
    Reg = 0,0x007A,0x0F
    Reg = 0,0x007B,0xFF
    Reg = 0,0x007C,0x20
    Reg = 0,0x007D,0x00
    Reg = 0,0x007E,0x00
    Reg = 0,0x007F,0x00
    Reg = 0,0x00A0,0x02
    Reg = 0,0x00A1,0x0F
    Reg = 0,0x00A2,0x00
    Reg = 0,0x00A3,0x00
    Reg = 0,0x00A4,0x08
    Reg = 0,0x00A5,0x19
    Reg = 0,0x00A7,0x00
    Reg = 0,0x00A8,0x00
    Reg = 0,0x00A9,0x00
    Reg = 0,0x00AA,0x00
    Reg = 0,0x00AB,0x00
    Reg = 0,0x00AC,0x00
    Reg = 0,0x00AD,0x00
    Reg = 0,0x00AE,0x00
    Reg = 0,0x00AF,0x00
    Reg = 0,0x00B0,0x02
    Reg = 0,0x00B1,0x6A
    Reg = 0,0x00B2,0x00
    Reg = 0,0x00B3,0x08
    Reg = 0,0x00B4,0x25
    Reg = 0,0x00B5,0x00
    Reg = 0,0x00B6,0x18
    Reg = 0,0x00B7,0x00
    Reg = 0,0x00B8,0x8A
    Reg = 0,0x00B9,0x33
    Reg = 0,0x00BA,0x83
    Reg = 0,0x00BB,0x74
    Reg = 0,0x00BC,0x80
    Reg = 0,0x00BD,0x00
    Reg = 0,0x00BE,0x00
    Reg = 0,0x00BF,0x00
    Reg = 0,0x00D0,0x00
    Reg = 0,0x00D2,0x94
    Reg = 0,0x00D3,0x17
    Reg = 0,0x00D4,0x60
    Reg = 0,0x00D5,0xF2
    Reg = 0,0x00D6,0x00
    Reg = 0,0x00D7,0x02
    Reg = 0,0x00D8,0x00
    Reg = 0,0x00D9,0x00
    Reg = 0,0x00DA,0x00
    Reg = 0,0x00DB,0x00
    Reg = 0,0x00DC,0x00
    Reg = 0,0x00DD,0x00
    Reg = 0,0x00DE,0x00
    Reg = 0,0x00DF,0x00
    Reg = 0,0x00F0,0x5F
    Reg = 0,0x00F1,0x55
    Reg = 0,0x00F2,0x42
    Reg = 0,0x00F3,0x39
    Reg = 0,0x00F4,0x35
    Reg = 0,0x00F5,0x34
    Reg = 0,0x00F8,0x00
    Reg = 0,0x00F9,0x00
    Reg = 0,0x00FA,0x00
    Reg = 0,0x00FB,0x00
    
    [REGISTERS]
    Device = ALP Nano 1 - DS90UB953/953A/951, Connector 1
    Comments = "953a"
    Date = 06/06/2019
    Time = 12:31:23
    Reg = 0,0x0000,0x30
    Reg = 0,0x0001,0x00
    Reg = 0,0x0003,0x58
    Reg = 0,0x0004,0x00
    Reg = 0,0x0005,0x03
    Reg = 0,0x0006,0x2C
    Reg = 0,0x0007,0xFA
    Reg = 0,0x0008,0xFE
    Reg = 0,0x0009,0x1E
    Reg = 0,0x000A,0x10
    Reg = 0,0x000B,0x7F
    Reg = 0,0x000C,0x7F
    Reg = 0,0x000D,0x0F
    Reg = 0,0x000E,0xF0
    Reg = 0,0x000F,0x00
    Reg = 0,0x0010,0x00
    Reg = 0,0x0011,0x00
    Reg = 0,0x0012,0x00
    Reg = 0,0x0013,0x00
    Reg = 0,0x0014,0x00
    Reg = 0,0x0016,0x18
    Reg = 0,0x001E,0x00
    Reg = 0,0x0023,0x00
    Reg = 0,0x0029,0x33
    Reg = 0,0x002A,0x01
    Reg = 0,0x0035,0x10
    
    [REGISTERS]
    Device = ALP Nano 1 - DS90UB953/953A/951, Connector 1
    Comments = "953b"
    Date = 06/06/2019
    Time = 12:31:45
    Reg = 0,0x0000,0x32
    Reg = 0,0x0001,0x00
    Reg = 0,0x0003,0x58
    Reg = 0,0x0004,0x00
    Reg = 0,0x0005,0x03
    Reg = 0,0x0006,0x2C
    Reg = 0,0x0007,0xFA
    Reg = 0,0x0008,0xFE
    Reg = 0,0x0009,0x1E
    Reg = 0,0x000A,0x10
    Reg = 0,0x000B,0x7F
    Reg = 0,0x000C,0x7F
    Reg = 0,0x000D,0x0F
    Reg = 0,0x000E,0xF0
    Reg = 0,0x000F,0x00
    Reg = 0,0x0010,0x00
    Reg = 0,0x0011,0x00
    Reg = 0,0x0012,0x00
    Reg = 0,0x0013,0x00
    Reg = 0,0x0014,0x00
    Reg = 0,0x0016,0x18
    Reg = 0,0x001E,0x00
    Reg = 0,0x0023,0x00
    Reg = 0,0x0029,0x33
    Reg = 0,0x002A,0x01
    Reg = 0,0x0035,0x11
    
    attached are the register dumps after the script above is run.

  • Hi Martin,

    Thank you for sharing, I haven't gotten the chance to go through everything but one thing I noticed immediately is that the CSI Transmitter is set for 400Mbps/lane. Can you increase this to 800Mbps? and share the results. With a (1920x1080) x16bpp x30fps and with the CSI overhead (25%), we are looking at around 1.244Gbps of line rate or 311Mbps/lane for one camera. I'm wondering if this is a bandwidth issue and when you start to transmit with 2x imagers, it starts causing errors. You don't need to be changing CSI Timing Parameters when you set the output to 800Mbps, just change the values in register 0x1F[1:0].

    In 954-port0.txt, you have register 0x20=0x10. This disables Port0 and enables Port1, you want to enable both ports. Unless this dump was when you intentionally had one port turned off.

    There's some COR (Clear on Read) registers on the 954 side, can you please read them twice to see if they are actually flagging errors of it's just something that happened during initialization. So read them once to COR, wait like 20 seconds and read it again. I've listed the regsiters below.

    0x22

    0x37

    0x0F

    0xFF

    Regards,
    Mandeep Singh

  • The clock is now set set at 800MHz ,

    register 0x22 is

    register 0x37

    register 0x07 is gpio input control

    register 0xFF I have no access to ...

    So , with both RX ports on , alp shows

    The forwarding is set up as below.

    registers on 954   at this time are

    [REGISTERS]
    Device = ALP Nano 1 - DS90UB954, Connector 1
    Comments = "954"
    Date = 06/07/2019
    Time = 11:50:20
    Reg = 0,0x0000,0x60
    Reg = 0,0x0001,0x00
    Reg = 0,0x0002,0x1E
    Reg = 0,0x0003,0x20
    Reg = 0,0x0004,0xDF
    Reg = 0,0x0005,0x01
    Reg = 0,0x0006,0x00
    Reg = 0,0x0007,0xFE
    Reg = 0,0x0008,0x1C
    Reg = 0,0x0009,0x10
    Reg = 0,0x000A,0x7A
    Reg = 0,0x000B,0x7A
    Reg = 0,0x000C,0x83
    Reg = 0,0x000D,0x09
    Reg = 0,0x000E,0x00
    Reg = 0,0x000F,0x7F
    Reg = 0,0x0010,0x00
    Reg = 0,0x0011,0x00
    Reg = 0,0x0012,0x00
    Reg = 0,0x0013,0x00
    Reg = 0,0x0014,0x00
    Reg = 0,0x0015,0x00
    Reg = 0,0x0016,0x00
    Reg = 0,0x0017,0x00
    Reg = 0,0x0018,0x00
    Reg = 0,0x0019,0x00
    Reg = 0,0x001A,0x00
    Reg = 0,0x001B,0x00
    Reg = 0,0x001C,0x00
    Reg = 0,0x001D,0x00
    Reg = 0,0x001E,0x04
    Reg = 0,0x001F,0x02
    Reg = 0,0x0020,0x00
    Reg = 0,0x0021,0x0C
    Reg = 0,0x0022,0x00
    Reg = 0,0x0023,0x00
    Reg = 0,0x0024,0x00
    Reg = 0,0x0025,0x00
    Reg = 0,0x0026,0x00
    Reg = 0,0x0027,0x00
    Reg = 0,0x0028,0x00
    Reg = 0,0x0029,0x00
    Reg = 0,0x002A,0x00
    Reg = 0,0x002B,0x00
    Reg = 0,0x002C,0x00
    Reg = 0,0x002D,0x00
    Reg = 0,0x002E,0x00
    Reg = 0,0x002F,0x00
    Reg = 0,0x0030,0x00
    Reg = 0,0x0031,0x00
    Reg = 0,0x0032,0x00
    Reg = 0,0x0033,0x03
    Reg = 0,0x0034,0x40
    Reg = 0,0x0035,0x01
    Reg = 0,0x0036,0x00
    Reg = 0,0x0037,0x00
    Reg = 0,0x0038,0x00
    Reg = 0,0x0039,0x00
    Reg = 0,0x003A,0x00
    Reg = 0,0x003B,0x01
    Reg = 0,0x003C,0x14
    Reg = 0,0x003D,0x6F
    Reg = 0,0x003E,0x00
    Reg = 0,0x003F,0x40
    Reg = 0,0x0040,0x00
    Reg = 0,0x0041,0xA7
    Reg = 0,0x0042,0x71
    Reg = 0,0x0043,0x01
    Reg = 0,0x0044,0x00
    Reg = 0,0x0045,0x00
    Reg = 0,0x0046,0x00
    Reg = 0,0x0047,0x00
    Reg = 0,0x0048,0x00
    Reg = 0,0x0049,0x00
    Reg = 0,0x004A,0x00
    Reg = 0,0x004B,0x12
    Reg = 0,0x004C,0x12
    Reg = 0,0x004D,0x43
    Reg = 0,0x004E,0x04
    Reg = 0,0x004F,0x64
    Reg = 0,0x0050,0x00
    Reg = 0,0x0051,0x00
    Reg = 0,0x0052,0x00
    Reg = 0,0x0053,0x03
    Reg = 0,0x0054,0x00
    Reg = 0,0x0055,0x00
    Reg = 0,0x0056,0x00
    Reg = 0,0x0057,0x00
    Reg = 0,0x0058,0x5E
    Reg = 0,0x0059,0x00
    Reg = 0,0x005A,0x00
    Reg = 0,0x005B,0x32
    Reg = 0,0x005C,0x1A
    Reg = 0,0x005D,0x7A
    Reg = 0,0x005E,0x00
    Reg = 0,0x005F,0x00
    Reg = 0,0x0060,0x00
    Reg = 0,0x0061,0x00
    Reg = 0,0x0062,0x00
    Reg = 0,0x0063,0x00
    Reg = 0,0x0064,0x00
    Reg = 0,0x0065,0x3C
    Reg = 0,0x0066,0x00
    Reg = 0,0x0067,0x00
    Reg = 0,0x0068,0x00
    Reg = 0,0x0069,0x00
    Reg = 0,0x006A,0x00
    Reg = 0,0x006B,0x00
    Reg = 0,0x006C,0x00
    Reg = 0,0x006D,0x78
    Reg = 0,0x006E,0x88
    Reg = 0,0x006F,0x88
    Reg = 0,0x0070,0x6B
    Reg = 0,0x0071,0x6C
    Reg = 0,0x0072,0xE1
    Reg = 0,0x0073,0x04
    Reg = 0,0x0074,0x38
    Reg = 0,0x0075,0x0F
    Reg = 0,0x0076,0x00
    Reg = 0,0x0077,0xC5
    Reg = 0,0x0078,0x00
    Reg = 0,0x0079,0x01
    Reg = 0,0x007A,0x00
    Reg = 0,0x007B,0x00
    Reg = 0,0x007C,0x20
    Reg = 0,0x007D,0x00
    Reg = 0,0x007E,0x00
    Reg = 0,0x007F,0x00
    Reg = 0,0x00A0,0x02
    Reg = 0,0x00A1,0x0F
    Reg = 0,0x00A2,0x00
    Reg = 0,0x00A3,0x00
    Reg = 0,0x00A4,0x08
    Reg = 0,0x00A5,0x19
    Reg = 0,0x00A7,0x00
    Reg = 0,0x00A8,0x00
    Reg = 0,0x00A9,0x00
    Reg = 0,0x00AA,0x00
    Reg = 0,0x00AB,0x00
    Reg = 0,0x00AC,0x00
    Reg = 0,0x00AD,0x00
    Reg = 0,0x00AE,0x00
    Reg = 0,0x00AF,0x00
    Reg = 0,0x00B0,0x02
    Reg = 0,0x00B1,0x4A
    Reg = 0,0x00B2,0x00
    Reg = 0,0x00B3,0x08
    Reg = 0,0x00B4,0x25
    Reg = 0,0x00B5,0x00
    Reg = 0,0x00B6,0x18
    Reg = 0,0x00B7,0x00
    Reg = 0,0x00B8,0x8A
    Reg = 0,0x00B9,0x33
    Reg = 0,0x00BA,0x83
    Reg = 0,0x00BB,0x74
    Reg = 0,0x00BC,0x80
    Reg = 0,0x00BD,0x00
    Reg = 0,0x00BE,0x00
    Reg = 0,0x00BF,0x00
    Reg = 0,0x00D0,0x00
    Reg = 0,0x00D2,0x94
    Reg = 0,0x00D3,0x0F
    Reg = 0,0x00D4,0x60
    Reg = 0,0x00D5,0xF2
    Reg = 0,0x00D6,0x00
    Reg = 0,0x00D7,0x03
    Reg = 0,0x00D8,0x00
    Reg = 0,0x00D9,0x00
    Reg = 0,0x00DA,0x00
    Reg = 0,0x00DB,0x00
    Reg = 0,0x00DC,0x00
    Reg = 0,0x00DD,0x00
    Reg = 0,0x00DE,0x00
    Reg = 0,0x00DF,0x00
    Reg = 0,0x00F0,0x5F
    Reg = 0,0x00F1,0x55
    Reg = 0,0x00F2,0x42
    Reg = 0,0x00F3,0x39
    Reg = 0,0x00F4,0x35
    Reg = 0,0x00F5,0x34
    Reg = 0,0x00F8,0x00
    Reg = 0,0x00F9,0x00
    Reg = 0,0x00FA,0x00
    Reg = 0,0x00FB,0x00
    

    So , the issue is still trying to transmit a line concatenated frame based on two 953 yuv 422 8 bit color bar 1080p test patterns.

  • Also ,  we could reduce the frame rate of the color bar test pattern to 15ips  and see if that helps, but I am not sure if the color bars are line synched enough for concatenation to work?

  • Also , forgot to mention that we start clock at 800 then go to 400 MHz as the Cx3 can only support up to about 500 MHZ clock ,

  • So , today we set the CSI2 clock to 400MHz and the ds90UB953 color bar regs to give out 1080p at 15ips rather than 30 ips 

    Now reg 0x22 is showing FWD-SYNC0  bit high and the FWD_SYNC_FAIL0 toggles randomly as an when read.

    Still no video on CX3 side but more setup is required for the frame parameters for this device .

    So when the 2 color bars are concatenated frames . what are then the merged parameters ? 

    Is  the frame size 3840 x 2 by 1080  resolution and h frame is 2 x color bar setting and v frame 1 x ? 

    we  need these values for the CX3 parameters .

    regards 

  • To run the data at 800Mbps, you just need to use a 400MHz clock, so please leave the CSI rate at 800Mbps in register 0x1F and for the CX3, the clock should be 400MHz. You don't have FrameSync enabled in the reg dump you just shared. If this doesn't help, please reduce the fps. Re-share the dump, make sure to read twice like you did in the last dump.

  • Will try tomorrow. Still need to figure out the frame height x width and h sync v sync with respect to figure 35 from the DS90UB954 data sheet page 56  

  • 800MHz , will not work with the cx3 device, 

    Still need to know the parameters of a concatenated frame 

  • Hi Martin,

    I looked into this further and found out that the patgen siganls are running off of an internal oscillator; therefore, you cannot syncronize two different patgens. They will not align their data to a framesync signal. The line concatenation is intended for imager sensors.

    Regards,
    Mandeep Singh

  • Do you have access to two imagers that can work with the 953? I recommend repeating this with the sensors and see if you can capture with the CX3 that way.

    Regards,
    Mandeep Singh

  • Additionally, when you are doing line concatenation. The horizontal lines will be summed together, example 2x (1920x1080) will equal (3840x1080).

  • So , I can set 2 AP1302 to take in sync pulses at 15ips from the 953 devices .

    The 954 under alp reports the following

    The forwarding is set as follows

    So what CSI TX registers can we check to see what the 954 is streaming out ?

    what CSI TX registers

  • Hi Martin,

    Part of your reply did not get posted.

    You can check registers 0x35 on the DS90UB954-Q1 as an indicator on whether there's valid data avaliable for deliver on the CSI TX Port.

    Regards,
    Mandeep Singh

  • Martin,

    Was this issue resolved or is it still ongoing?

    Thanks,

    Casey 

  • still ongoing ,

    we have checked the strobe output of tha ar1335 sensors as controlled by the ap1302 isp and can see +/25uS between the sync pulses. 

    Alp reports the input streams as 1920 x 2160 for the 1080p output , so if the number of lines is 2160 then 25uS may be too much for the line concatenation to lock too, 

    We never see the 954 0x25 reg indicating good sync .

    The next step is to drive the AR1355 sync pins direct with the 953 generated Frame sync pulses and see if we can achieve  line concatenation

  • Hi Martin,

    I know the issue is ongoing but do you have any specific questions for us related to this post?

    Regards,
    Mandeep Singh

  • Hi Martin,

    I'm closing this post as it seems there's no further questions related to this specific post. If there's any new questions that arise, please feel free to ask them on a new post and link this one if necessary. Thanks!

    Regards,
    Mandeep Singh