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.

DM647 setting TVP5150 square pixel mode

Other Parts Discussed in Thread: TVP5150

I'm working with a board that has a DM647 and a TVP5150.  I have a square pixel mode patch file for the TVP5150, but I have no idea what to do with it - is there a way to have the DM647 load a TVP5150 patch?  Is there some other way to get square pixel mode to work on the TVP5150?

Thanks,

Peter

 

  • Peter,

    The patch file needs to be down-loaded to the TVP5150 via I2C.

    The TVP5150 should be on one of the I2C interfaces of the DM647 so you should be able to access this interface.

    Please check the application note at http://focus.ti.com/lit/an/slea093/slea093.pdf for information on patch downloading.

    BR,

    Steve

  • Thanks Steve.  Can this be burned once, or does it need to be done every time the part is powered up?

     

    Peter

     

  • This needs to be done every time the device is powered up since the patch is stored in internal SRAM.

    You will also need to 'lock' the code changes if you do not want any subsequent hardware resets to clear the patch update.

    You will need to add this uploading code to either your application or to your kernel.

    BR,

    Steve

  • Hi again,

    You mentioned adding the patch to the application or kernel.  How can I do this?  Is there a way to specify a symbol in the Makefile whose contents will be the contents of the patch file?

    Thanks,

    Peter

     

  • Hi Steve

    After reading the pdf, I have couple of follow up questions. I refer to Ssection 1.2 (Customer System)

    * I assume that step (1) is essentially done at power cycle. If not how can I do this?

     * How do you do step (2)? i.e.set the master controller speed to 400kbps?

    When I try to read 0x82 I get an error code from by read call. I use the PSP I2C interface not CSL. Any suggestions on what I am doing wrong?

     

    Int32 I2CReadByte(Uint8 slaveAddr, Uint8 subAddr, Uint8 *buffer, Uint32 length)
    {
        return i2c_readReg(slaveAddr, subAddr, buffer, length);
    }
    

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

        result = i2c_init();
        if(result < 0 ) {
            printf("Failed to init I2C\n");
            return;
        }
    
        I2CWriteByte(TVP5150AM1_ADDR, 0x7F, 0x00);
        //I2CWriteByte(TVP5150AM1_ADDR,0x03,0x69);
    
        if(I2CReadByte(TVP5150AM1_ADDR, 0x82, &read, 1) < 0) {
            printf("Error in reading the I2C byte\n");
        }
    
        if(I2CReadByte(TVP5150AM1_ADDR, 0x83, &read, 1) < 0) {
            printf("Error in reading the I2C byte\n");
        }
    


    Thanks,
    -Purvin

  • Purvin,

    Step one can be done at any time after your system powers up.

    For step 2, this is not actually critical. All this really means is make sure that your I2C interface is configured correctly. The suggestion is to use the high speed 400KHz I2C mode since this will obviously reduce the download time, but it is not critical. As for how to actually change the host I2C speed I don't know since I am more of a hardware person, sorry. I wouls suggest posting a new forum question specifically asking how to set the I2C interface speed.

    Now, if you are not able to read from the registers then I think you have a more generic issue. Are you able to probe the I2C lines going to the TVP5150 with an oscilloscope? If so, can you check the see that there is in fact activity when you try to read the register. Can you also check that you are using the correct device address?

    You need to ensure that you can communicate with the TVP5150 before you start to debug patch download issues.

    BR,

    Steve

  • Thanks for the quick reply Steve. I will look into this.

    Do you have any suggestions on how to 'lock' the code? When you say it should be part of the application or kernel how to accomplish this?

     

    BR,

    -Purvin

  • Purvi,

    When I say part of the application I mean you can simply add the TVP5150 initialization code to your own application code. The example code in the application note I sent should suffice.

    Alternatively you will need to find the appropriate Kernel source code file which contains the TVP5150 initialization and add the firmware download to the initialization there. I don't know too much about the Kernel side unfortunately but I would imagine there will be a TVP5150 specific file, so I would start by searching for a file with 'TVP51" in the filename and look there.

    BR,

    Steve