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() { I2C_write(BQ25155_ADDR, BQ25155_MASK0, 0x00); I2C_write(BQ25155_ADDR, BQ25155_MASK1, 0x00); I2C_write(BQ25155_ADDR, BQ25155_MASK2, 0x71); I2C_write(BQ25155_ADDR, BQ25155_MASK3, 0x00); I2C_write(BQ25155_ADDR, BQ25155_VBAT_CTRL, 0x3C); I2C_write(BQ25155_ADDR, BQ25155_ICHG_CTRL, 0x50); I2C_write(BQ25155_ADDR, BQ25155_PCHRGCTRL, 0x02); I2C_write(BQ25155_ADDR, BQ25155_TERMCTRL, 0x14); I2C_write(BQ25155_ADDR, BQ25155_BUVLO, 0x00); I2C_write(BQ25155_ADDR, BQ25155_CHARGERCTRL0, 0x94); I2C_write(BQ25155_ADDR, BQ25155_CHARGERCTRL1, 0xC0); I2C_write(BQ25155_ADDR, BQ25155_ILIMCTRL, 0x06); I2C_write(BQ25155_ADDR, BQ25155_LDOCTRL, 0xB0); I2C_write(BQ25155_ADDR, BQ25155_MRCTRL, 0x2A); I2C_write(BQ25155_ADDR, BQ25155_ICCTRL0, 0x10); I2C_write(BQ25155_ADDR, BQ25155_ICCTRL1, 0x00); I2C_write(BQ25155_ADDR, BQ25155_ICCTRL2, 0x40); I2C_write(BQ25155_ADDR, BQ25155_ADCCTRL0, 0xC2); I2C_write(BQ25155_ADDR, BQ25155_ADCCTRL1, 0x40); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP1_M, 0x23); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP1_L, 0x98); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP2_M, 0x38); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP2_L, 0x58); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP3_M, 0x00); I2C_write(BQ25155_ADDR, BQ25155_ADCALARM_COMP3_L, 0x00); I2C_write(BQ25155_ADDR, BQ25155_ADC_READ_EN, 0xFE); I2C_write(BQ25155_ADDR, BQ25155_TS_FASTCHGCTRL, 0x34); I2C_write(BQ25155_ADDR, BQ25155_TS_COLD, 0x7E); I2C_write(BQ25155_ADDR, BQ25155_TS_COOL, 0x6F); I2C_write(BQ25155_ADDR, BQ25155_TS_WARM, 0x39); I2C_write(BQ25155_ADDR, BQ25155_TS_HOT, 0x29); }
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