I'm using the BQ25895 to charge a single LiPo battery from a 12VDC input and the BATV value (REG0E[0:6]) is always wrong, but the value does change.
My application is set up as follows:
- D+ / D- are left floating
- 12VDC input on VBus
- WATCHDOG (REG07[4:5]) set to 00 (disable watchdog timer)
- CONV_RATE (REG02[6]) set to 1 (Start 1s continuous conversion)
- HVDCP_EN, MAXC_EN, FORCE_DPDM, AUTODPDM_EN (REG02[0:4]) are all set to 0, disabling the USB handshakes
- IINLIM(REG00[0:5]) set to 0x3F, maximizing IINLIM and forcing input current to the resistor set on the ILIM pin
Whenever I have VBus unplugged, VBat reads 2.304v (equal to 0x00, i.e. the minimum) and whenever I have VBus plugged in, it reads 4.204v (0x5F). Using a multimeter, the actual battery voltage is 3.45v with no VBus and 4.05v with VBus, so in either case it is wrong.
I expect the BATV value to match (within a reasonable tolerance) of what the multimeter shows. Am I looking at the wrong register? Is the math as simple as this?
batv = 2.304 + (batteryStatus.battReg[0x0E] & 0x7F) * 0.02;
I see a few registers that specify offsets for certain calculations, like VINDPM_OS in REG01, but none of those seem to pertain to the battery voltage.
The battery also seems to charge okay (for now, I've been struggling to get this to reliably charge), it is just the voltage that is completely wrong.