Other Parts Discussed in Thread: BQSTUDIO, , EV2400
Hello,
I am having difficulties writing via I2C, specifically to the VINDPM register (I2C address = 0B/0Ah). I am able to write and read other registers and I am also able to read meaningful values from the VINDPM register itself, so presumably the I2C communication is fine. Nevertheless, whatever I write to the VINDPM register seems to be ignored.
Each time I connect an input voltage to VBUS, I see the value of the register being correctly set to a value which would indeed correspond to VBUS-1.28V (of course, considering also the 3.2V DC offset which is valid for all codes). If I disconnect VBUS from the input voltage and then reconnect it to a different voltage, I correctly see the change in the input voltage reflected in the VINDPM register (again, 1.28V less than the new input voltage, considering also the 3.2V DC offset).
But I do not seem to be able to overwrite these values. I tried overwriting them via I2C both when the VBUS is connected to an input voltage and when it is disconnected. The previous values persist in the register. Very rarely my write action seems to reset this register to 0, but this is not repeatable in a deterministic manner. Now, I see the VINDPM register is R/W capable, and there is also this explicit statement in the datasheet: "The host can always program the input current and voltage limit after the charger being powered up based on the input source type."
Are there other conditions that have to be met, for writing to the VINDPM register? This is the only register I am having difficulties with, the other ones are fine.
Best regards,
Cristian