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.

# BQ25155: I2C reading operation problem

Part Number: BQ25155

Dear all,

we selected this BQ25155 chip as a charger for our custom project. we're having serious troubles setting up and reading the chip registers, especially the device ID, which should be 0x35 but we read 0x20!

We're interested in reading the battery level through the ADC, but we always read 3 V if the battery is attached, and 3.75 V if the battery is disconnected. All these attempts were made in charge mode (Vin present).

This is the initial registers setup:

```void BQ25155_init_all()
{

}and this is what we read from registers:```

`After reading all registers, we print in a loop as follows (se also above):`
• 0x42 and 0x43 regs, for the MSB and LSB of the ADC conversion for the battery level;
• decimal value of the ADC conversion;
• Battery level computed taking the latter value and using the formula : (ADCDATA_VABT / 65536)*6;
• Vin level, computed from the ADC conversion, as done before for the battery level;
• content of reg 0 (status reg).

As you can see, the computed battery value is always 3 V, no matter what is the real battery level. we've checked with different batteries at different voltage, but noithing changes from this situation.

Now, if we disconnect the Vin voltage, what appens is this:

As you can see, the battery level goes to 3.75 V (again, this is a fixed values, no matter what is the real battery level).

This is because the third bit of the 0x42 register goes to 1 sistematically, and goes back to 0 if we apply Vin voltage again, as if it was the power good flag!!

Moreover, the register 0x00 (charger status) remains to 0 when we disconnect the Vin voltage, but it should go to 1 since this register does contain the real power good flag.

This behavior is very strange, as if this chip is not really the BQ25155 even because we read a dvice ID of 0x20 (the correct one should be 0x35), but I can assure you it is, as you can se from the picture taken with a microscope from our custom board:

can you help me shed some light on this situation? thanks a lot

• Sorry, I used the wrong way to enter pictures. This is the first (response after full registers setup):

this is the second response (Vin not present):

and this is the phot of the mounted chip:

• Hello,

Can you show the register dump upon VIN power up before you send any write commands through I2C.

All registers including the device ID.

• Hello,

sure! here it is:

this is a full registers read, without any I2C write operation, just after Vin power-up, as requested.

As you can see, basically it is all out of specs, device ID included (I put it at the beginning), which is always 0x20!

• Hello,

When making i2c transactions, can you look at SDA and SCL on a scope to see they are operating properly.

• Raheem said:

This is part of the schematic related to the charger IC. There are two 4k7 pull-up resistors towards 3.3V for the two SDA and SCL lines, which are in another sheet, since there are other I2C devices in the design.

Raheem said:

When making i2c transactions, can you look at SDA and SCL on a scope to see they are operating properly.

We already checked the I2C signals with a scope and they are perfect. Moreover, our oscilloscope (Keysight MS0X3054T) has an I2C sniffer, which is able to interpret the I2C signals, and basically what we read from the board signals is the same as the microcontroller's response that we shared in the previous message.

In addition, we checked the same i2c test firmware with the evaluation board BQ25155EVM and the response is completely different and it is all correct, according to the datasheet.

• If i understand correctly, The IC where you get incorrect readings sow correct readings when you place the unit on our EVM?

• Raheem said:

If i understand correctly, The IC where you get incorrect readings sow correct readings when you place the unit on our EVM?

yes exactly. The same MCU with the same test firmware gives correct readings, if interfaced with the EVM.

• Hello,

If you change the pull up resistors to 10k, do you see a difference?

Also, is there a way to turn off any other device on the I2C bus?

• Hello,