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.

TVP5150AM1 patch code

Other Parts Discussed in Thread: TVP5150AM1, TVP5150

Hi 

I am trying to write square pixel patch code to TVP5150AM1 on our system. I am able to get the initial version number as 0x4 & 0x0 from 0x82 & 0x83 respectively. When I follow the instruction to load the patch, I get -1 returned when I try to load the unsigned char array which has the patch code. All other write have no errors. Any idea why this would happen?

This is my code:. The highlighted text returns -1. pData is an unsigned char array which has the patch.

#define TVP5150AM1_ADDR 0x5C 


    result += I2CWriteByte(TVP5150AM1_ADDR,0x21,0x51);  // unlock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x22,0x50);  // unlock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x23,0xFF);  // unlock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x24,0x04);  // unlock password for patch code download & register write

    result += I2CWriteBuffer(TVP5150AM1_ADDR, 0x7E, nNumBytes, pData ); //load patch

    result += I2CWriteByte(TVP5150AM1_ADDR,0x7F,0x00);      // Restart TVP5150 uP

    result += I2CWriteByte(TVP5150AM1_ADDR,0x21,0x00);  // lock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x22,0x00);  // lock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x23,0xFF);  // lock password for patch code download & register write
    result += I2CWriteByte(TVP5150AM1_ADDR,0x24,0x04);  // lock password for patch code download & register write

Thanks,
-Purvin

  • Hello Purvin,

    Could you send us your code of I2CWriteBuffer()?  Could you let me know where do you get the patch and what version it is?  Our latest patch is located at:

    http://software-dl.ti.com/dsps/dsps_public_sw/dsps_swops_houston/ANALOG_VIDEO/Analog_Video_Decoder_Versions.htm

    Please download the latest if your version is not up to date.

    Regards,

    Viet

  • Hi Viet,

    The write buffer code is a call to the i2c psp API.

    Int32 I2CWriteBuffer(unsigned char nSlaveAddr, unsigned char nSubAddr,
                        int nNumBytes, unsigned char* pData )
    {
        return i2c_writeReg(nSlaveAddr, nSubAddr, pData, nNumBytes);
    }
    
    
    
    I am using a version before the latest version of the patch. What I noticed is that I dont get any problem when I write up to 30 bytes of the patch. Anything beyond that returns -1. 
    What could that mean? I will try the latest patch also but I doubt it will work.
    
    
    -Purvin

  • Purvin:

    Please let us know which TI processor and which PSP software version you are using and we can look further into

    the requirements for the i2c_writeReg() API fcn.   If there is a byte count limitation, it may be neccessary to do multiple

    calls to write to i2c sub-address 0x7E.   After that, perform one write to i2c sub-address 0x7F to restart the TVP5150 CPU.

    Regards,

    Michael T

  • Hi Michael

    Its DM648 & PSP 1.10.0. Where can I find information/documentation on the byte count limitation?

    -Purvin

  • Follow up:

     

    I tried to send the data in 30 byte chunks. This seems to do the trick!! I can see the version number come out as 0x4 0xA1!!! Perfect. I just need to visually verify that the patch works. But this looks promising.

     

    Thanks for the help!! I will confirm once I visually verify the result.

    -Purvin

  • Purvin:

    I'm glad you are able to get the firmware patch loaded now.

    Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

    Regards,

    Michael T