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.

DS90UB925Q-Q1: Recommended "debug" registers

Part Number: DS90UB925Q-Q1

Hello,

I would like to ask for a little help, working with the DS90UB925 Ser and the DS90UB954 Des chips.

At the moment on our prototype PCB, I am able to i2c locally to each chip.  I am able to i2cget & i2cset the registers for the SER and as well as the DES --- via a raspberry pi I2C interface.

So far, I have managed (with the help of example python scripts) to place the DES in pattern generator mode,  while with the SER I have not been able to place it in pattern generator mode (even after following the SNLA132e app notes).  I know for sure that I've made some mistake in some transmitted i2c register parameter.

What I would like to ask,  is what debug sequence can I follow when querying the i2c registers on the DS90UB954 DES chip and which registers to debug the DS90UB925 SER chip?

The intended application is for the analog RGB input -->  ADV7401  to RGB888 digital --> DS90ub925 SER to --> DS90ub954 DES to CSI-2 output.

  • Hi Francisco,

    Thanks for reaching out to us. This is what I normally start with.

    1. Normally, I start my debug by verifying the display. So, first you need to connect locally if you can generate the patgen from UB954 to display.
    2. Once it displayed, you can create a patgen from UB925 -> UB954 -> Display.
    3. If step 2 is successfully, you can provide the information from the RGB. Usually the video converter might be an issue, you need to verify the video converter with a display before you connect to UB925.

    Hope this helps. Let me know if you have further questions.

    Aaron

  • Aaron Heng said:
    1. Normally, I start my debug by verifying the display. So, first you need to connect locally if you can generate the patgen from UB954 to display.
    2. Once it displayed, you can create a patgen from UB925 -> UB954 -> Display.
    3. If step 2 is successfully, you can provide the information from the RGB. Usually the video converter might be an issue, you need to verify the video converter with a display before you connect to UB925.

    Hi Aaron,

    Thank you so very much for the feedback.  Yes, that is precisely my method of attack for working with these integrated and interconnected semiconductors. 

    I have searched the forums for PATGEN examples for the DS90UB954. And thanks to those examples I do have a basic python script as a starting point .

    If I may, I append a copy of the script.  Please advise if I am mistaken a register, or incorrectyly selected a hex value.

    import time
    from smbus2 import SMBus
    
    board = SMBus(1)
    
    
    devAddr = 0x30  #NB, addr 0x60 is divided by 2 in linux  i2cdetect -y -0
    # CSI sel and CSI enable
    
    #write_byte_data(devAddr,register,value,force=None) 
    
    board.write_byte_data(devAddr,0x32, 0x01,force=None)
    time.sleep(0.5)
    board.write_byte_data(devAddr,0x33, 0x33,force=None)
    time.sleep(0.5)
    
    # enable pat gen
    board.write_byte_data(devAddr,0xB0, 0x00,force=None)
    board.write_byte_data(devAddr,0xB1, 0x01,force=None)
    board.write_byte_data(devAddr,0xB2, 0x01,force=None)
    print(" #enable pattern generator")
    board.write_byte_data(devAddr,0xB1, 0x02,force=None)
    board.write_byte_data(devAddr,0xB2, 0xB9,force=None) 
    print(" #fixed color pattern, 8 color bars, block size of 9 ")
    board.write_byte_data(devAddr,0xB1, 0x03,force=None)
    board.write_byte_data(devAddr,0xB2, 0x24,force=None) 
    print(" #CSI Data Identifier (0x24 = RGB888, 0x2C = 12-bit,force=None) ")
    board.write_byte_data(devAddr,0xB1, 0x04,force=None)
    board.write_byte_data(devAddr,0xB2, 0x07,force=None) 
    print(" #line size (15:8) - # PGEN_LINE_SIZE1 = MSB of 640 pixels give 1920 bytes = (07)80h")
    board.write_byte_data(devAddr,0xB1, 0x05,force=None)
    board.write_byte_data(devAddr,0xB2, 0x80,force=None)
    print("  #line size (7:0) - # PGEN_LINE_SIZE0 = LSB of 640 pixels of 1920 bytes = 07(80)h ")
    board.write_byte_data(devAddr,0xB1, 0x06,force=None)
    board.write_byte_data(devAddr,0xB2, 0x02,force=None)
    print("  #bar size (15:8) - # PGEN_BAR_SIZE0 = MSB of color byte size ??")
    board.write_byte_data(devAddr,0xB1, 0x07,force=None)
    board.write_byte_data(devAddr,0xB2, 0xd0,force=None)
    print("   #bar size (7:0) - # PGEN_BAR_SIZE1 = LSB of color byte size ??")
    board.write_byte_data(devAddr,0xB1, 0x08,force=None)
    board.write_byte_data(devAddr,0xB2, 0x01,force=None)
    print(" #active lines per frame (15:8) - # PGEN_ACT_LPF1 = MSB of Num actives Lines = 480 = (01)E0h")
    board.write_byte_data(devAddr,0xB1, 0x09,force=None)
    board.write_byte_data(devAddr,0xB2, 0xE0,force=None)
    print("   #active lines per frame (7:0) - # PGEN_ACT_LPF0 = LSB of Num actives Lines = 480 = 01(E0)h")
    board.write_byte_data(devAddr,0xB1, 0x0a,force=None)
    board.write_byte_data(devAddr,0xB2, 0x02,force=None)
    print("   #total lines per frame (15:8) - # PGEN_TOT_LPF1 = MSB of Num Total Lines = 525 = (02)0Dh ; Includes Vertical Blanking")
    board.write_byte_data(devAddr,0xB1, 0x0b,force=None)
    board.write_byte_data(devAddr,0xB2, 0x0D,force=None)
    print("   #total lines per frame (7:0) - # PGEN_TOT_LPF0 = LSB of Num Total Lines = 525 = 02(0D)h ; Includes Vertical Blanking")
    board.write_byte_data(devAddr,0xB1, 0x0c,force=None)
    board.write_byte_data(devAddr,0xB2, 0x7c,force=None)
    print("   #line period (15:8) - # PGEN_LINE_PD1 = MSB of Line period = 31750ns = (7c)06h")
    board.write_byte_data(devAddr,0xB1, 0x0d,force=None)
    board.write_byte_data(devAddr,0xB2, 0x06,force=None)
    print("   #line period (7:0) - # PGEN_LINE_PD0 = LSB of Line period = 31750ns = 7c(06)h")
    board.write_byte_data(devAddr,0xB1, 0x0E,force=None)
    board.write_byte_data(devAddr,0xB2, 0x0A,force=None) 
    print(" #vertical back porch - #PGEN_VBP Num Pixels [Frame Start (0,0)]-[Active Video Line Start] ;	aka Front porch in TinyVGA table = 10 = 0Ah")
    board.write_byte_data(devAddr,0xB1, 0x0f,force=None)
    
    board.write_byte_data(devAddr,0xB2, 0x21,force=None)
    print(" #vertical front porch - #PGEN_VFP Num Pixels [Active Video Line end]-[Frame END]; aka Back porch in TinyVGA table = 33 = 21h")
    
    #0xff0, 0x000, 0x000, 0xff0, 0x000, 0x000
    board.write_byte_data(devAddr,0xB1, 0x10,force=None)
    board.write_byte_data(devAddr,0xB2, 0xff,force=None) #1st byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x11,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #2nd byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x12,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #3rd byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x13,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #4th byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x14,force=None)
    board.write_byte_data(devAddr,0xB2, 0xff,force=None) #5th byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x15,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #6th byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x16,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #7th byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x17,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #8th byte of fixed color
    board.write_byte_data(devAddr,0xB1, 0x18,force=None)
    board.write_byte_data(devAddr,0xB2, 0x00,force=None) #9th byte of fixed color

  • For step2.:  925 (PatGen mode) -->  954 ( RX0 input and CSI output).

    At the moment, I don't know if 925 SER successfully enters PatGen mode.  And so far the 954 DES  CSI-2 side, via oscilloscope I see no Mipi signals present on the clock or data lines.

    Any recommendations would be extremely appreciated.

    I've used the following script to place 954 in RX port 0 input, and CSI output enable

    import time
    from smbus2 import SMBus
    
    board = SMBus(1)
    
    devAddr = 0x30  #NB, addr 0x60 is divided by 2 in linux  i2cdetect -y -1
    
    #write_byte_data(devAddr,register,value,force=None) 
    
    print( "CSI_ENable" )
    board.write_byte_data(devAddr,0x33,0x33) #		
    time.sleep(0.5)
    
    print( "FWD_PORT0" )
    board.write_byte_data(devAddr,0x20,0x20) #		
    time.sleep(0.1)
    
    
    #U3_RX_CSI_OUT:
    print( "CSI_PORT_SEL" )
    board.write_byte_data(devAddr,0x32,0x01)#	CSI0 select
    
    print( "CSI_EN" )
    board.write_byte_data(devAddr,0x33,0x33)#	CSI_EN & CSI0 & Lane 1
    
    print( "FWD_PORT disable" )
    board.write_byte_data(devAddr,0x20,0x20)#	disable forwarding of RX1 to CSI0
    
    print( "FPD3_PORT_SEL Boardcast RX0/1/2/3" )
    board.write_byte_data(devAddr,0x4c,0x00)#	RX_PORT0 read only ; RX0/1 write disabled ????????????
    
    print( "enable pass throu" )
    board.write_byte_data(devAddr,0x58,0x58)#	enable pass throu
    board.write_byte_data(devAddr,0x5c,0x18)#
    board.write_byte_data(devAddr,0x5d,0x60)#
    board.write_byte_data(devAddr,0x65,0x60)#
    
    print( "FV_POLARITY" )
    board.write_byte_data(devAddr,0x7c,0x01)#
    
    print( "YUV422 DT" )
    board.write_byte_data(devAddr,0x70,0x1f)#
    
    #;print( "RAW12 DT RAW12_ID" )
    #; board.write_byte_data(devAddr,0x71,0x2c)#
    
    print( "FPD_MODE")
    board.write_byte_data(devAddr,0x6d,0x7b)#
    
    	;# 0x7b		;"954 mode 4: STP RAW10 Mode/100 MHz (DS90UB913 compatible)"
    	;# 0x7a		;"954 mode 3: STP RAW12 Mode/75 MHz (DS90UB913 compatible))"
    	;# 0x79		;"954 mode 2: STP RAW12 Mode/50 MHz (DS90UB913 compatible)"
    	;# 0x78		;"954 mode 1: STP CSI Mode (DS90UB953 compatible)"

    And by looking at the Application notes for PatGen for the 925 SER:

    import time
    from smbus2 import SMBus
    
    board = SMBus(1)
    
    devAddr = 0x0C  #NB, addr 0x18 is divided by 2 in linux  i2cdetect -y -1
    
    #write_byte_data(devAddr,register,value,force=None) 
    
    time.sleep(0.5)
    
    
    print("####	;;;;;;  Set Pixel Clock and Active Frame Size")
    
    board.write_byte_data(devAddr,0x66,0x03) #		PGCDC1 address;  Calculated as 200Mhz internal / PixelClock = n
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x14) #      	Sets clock divider = 20
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x07) #		PGAFS1 address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x80) #      	[7:0] Active HOR width - LSB of 640 pixels = 2(80)h
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x08) #		PGAFS2 address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x02) #      	[7:4] Active Ver width - LSB of 480 pixels = 1E(0)h #	[3:0] Active HOR width - MSB of 640 pixels = (2)80h
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x09) #		PGAFS3 address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x1E) #      	[7:0] Active Ver Width - MSB of 480 pixels = (1E)0h
    time.sleep(0.1)
    
    print("##########	Set Total Frame Size.")
    
    board.write_byte_data(devAddr,0x66,0x04) #		PGTFS1 address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x20) #      	[7:0] Total HOR width - LSB of 800 pixels = 3(20)h
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x05) #		PGTFS2 address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0xD3) #      	[7:4] Total Ver width - LSB of 525 pixels = 20(D)h # [3:0] Total HOR width - MSB of 800 pixels = (3)20h
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x06) #		PGTFS3	address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x20) #      	[7:0] Total Ver Width - MSB of 525 pixels = (20)Dh
    time.sleep(0.1)
    
    print("################	;;; 	Set Back Porch")
    
    board.write_byte_data(devAddr,0x66,0x0C) #		PGHBP	address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x40) #		Hor Back Porch Width = 48 + 16 pixels = 40h# Horizontal Front porch + Horizontal Back porch
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x0D) #		PGVBP	address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x2B) #		Vertical Back Porch Width = 33 + 10 pixels = 2Bh #	Vertical Front porch + Vertical Back porch
    time.sleep(0.1)
    
    print("#################	;;;	Set Sync Widths")
    
    board.write_byte_data(devAddr,0x66,0x0A) #		PGHSW	address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x60) #		Horizontal Sync Width = 96 pixels = 60h) 
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x66,0x0B) #		PGVSW	address
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x02) #		Vertical Sync Width = 2 = 02h
    time.sleep(0.1)
    
    print("################	;;;	Set Sync Polarities")
    board.write_byte_data(devAddr,0x66,0x0E) #		PBSC	address;		PGIA indirect register
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x67,0x03) #		sets Hor,Ver sync widths to "Negative"
    time.sleep(0.1)
    
    print("################	;;;	Enable Pattern Generation")
    board.write_byte_data(devAddr,0x65,0x03) #		Enable 24-bit internal Clock;		PGGCFG direct register
    time.sleep(0.1)
    
    board.write_byte_data(devAddr,0x64,0x11) #		enable Pat Gen with Specific Colour Pattern;		PGCTL direct register
    time.sleep(0.1)
    

  • Hi Francisco,

    I am not sure if I understood your goal here. DS90UB925 is an IVI serializer device whereas DS90UB954 is an ADAS deserializer device. You can't have 925 connect to 954. They are not possible to connect each other. If you want to test the script with patgen 925, you can use 926 or 948. These are deserializer devices for IVI.

    Hope this helps clear up the confusion.

    Aaron

  • Hi Aaron,

    Thanks for the feedback.  That does explain a lot of why the 925 does not "connect" automagically with the 954.  I thought that RGB888 would be converted by the SER 925 into FPD-linkIII data as RAW10,  which would be received by the 954 DES and converted to CSI-2 RAW10 data.   Thank goodness for the prototype testing phase.  So now I can say, no more sleepless nights not knowing why the patgen code is not doing it's job.

    Okay, so we will have to source the 948 DES chips ( I think in Digikey they were EOL status) - then it's back to the drawing board for our prototype team.

  • Hi Francisco,

    All I can explain to you is 925 and 954 can not be mixed together. They are two different animal. I don't recall we cross check IVI and ADAS devices. If you want to use 954, you need to use 953. If you want to use UB925, its compatible partner devices are 926, 940N, or 948.

    Aaron