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.

DS90UH947-Q1: Bring up the display by using 948+external LVDS

Part Number: DS90UH947-Q1

Hi Team,

We can bring up the 947+948+display by using internal patgen with external CLK. Now we want to bring up the display by using external LVDS. As I know, 947 doesn't need any initial if we set the correct mode_sel.

We only need follow section 9.1 to bring up the display by using external LVDS, is it correct?

REgards,

Roy

  • Hello Roy,

    Please use the attached code sample to init 947-948 which includes all the errata and best practices for the devices:

    """
      TI Confidential - NDA Restrictions
    
      Copyright 2020 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.
    
    """
    ############################
    # DS90UB947-Q1 Init Code Example v1.0
    # 947->948, Dual FPD-Link STP, 1920x1080@60Hz
    ############################
    
    import time
    import sys
    
    # System dependant variables - adjust according to system 
    UB947 = 0x18        # 947 I2C Address
    UB948 = 0x68        # Remote 948 Address
    StartAmbTemp = 25   # Example temperature measured by local sensor on PCB (Ambient temp around 947). In real system this should be read back from temp sensor during initialization 
    Hres = 1920         # Expected horizontal active resolution
    Vres = 1080         # Expected vertical active resolution 
    
    def pollstate():
        count=0
        board.WriteI2C(UB947,0x23,0x80)
        board.WriteI2C(UB947,0x24,0x80)
        mask = int('11111',2)
        state = board.ReadI2C(UB947,0x24,1)
        while (state & mask) != 27:   #27 = 5'b11011
            time.sleep(0.01)  #10ms delay
            state = board.ReadI2C(UB947,0x24,1)
            count = count +1
            if count == 10:
                print "Error: Serializer is not in Normal state"
                return(1)
        
        board.WriteI2C(UB947,0x23,0x0)
        board.WriteI2C(UB947,0x24,0x0)
    
            
    
    def initsequence():
    
        board.WriteI2C(UB947,0x03,0xDA) # Set I2C passthrough
        
        linked = 0
        retry = 0
        mask = int('10000000',2)
        while linked == 0:
            STS = board.ReadI2C(UB947,0x5A,1)
            if ((STS & mask) != 0):
                linked = 1
                print "Deserializer Detected"
            else:
                time.sleep(0.1)
                retry = retry + 1
                if retry == 10:
                    print "Error: No Deserializer Detected"
                    return()
    
        board.WriteI2C(UB948,0x4A,0x01) # Disable OLDI outputs on 948 to prevent screen glitches from appearing during the init process 
    
        ##### Init A Sequence
    
        # Errata #5 and 6
        board.WriteI2C(UB947,0x5B,0x03) # Force dual FPD-Link, disable reset on PLL frequency change 
    
        # Errata #10
        board.WriteI2C(UB947,0x16,0x02) # Adjust BCC watchdog timer to minimum
    
        # Errata #11
        board.WriteI2C(UB947,0x04,0x90) # Prevent AVMUTE for non-HDCP systems
    
    
    
        state_error = pollstate()  # Poll 947 state machine prior to applying init B errata
    
        if state_error == 1:
            return()
    
        ##### Init B Sequence 
    
        # Errata #2 
        board.WriteI2C(UB947,0x40,0x10)
        board.WriteI2C(UB947,0x41,0x4A)
        board.WriteI2C(UB947,0x42,0x3F)
        board.WriteI2C(UB947,0x41,0x4B)
    
        if StartAmbTemp < 10:
            board.WriteI2C(UB947,0x42,0x88)
        else:
            board.WriteI2C(UB947,0x42,0x89)
        board.WriteI2C(UB947,0x41,0x49)
        board.WriteI2C(UB947,0x42,0x10)
        board.WriteI2C(UB947,0x42,0x00)
        board.WriteI2C(UB947,0x40,0x14)
        board.WriteI2C(UB947,0x41,0x4A)
        board.WriteI2C(UB947,0x42,0x3F)
        board.WriteI2C(UB947,0x41,0x4B)
        if StartAmbTemp < 10:
            board.WriteI2C(UB947,0x42,0x88)
        else:
            board.WriteI2C(UB947,0x42,0x89)
        board.WriteI2C(UB947,0x41,0x49)
        board.WriteI2C(UB947,0x42,0x10)
        board.WriteI2C(UB947,0x42,0x00)
    
        # Errata #3 
        board.WriteI2C(UB947,0x40,0x10)
        board.WriteI2C(UB947,0x41,0x49)
        board.WriteI2C(UB947,0x42,0x16)
        board.WriteI2C(UB947,0x41,0x47)
        board.WriteI2C(UB947,0x42,0x20)
        board.WriteI2C(UB947,0x42,0xA0)
        board.WriteI2C(UB947,0x42,0x20)
        board.WriteI2C(UB947,0x42,0x00)
        board.WriteI2C(UB947,0x41,0x49)
        board.WriteI2C(UB947,0x42,0x00)
    
        time.sleep(0.01)
    
        ##### Timing Confirmation 
    
        retry = 0
        Hconfirm = 0
        Vconfirm = 0
        while (retry < 3):
            board.WriteI2C(UB948,0x68,0x08) # Enable PATGEN BIST
            time.sleep(0.1) # Critical time delay - do not adjust to a shorter value 
            board.WriteI2C(UB948,0x68,0x19) # H active High monitor
            Hhigh = board.ReadI2C(UB948, 0x69, 1)
            board.WriteI2C(UB948,0x68,0x09) # H active Low monitor
            Hlow = board.ReadI2C(UB948, 0x69, 1)
            board.WriteI2C(UB948,0x68,0x39) # V active High monitor
            Vhigh = board.ReadI2C(UB948, 0x69, 1)
            board.WriteI2C(UB948,0x68,0x29) # V active Low monitor
            Vlow = board.ReadI2C(UB948, 0x69, 1)
            board.WriteI2C(UB948,0x68,0x00) # Disable PATGEN BIST
    
            mask = int('00111111',2)
    
            hlowmask = Hlow & mask
            hhighmask = Hhigh & mask
            vlowmask = Vlow & mask
            vhighmask = Vhigh & mask
    
    
            hhighmask = hhighmask << 6
            vhighmask = vhighmask << 6
    
            Hactive = hhighmask | hlowmask
            Vactive = vhighmask | vlowmask
    
            if Hactive != Hres:
                retry  = retry + 1
                board.WriteI2C(UB947,0x40,0x10) # Reset OLDI PLL
                board.WriteI2C(UB947,0x41,0x49)
                board.WriteI2C(UB947,0x42,0x16)
                board.WriteI2C(UB947,0x41,0x47)
                board.WriteI2C(UB947,0x42,0x20)
                board.WriteI2C(UB947,0x42,0xA0)
                board.WriteI2C(UB947,0x42,0x20)
                board.WriteI2C(UB947,0x42,0x00)
                board.WriteI2C(UB947,0x41,0x49)
                board.WriteI2C(UB947,0x42,0x00)
                time.sleep(0.1)
            else:
                Hconfirm = 1
            if Vactive != Vres:
                retry  = retry + 1
                board.WriteI2C(UB947,0x40,0x10) # Reset OLDI PLL
                board.WriteI2C(UB947,0x41,0x49)
                board.WriteI2C(UB947,0x42,0x16)
                board.WriteI2C(UB947,0x41,0x47)
                board.WriteI2C(UB947,0x42,0x20)
                board.WriteI2C(UB947,0x42,0xA0)
                board.WriteI2C(UB947,0x42,0x20)
                board.WriteI2C(UB947,0x42,0x00)
                board.WriteI2C(UB947,0x41,0x49)
                board.WriteI2C(UB947,0x42,0x00)
                time.sleep(0.1)
            else:
                Vconfirm = 1
            if (Hconfirm == 1) and (Vconfirm == 1):
                break
    
        if (retry > 2):
            print "Error: Timing confirmation failed. Double check expected video resolution and OLDI video input"  
            return()
        else:
            print "Initialization Complete"
            board.WriteI2C(UB948,0x01,0x01) # Digital reset to restart AEQ 
            time.sleep(0.1) # Allow time for 948 to relock 
            board.WriteI2C(UB948,0x4A,0x00) # Enable OLDI outputs on 948
    
    initsequence()

    Best Regards,

    Casey 

  • Hi Casey,

    Can you let me know if there is any register can indicate the external LVDS timing from 947 or 948 receive? Like 947LVDS RX and 948 read video data.

    Roy

  • Hello Roy,

    The 947 can not directly read any information about the OLDI input aside from the PCLK rate, but 948 can read back the active resolution which is received from 947 with the following script:

    import time
    UB947 = 0x18
    UB948 = 0x58
    
    board.WriteI2C(UB947,0x03,0xDA) # Set I2C passthrough all
    board.WriteI2C(UB948,0x68,0x19) # H active High monitor
    time.sleep(0.1) # Critical delay! Needed for proper operation!
    board.WriteI2C(UB948,0x68,0x19) # Need to write this register again after the delay
    Hhigh = board.ReadI2C(UB948, 0x69, 1)
    board.WriteI2C(UB948,0x68,0x09) # H active Low monitor
    Hlow = board.ReadI2C(UB948, 0x69, 1)
    board.WriteI2C(UB948,0x68,0x39) # V active High monitor
    Vhigh = board.ReadI2C(UB948, 0x69, 1)
    board.WriteI2C(UB948,0x68,0x29) # V active Low monitor
    Vlow = board.ReadI2C(UB948, 0x69, 1)
    mask = int('00111111',2)
    hlowmask = Hlow & mask
    hhighmask = Hhigh & mask
    vlowmask = Vlow & mask
    vhighmask = Vhigh & mask
    hhighmask = hhighmask << 6
    vhighmask = vhighmask << 6
    Hactive = hhighmask | hlowmask
    Vactive = vhighmask | vlowmask
    print "Detected Resolution = ",Hactive,"x",Vactive
    
    board.WriteI2C(UB948,0x68,0x00) # Disable PGENBIST
    

    Best Regards,

    Casey