2

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?

Chin
  • 51
  • 5
  • 1
    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? – Vladimir Cravero Mar 08 '19 at 15:06
  • 1
    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. – Chris Stratton Mar 08 '19 at 15:11
  • @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.. – Chin Mar 11 '19 at 09:31
  • @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. – Chin Mar 11 '19 at 09:36

1 Answers1

3

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..

Chin
  • 51
  • 5