Other Parts Discussed in Thread: BQSTUDIO
Is there a way to determine if the battery is present, before trying to apply a charging current to it? I could not find a flag for it.
One way I divised was checking if VBAT has a reasonable value. Vith no battery, register 0x2C is zeroed (inspecting with bqStudio), so I could use it. Another way would be simply trying to set a low charging current and see if the output voltage rises to the value programmed in the Charge Voltage Register. Is there a more straightforward way?
I thought of using the BATREMOVAL flag in Prochot Status Register. But it does not change when I connect/disconnect the battery. It is not clear to me how it works or if it can be used for battery detection.