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
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:
Please download the latest if your version is not up to date.
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.
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.
Its DM648 & PSP 1.10.0. Where can I find information/documentation on the byte count limitation?
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.
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!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.