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