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.

TPS65218D0: Problem to reprogram the TPS65218D0 via I2C from launchpad.

Part Number: TPS65218D0

Hi TI!

I need to reprogram a tps65218d0 externally with launchpad cc1352P2 via I2C.

The tps65218d0 is powered on and I can read the registers without problem, but I try to reprogram the registers and the registers always keep the default value).

Attached is a segment of my code to reprogram the address register 0x1A.

else if(CountertaskTPS65218 == 1)
{

CountertaskTPS65218++;
CountertaskTPS65218++;

I2C_Transaction i2cTransaction = {0};
writeBuffer[0] = 0x10; // Address Regiter to write (Password)
writeBuffer[1] = 0x67; // 0x1A xor 0x7D Value to write
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = NULL;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

writeBuffer[0] = 0x1A; // Address Regiter to write (Password)
writeBuffer[1] = 0x86; // Value to write
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = NULL;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

}

else if(CountertaskTPS65218 == 25)
{
CountertaskTPS65218++;

I2C_Transaction i2cTransaction = {0};
writeBuffer[0] = 0x10; // Address Regiter to write (Password)
writeBuffer[1] = 0x50;
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = readBuffer;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

}

else if(CountertaskTPS65218 == 26)
{
CountertaskTPS65218++;

I2C_Transaction i2cTransaction = {0};
writeBuffer[0] = 0x10; // Address Regiter to write (Password)
writeBuffer[1] = 0x1A;
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = readBuffer;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

}
else if(CountertaskTPS65218 == 27)
{
CountertaskTPS65218++;

I2C_Transaction i2cTransaction = {0};
writeBuffer[0] = 0x10; // Address Regiter to write (Password)
writeBuffer[1] = 0xCE;
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = readBuffer;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

}

Attached is a segment of my code to read the address register 0x1A.

else if(CountertaskTPS65218 == 2)
{
//Read the chip
CountertaskTPS65218++;
CountertaskTPS65218++;

I2C_Transaction i2cTransaction = {0};
writeBuffer[0] = 0x1A; // Address Regiter to read
writeBuffer[1] = 0x00; // Value to write
readBuffer[0] = 0x00;
readBuffer[1] = 0x00;

i2cTransaction.slaveAddress = 0x24;
i2cTransaction.writeBuf = writeBuffer;
i2cTransaction.writeCount = 1;
i2cTransaction.readBuf = NULL;
i2cTransaction.readCount = 0;

I2C_transfer(i2c, &i2cTransaction);

i2cTransaction.writeBuf = NULL;
i2cTransaction.writeCount = 0;
i2cTransaction.readBuf = readBuffer;
i2cTransaction.readCount = 1;

I2C_transfer(i2c, &i2cTransaction);

if (StatusProgramming == 0 || readBuffer[0] != 0x86)
{
StatusProgramming = 0;
}

}

I always read 0x06, the default value of the 0x1A register, this register is never updated 0x80. The same with any other registers I try to edit. 

Thank you very much. Best regards

  • Hi,

    Thanks for reaching out. I'm currently reviewing this E2E and will provide an update early next week. 

    Thanks,

    Brenda

  • Hi,

    I reviewed the code and noticed your goal is to change the "GO" and "SLEW" bits on register 0x1A and then store the new values in the EEPROM to make them the default settings. Here is my feedback and some additional questions:

    • Only bits marked with "E2" in the register map have EEPROM programmable power-up default settings. 
    • The GO and SLEW bits on register 0x1A are not "E2" type. GO bit is automatically reset at the end of the voltage transition. 
    • [Q]: Before changing the GO bit, was the DCDC1 or DCDC2 output voltage changed in the DCDCx register?
    • [Q]: Are you using the TPS65218EVM, booster-pack or a custom board? 
    • As an additional note, if changing from a higher voltage to lower voltage while STRICT=1 and converters are in a no load state, PFM bit for DCDC1 and DCDC2 must be set to 0. 

    If you provide more details of the changes you would like to make I can try them in the lab and come back with the step by step I2C commands that would be needed. For this, I would need the orderable part number (to check the default DCDCx voltage settings), the new target voltage level and the slew rate.  

    Thanks,

    Brenda

  • Hello Brenda,

    I was wrong, I tried with other registers and they change to the new value I set.

    Sincerely, thank you very much.