Hello,
I am using this gas gauge and configuring it on startup of a board via i2c. My issue is that sometimes the chip configures and other times it does not. It is seemingly random, and occasionally has to do with me plugging/unplugging things on the board at other locations. I have been modifying when I configure the chip over time and this seems to have a temporary effect. Now I wait 15 seconds before attempting to configure. That worked the first time, and no longer works.
I perform several checks in order to determine that I am ready to configure the chip, such as checking that the battery is detected, the chip is initialized, checking that I have entered configuration mode when I attempt to, etc. If I do not pass any given check I do not continue forward with initialization. Rather, I go back and attempt to pass the check (sometimes this means just checking again, other times it means attempting to enter config mode again, and other times it means writing blocks again). I want to provide a few of my checks to the reader and get some feedback on whether or not they are accurate.
Bat detected: Register 0x06, first byte read, bit 3 means that the battery is detected
Initialization complete: Register 0x00, first byte read, 7th bit means initialization is complete
Entered config mode: Register 0x06, first byte read, fourth byte set means in config mode
Please let me know if I should be checking all of these registers to confirm that my actions are being completed as anticipated. As I said, this is something that works occasionally but doesn't work occasionally as well. If anyone has had an experience that they needed to monopolize the I2C line for the extend of configuration, that would be useful to know as well. I currently allow the user to use that I2C line for other purposes while configuration is completing. I have an I2c queue and I don't think that I am dropping messages.
I am fully capable of communicating with the chip and have observed that I enter all of these modes consistently and occasionally even get the configuration to work correctly. I do this at 100KHz I2c.
Please let me know any thoughts.
Thanks!