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.

TPS650365-Q1: How to write on TPS650365-Q1 registers

Part Number: TPS650365-Q1

Tool/software:

Hello All,

I can read TPS650365-Q1 registers through I2C but when tried to write on any register, The register doesn't update.

for example register 0x1d bit 0 doesn't change the value. So my question why can't I write on PMIC register however I can read from it ?

  

Thanks

Hossam

  • Hello Hossam,

    This PMIC has a register lock feature. In short, write 0x9B to register 0x09 in order to unlock all other user-space registers. After the unlock, you should be able to write to the other registers. Please see the below image for more details on the REGISTER_LOCK register.

    Best regards,
    Jude Stehling

  • Hello Jude,

    Thank you for reply.

    I have tried this write 0x9b in register 0x09 then write in other register but when write in anther register and read it, I see it's not update 

    Thanks 

    Hossam 

  • Hi Hossam,

    Can you read back register 0x09 to check REGISTER_LOCK_STATUS after you performed the write of 0x9B? Does it come back with the status locked (1h) or unlocked (0h)?

    Regards,

    Katie

  • Hi Katie,

    Thank you for reply.

    Yes, We read this register after writing 0x9B and bit 0 [REGISTER_LOCK_STATUS] is 1 (Register are Locked).

    Thanks

    Hossam Afifi

  • Hello Hossam,

    I anticipate that the write is being performed incorrectly if the register unlock is not working properly.

    What is the exact OPN of the part that you are using? It could also be the case that the I2C CRC is enabled for this part, so a CRC value would be needed to successfully perform writes to the PMIC.

    Best regards,
    Jude Stehling

  • Hello Jude,

    The CRC is enabled for the PMIC, We write by I2c without CRC 

    If we use I2C write with CRC how to send I2C frame with CRC and I2C write function take Slave address and register address, data only ?  

    Thanks

    Hossam Afifi

  • Hello Hossam,

    The PMIC will not successfully be written to if the CRC byte is not transmitted during I2C writes. I am not sure what you mean by the question in the second part of your message. Could you please clarify this question? Hopefully the following information helps with the issue:

    The error seen with the register writes is very likely due to the I2C CRC not being properly transmitted during write sequences. The datasheet section "6.4.16.5.1 CRC Calculation for the I2C Protocol" explains the I2C CRC. For help with the algorithm used to incorporate this, please see the TPS65036x-Q1 drivers available at the following link: Releases · TexasInstruments/ti-pmic-lld. The implementation of the I2C CRC is implemented in "pmic_io.c" as the function "getCRC8Val".

    Best regards,
    Jude Stehling