I am using the battery fuel guage MAX17205 through I2C bus.

The Device Name register that I read from it seems have a different value than what the datasheet states:

I am reading a 0x2a7c, but it's meant to have a LSB of 0x5.

In the Datasheet the DevName reg (21h) should be: DevName Reg description DevName Reg map so for MAX17205, the LSB should be a 0x5. however, I am reading a 0x2a7C from it.

I checked the I2C waveforms, the reading is 0x2a7c for sure.
I2C waveform

And this is the probing on oscilloscope:

oscilloscope1 oscilloscope2 oscilloscope3 oscilloscope4 So I tried to read other registers with default value, and they all seems match the default value.

The I2C tool that I am using is working - There are a few I2C slave devices on the same bus and I can read from them all ok.

What might be the reason for this wrong reading from DevName? Could it be a faulty one single resistor, or does it indicates that my chip has other problems too so I can't trust any data from it?

  • 1
    \$\begingroup\$ Hello Chin, and welcome to eesx. Do you have an actual oscilloscope to capture SDA and SCL waveforms? Also, where did you acquire the MAX17205? \$\endgroup\$ – Vladimir Cravero Mar 8 '19 at 15:06
  • 1
    \$\begingroup\$ If you are going to speculate that resistors could be an issue you should tell us their value. It would also be good to explain the nature of the I2C host - is it a fixed function peripheral, or software bit-banging. \$\endgroup\$ – Chris Stratton Mar 8 '19 at 15:11
  • \$\begingroup\$ @VladimirCravero Hi, thanks for replying. Yes, I do have an actual oscilloscope for I2C waves, and it shows the same result as above. I will update my questions to attach those. Im not sure where are MAX17205 ordered from tbh.. Also the full part number is MAX17205G, if that will make any difference.. \$\endgroup\$ – Chin Mar 11 '19 at 9:31
  • \$\begingroup\$ @ChrisStratton Hi Chris, thanks for replying. I am not sure if it's the resistors that cause the problem, but since in here the reading is making sense for other registers, then I think the resistors are fine. the I2C host is a fixed function peripheral. \$\endgroup\$ – Chin Mar 11 '19 at 9:36

Solved this problem myself.

It's not related to I2C reading, it's a chip configuration problem.

I am using multiple cell battery pack, the set-up is different than default. Under this set-up, I need to set PackCfg register to the correct value, before reading any value from the MAX17205 chip, include the DevName register.

So I write 0x3a04 (0x3a0N for a multi-cell battery pack, N is the number of cells), to the register PackCfg(0xbd), then the reading from DevName register changed from 0x2a7c to 0x10f5. 0x10f5 should be what we expect, as for MAX17205, the LSB of this reading should end with 0x5.

It doesn't mention anywhere on the datasheet that this PackCfg value need to be set first, before even reading the DevName register. Since I would expect that normally the DevName register is independent from any chip operations (apart from power mode, for some chips, but correct me if my understanding is wrong.), but this is what I found on this chip after hours of debugging..

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.