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: 954 and 953 register setting for non-sync mode

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

Hi TI support team

About 953&954 mode setting for non-sync CSI mode. 

From TI application notes:  snla267   page 5:  On the 953, register 0x03 controls MODE_SEL after power up and On the 954, register 0x6D bit 1:0 can be controlled for FPD3_MODE (00: CSI Mode)

Because 953&954 mode strap pin can setting by resistor and also control by register. 

Because configuration of the FPD-Link III operating input mode may be done through the MODE input strap pin, or through the configuration register bits. 

So my question is that when mode strap pin setting as sync CSI mode from HW design but SW can re-configuration to non-sync mode with below register. Is it correct ?

DS90UB953 : register address 0x03 value change to 0x5A

DS90UB954:  register address 0x58 value change to 0x5A;  register address 0x6D value change to 0x7C; 

Can you please let me know if i have missing some other register ?

Thanks

Yutai

  • Hello Yutai,

    If both SER and DES are sett to Synch mode, and you want to configure them remotely. this will not work! So you need to reconfigure each device locally.

    But your configuration steps are correct.

    DS90UB953 : register address 0x03 value change to 0x5A

    DS90UB954:  register address 0x58 value change to 0x5A;  register address 0x6D value change to 0x7C; 

  • Thanks your comments.

    Can you please let me known how to reconfigure each device locally?

    E.g :

    Which register need to change after power up?

    Any recommend for those register sequence , which one need write first......

    Thank

    Yutai

  • You need to reconfigure the SER first and then apply digital reset (reg 0x01[0]). After that reconfigure the DES.

  • Hi Hamzeh

    From my understanding as you mention above.

    1. 954&954 working at sync mode from HW  Mode pin (resistors  setting) after power up.

    2.  SOC through 954 back channel to reconfigure SER(953) .  Register 0x03 value change to 0x5A.

    3. Then apply digital reset (reg 0x01[0]) for DES (954)

    4. After that reconfigure the DES (954). Register 0x58 value change to 0x5A,

    5.  Finally configure Image sensor.

    Q1: Please help to check if the process is correct?

    Q2: Please help to check if I missing anything?

    Q3: It is best provide some I2C script demo for non-sync  if you have it.

    Thanks

    Yutai

  • Hi Hamzeh

    Can you please give your comments about my query ?

    From my understanding as you mention above.

    1. 954&954 working at sync mode from HW  Mode pin (resistors  setting) after power up.

    2.  SOC through 954 back channel to reconfigure SER(953) .  Register 0x03 value change to 0x5A.

    3. Then apply digital reset (reg 0x01[0]) for DES (954)

    4. After that reconfigure the DES (954). Register 0x58 value change to 0x5A,

    5.  Finally configure Image sensor.

    Q1: Please help to check if the process is correct?

    Q2: Please help to check if I missing anything?

    Q3: It is best provide some I2C script demo for non-sync  if you have it. 

    Q4: Why we need first to reconfigure SER(953) then to reconfigure DES(954) ? 

    Q5: Can you please check if the below script is correct or not for reconfigure 953&954 to non-sync mode. 

    ###SER(954)###################
    board.WriteI2C(0x60,0x01,0x02)### RESET
    board.WriteI2C(0x60,0x10,0x13)### GPIO
    board.WriteI2C(0x60,0x4C,0x01)### FP3 PORT SEL
    board.WriteI2C(0x60,0x6D,0x7C)### PORT CONFIG
    board.WriteI2C(0x60,0x58,0x5A)### NON-SYNC
    board.WriteI2C(0x60,0xBA,0x83)
    board.WriteI2C(0x60,0x1F,0x00)
    board.WriteI2C(0x60,0x0C,0xBF)
    board.WriteI2C(0x60,0xD5,0x40)
    board.WriteI2C(0x60,0xD4,0x70)
    board.WriteI2C(0x60,0x41,0xA9)
    board.WriteI2C(0x60,0x42,0x01)
    board.WriteI2C(0x60,0x43,0x03)
    board.WriteI2C(0x60,0xD2,0x8C)
    board.WriteI2C(0x60,0xB0,0x1C)
    board.WriteI2C(0x60,0xB1,0x08)
    board.WriteI2C(0x60,0xB2,0x80)
    board.WriteI2C(0x60,0x72,0x00)
    board.WriteI2C(0x60,0x5C,0x12)### SER_ALIAS_ID

    ###DES(953)###################
    board.WriteI2C(0x12,0x01,0x02)### RESET
    board.WriteI2C(0x12,0x03,0x5A)### NON-SYNC
    board.WriteI2C(0x12,0x41,0xA9)
    board.WriteI2C(0x12,0x42,0x01)
    board.WriteI2C(0x12,0x02,0x73)
    board.WriteI2C(0x12,0x06,0x41)
    board.WriteI2C(0x12,0x07,0x28)
    board.WriteI2C(0x12,0x0B,0x13)
    board.WriteI2C(0x12,0x0C,0x26)
    ##############################

    Thanks

    Yutai

  • Hello Yutai,

    Theoritically you steps should work, but I am not 100% sure if this is the case. In the previous post you were talking about "locally" setting the SER registers, but now you want to set them remotely!!

    You need to reconfigure the SER first, otherwise if you reconfigure the DES first you will not be able to communicate with SER anymore.

    I will check your code and comeback to you tomorrow!

  • Thank you.

    Waiting your comments about our I2C code.

    Please share more information about  non-sync mode reconfigure.

    Yutai

  • Hello Yutai,

    I have reviewed your script. Every thing looks okay to configure to Non-Synch Mode.

  • Hi Hamzeh

    Thanks for your comments. 

    Do you means we must to re-configure SER(953) in step 1 and re-configure DES(954) in step2 after power on. Is it correct ?

    BTW: can you please share your Email to me ? Because our software colleague will discuss with you more in detail. 

    Step 1: 

    ###SER(953)###################
    board.WriteI2C(0x12,0x01,0x02)### RESET
    board.WriteI2C(0x12,0x03,0x5A)### NON-SYNC

    etc

    ...................................................................

    Step 2: 

    ###DES(954)###################
    board.WriteI2C(0x60,0x01,0x02)### RESET
    board.WriteI2C(0x60,0x10,0x13)### GPIO
    board.WriteI2C(0x60,0x4C,0x01)### FP3 PORT SEL
    board.WriteI2C(0x60,0x6D,0x7C)### PORT CONFIG
    board.WriteI2C(0x60,0x58,0x5A)### NON-SYNC

    etc

    ...................................................................

    Thanks

    Yutai

  • This is correct.

  • Thank you, Hamzeh

    Have a nice weekend. 

  • Hi Hamzeh

    Update information to you in below. 

  • Hi Hamzeh

    Update status to you.

    Our SW colleague follow up your init seq but we have failed to change to non-sync mode. 

    So in order to solve this issue asap. We want to do the below action to fix this issue. 

    Please help to review HW&SW action and give your comments. 

    HW Action:

    Mode pin: 954 remove pull up 78.7K resistor, keep pull down 97.6K resistor => HW default mode is csi2 non-sync mode.

    SW Action:

    Because camera design have fixed and it can not change HW design.But the serializer mode can overrides from register.

    So we have to change 953 register 0x03 to 0x5A 

    ## 954 I2C ID 0x60

    ## Step 1 configure 954 register

    0x60 W 0x01 0x02 Reset
    0x60 W 0x10 0x13 GPIOx_PIN_CTL (outpue enable)
    0x60 W 0x4C 0x01 FP3 PORT SEL (port 0 write enable)
    0x60 W 0x6D 0x7C PORT_CONFIG( Coax mode ; CSI mode)
    0x60 W 0x58 0x5A BCC CONFIG ( Sync-back channel mode)
    0x60 W 0xBA 0x83 FP3 ENC CTL (fpd3 encode crc)
    0x60 W 0x1F 0x00 CSI PLL CTL (1.6Gbps serial rate)
    0x60 W 0x0C 0xBF RX PORT CTL(enable port lock, enable port receiver)
    0x60 W 0xD5 0x40 AEQ MIN MAX
    0x60 W 0xD4 0x70 AED APTIVE EQ BYPASS
    0x60 W 0x41 0xA9 RESERVED
    0x60 W 0x42 0x01 AEQ CTL1
    0x60 W 0x43 0x03 AEQ ERR THOLD
    0x60 W 0xD2 0x8C AEQ CTL2
    0x60 W 0xB0 0x1C IND ACC CTL
    0x60 W 0xB1 0x08 IND ACC ADDR
    0x60 W 0xB2 0x80 IND ACC DATA
    0x60 W 0x72 0x00 CSI VC MAP
    0x60 W 0x5C 0x12 SER ALIAS ID (7 bit remote serializer 953 alias ID; bit0: auto ack)

    ## 953 I2C ID 0x12

    ## Step 2 configure 953 register

    0x12 W 0x01 0x02 Reset
    0x12 W 0x03 0x5A BCC CONFIG ( Sync-back channel mode)
    0x12 W 0x41 0xA9 SLAVE ID ALIAS 0 (7 bit remote serializer alias ID; bit0: auto ack)
    0x12 W 0x42 0x01 SLAVE ID ALIAS 1 (7 bit remote serializer alias ID; bit0: auto ack)
    0x12 W 0x02 0x73 GENERAL CFG (4 lane )
    0x12 W 0x06 0x41 CLKOUT CTRL0 (HS_CLK_DIV=4, M=1)
    0x12 W 0x07 0x28 CLKOUT CTRL1 (DIV_N_VAL=)
    0x12 W 0x0B 0x13 SCL HIGH TIME
    0x12 W 0x0C 0x26 SCL LOW TIME

    ## Step 3 configure image sensor AR0220 register

    ..................................

    Thanks

    Yutai 

  • Hello Yutai,

     

    If you change the DES to Non-Synch, and your Camera is by default set to Synch mode, you will not be able to communicate with the camera anymore!

    The only reliable way is to change the Camera HW, or to override the Camera Mode LOCALLY not Remotely!

     

  • Hi Hamzeh

    I can successfully run the code as mention in both HW&SW action  Please find ALP tools run status.

    So I don't understand your comments " you will not be able to communication with camera anymore"


    # Patgen YUV ColorBar 1920x1080p30 on 953/954
    # Change list:
    #

    import time

    # 953 config
    runTime = 3

    Alias953 = 0x12
    DES954 = 0x60


    # Reset 954
    board.WriteI2C(DES954, 0x01, 0x02)
    time.sleep(1.0)

    # GPIOx_PIN_CTL (outpue enable)
    board.WriteI2C(DES954, 0x10, 0x13)
    time.sleep(1.0)

    # FP3 PORT SEL (port 0 write enable)
    board.WriteI2C(DES954, 0x4C, 0x01)
    time.sleep(1.0)

    # PORT_CONFIG( Coax mode ; CSI mode)
    board.WriteI2C(DES954, 0x6D, 0x7C)
    time.sleep(1.0)

    # SYNC MODE => 0x5E for Sync mode; 0x5A for Non-Sync mode
    board.WriteI2C(DES954, 0x58, 0x5A)
    time.sleep(1.0)

    # FP3 ENC CTL (fpd3 encode crc)
    board.WriteI2C(DES954, 0xBA, 0x83)
    time.sleep(1.0)

    # CSI PLL CTL (1.6Gbps serial rate)
    board.WriteI2C(DES954, 0x1F, 0x00)
    time.sleep(1.0)

    # RX PORT CTL(enable port lock, enable port receiver)
    board.WriteI2C(DES954, 0x0C, 0xBF)
    time.sleep(1.0)

    # AEQ MIN MAX
    board.WriteI2C(DES954, 0xD5, 0x40)
    time.sleep(1.0)

    # AED APTIVE EQ BYPASS
    board.WriteI2C(DES954, 0xD4, 0x70)
    time.sleep(1.0)

    # RESERVED
    board.WriteI2C(DES954, 0x41, 0xA9)
    time.sleep(1.0)
    # AEQ CTL1
    board.WriteI2C(DES954, 0x42, 0x01)
    time.sleep(1.0)

    # AEQ ERR THOLD
    board.WriteI2C(DES954, 0x43, 0x03)
    time.sleep(1.0)

    # AEQ CTL2
    board.WriteI2C(DES954, 0xD2, 0x8C)
    time.sleep(1.0)

    # IND ACC CTL
    board.WriteI2C(DES954, 0xB0, 0x1C)
    time.sleep(1.0)

    # IND ACC ADDR
    board.WriteI2C(DES954, 0xB1, 0x08)
    time.sleep(1.0)

    # IND ACC DATA
    board.WriteI2C(DES954, 0xB2, 0x80)
    time.sleep(1.0)

    # CSI VC MAP
    board.WriteI2C(DES954, 0x72, 0x00)
    time.sleep(1.0)

    # CSI enable , continuous clock, 4 lanes with 1.6Gbps => NEW FOR CSI OUTPUT ENABLE
    board.WriteI2C(DES954, 0x33, 0x03)
    time.sleep(0.1)

    # forwarding of all RX to CSI0 => NEW FOR CSI OUTPUT ENABLE
    board.WriteI2C(DES954, 0x20,0x00)
    time.sleep(0.1)

    #SER ALIAS ID (7 bit remote serializer 953 alias ID; bit0: auto ack)
    board.WriteI2C(DES954, 0x5C, 0x12)
    time.sleep(1.0)

    #SER Address HEX 30 same as DEC 48
    if (board.ReadI2C(Alias953, 0x00, 0x01) != 0x30):
    print "953 ID Error"
    else:
    print "953 ID Ok"

    # Reset 953
    board.WriteI2C(Alias953, 0x01, 0x02)
    time.sleep(1.0)

    # Non-Snyc mode=> New 0x48 for Sync mode; 0x5A for Non-Sync mode;
    board.WriteI2C(Alias953, 0x03, 0x5A)
    time.sleep(1.0)

    # SLAVE ID ALIAS 0 (7 bit remote serializer alias ID; bit0: auto ack)
    board.WriteI2C(Alias953, 0x41, 0xA9)
    time.sleep(1.0)

    # SLAVE ID ALIAS 1 (7 bit remote serializer alias ID; bit0: auto ack)
    board.WriteI2C(Alias953, 0x42, 0x01)
    time.sleep(1.0)

    # GENERAL CFG (4 lane )
    board.WriteI2C(Alias953, 0x02, 0x73)
    time.sleep(1.0)

    # CLKOUT CTRL0 (HS_CLK_DIV=4, M=1)
    board.WriteI2C(Alias953, 0x06, 0x41)
    time.sleep(1.0)

    # CLKOUT CTRL1 (DIV_N_VAL=)
    board.WriteI2C(Alias953, 0x07, 0x28)
    time.sleep(1.0)

    # SCL HIGH TIME
    board.WriteI2C(Alias953, 0x0B, 0x13)
    time.sleep(1.0)

    # SCL LOW TIME
    board.WriteI2C(Alias953, 0x0C, 0x26)
    time.sleep(1.0)

    # enable pat gen
    board.WriteI2C(Alias953, 0xB0, 0x00)
    board.WriteI2C(Alias953, 0xB1, 0x01)
    board.WriteI2C(Alias953, 0xB2, 0x01) #enable pattern generator

    board.WriteI2C(Alias953, 0xB1, 0x02)
    board.WriteI2C(Alias953, 0xB2, 0x33) #fixed color pattern, 8 color bars, block size of 5

    board.WriteI2C(Alias953, 0xB1, 0x03)
    board.WriteI2C(Alias953, 0xB2, 0x1E) #CSI Data Identifier (0x24 = RGB888, 0x2C = RAW12, 0x2B = RAW10)

    board.WriteI2C(Alias953, 0xB1, 0x04)
    board.WriteI2C(Alias953, 0xB2, 0x0f) #line size (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x05)
    board.WriteI2C(Alias953, 0xB2, 0x00) #line size (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x06)
    board.WriteI2C(Alias953, 0xB2, 0x01) #bar size (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x07)
    board.WriteI2C(Alias953, 0xB2, 0xe0) #bar size (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x08)
    board.WriteI2C(Alias953, 0xB2, 0x04) #active lines per frame (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x09)
    board.WriteI2C(Alias953, 0xB2, 0x38) #active lines per frame (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0a)
    board.WriteI2C(Alias953, 0xB2, 0x04) #total lines per frame (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x0b)
    board.WriteI2C(Alias953, 0xB2, 0x65) #total lines per frame (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0c)
    board.WriteI2C(Alias953, 0xB2, 0x0b) #line period (15:8)

    board.WriteI2C(Alias953, 0xB1, 0x0d)
    board.WriteI2C(Alias953, 0xB2, 0x93) #line period (7:0)

    board.WriteI2C(Alias953, 0xB1, 0x0e)
    board.WriteI2C(Alias953, 0xB2, 0x21) #vertical back porch

    board.WriteI2C(Alias953, 0xB1, 0x0f)
    board.WriteI2C(Alias953, 0xB2, 0x0a) #vertical front porch

    board.WriteI2C(Alias953, 0xB1, 0x10)
    board.WriteI2C(Alias953, 0xB2, 0x00) #1st byte of fixed color

    board.WriteI2C(Alias953, 0xB1, 0x11)
    board.WriteI2C(Alias953, 0xB2, 0x00) #2nd byte of fixed color

    board.WriteI2C(Alias953, 0xB1, 0x12)
    board.WriteI2C(Alias953, 0xB2, 0xFF) #3rd byte of fixed color

    Thanks

    Yutai

  • Hello Yutai,

    Yes, as I said, if your DES is by default set to Non-Synch mode, but the SER is set to Synch Mode, you will not be able to communicate between them!

    I believe, your SER is always in Non-Synch Mode!

  • Hi Hamzeh

    No, The SER default working in sync mode. 

    Because I use ALP read the 0x03 register the value is 0x48. So I believe it can communicate after power up before I run the Python scripts.

    Thanks

    Yutai

  • Hello Yutai,

    This is something strange! Normally once the SER running of the Synch mode, it means the clock source of the SER is the back channel clock. But once you change the mode on the DES to Non-Synch, that means you stop sending any clock to the SER! 

    Anyways, it looks like your problem is solved now and you can work and communicate normally, correct!

  • Hi Hamzeh

    Although I can use ALP tools to communicate with DES (non-sync mode) and SER(sync mode) after power up.

    And I can set correct register to change SER run in non-sync mode used Python scripts ( e.g. board.WriteI2C(Alias953, 0x03, 0x5A)

    But our SW team have issue to implement it and he get the error log to write register 0x03 address value to 0x5A. 

    So it is my confuse about the ALP tools and SW BSP code. 

    @ Hamzeh  // Can you please reproduce it in your side ?  

    HW Setup:  954 EVM board / 953 EVM board / Coax cable / Power supplier / USB2ANY with ALP tools

    Step 1:  954 EVM HW mode pin setting => non-sync mode

    Step 2:  953 EVM HW mode pin setting => sync mode

    Step 3: Power on 954 EVM, coax cable (poc) to power on 953 EVM

    Step 4: USB2ANY with ALP tools to monitor 954&953 default register. 

    Step 5: Please help check your result:

                954 default register 0x58 => 0x5A  ;953 default register 0x03 => 0x48     Is it correct ?

    Step 6: Run  Python scripts to implement DES to non-sync mode.

                e.g. board.WriteI2C(Alias953, 0x03, 0x5A

    Step 7: Please help check your result

                954 register 0x58 => 0x5A  ;953  register 0x03 => 0x5A     Is it correct ?

    Thanks

    Yutai

  • Hello Yutai,

    Sorry, I can't reproduce this in my home office. I do not have the right equipments to do that!

  • Hi Hamzeh

    Understanding......  I will discuss with TI Local FAE team to reproduce this test case.

    Thanks

    Yutai

  • Okay! Thank you!