I am having trouble getting BATT_MISSING to consistently detect whether a battery is missing or not. It seems work sometimes, but most of the time it doesn’t, and the charging state just flips between “fast charge” and “CV charge” repeatedly.
So the criterion is two terminations within 3 seconds. You will have to see a fast charge, a CV , voltage dropping and then another fast charge and CV within 3 seconds for it to happen.
I wonder if there is some combination of settings that allows that to be violated. Maybe your battery cap 22uF is too large and that messes with the timing?
Really just guessing if you don’ realize that already
If you read on page 20 it looks like you can mess this up by for example disabling charge termination. Then with no charge termination you won’t get the automatic recycle and the battery missing algo won’t work??? Just guessing
I don’t think I’m doing anything silly with configuration, I have termination enabled (and I’ve seen it properly terminate a charge).
This is all the configuration I’m doing:
// Set VBATT to 4.25v for LiOn, and top-off timer disabled.
write(0x05, 0x15);
// Set termination current to 60mA
write(0x03, 0x42);
// Set max current to 2A.
write(0x01, 0x14);
// Set boost output voltage default of 5.15V
write(0x08, 0x7F);
// Disable watchdog timer.
write(0x07, 0x0E);
// Disable NTC1.
write(0x0C, 0x11);
// Enable DRP.
write(0x09, 0x3B);
Don’t actually need to scope it to know you’re right, that is what seems to be happening. It seems to be somewhat close, but it seems to be exceeding the 2-tries-in-3-seconds.
In terms of the capacitor, the data sheet says: “Place a minimum 20μF ceramic capacitor from BATT to PGND” and if my math is correct, it’s only about ~200 microseconds to charge to 5V at 500mA.
[0012] MP2722: Fast charge.
[0013] MP2722: Constant-voltage charge.
[0014] MP2722: Fast charge.
[0015] MP2722: Constant-voltage charge.
[0017] MP2722: Fast charge.
[0018] MP2722: Constant-voltage charge.