Linux battery charger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux battery charger

953 Views
N_Coesel
Contributor III

Did anyone got the battery charger to work properly? I'm using a Li-ion battery but the charger stops after about 3 hours. The battery isn't even nearly full at that point.Worst, the charger (lab power supply) gets disconnected so after charging the battery is simply drained until its empty.

To put it politely: I have a feeling that the mc13892 battery charger software (pmic_battery.c) is very far from complete.

Labels (1)
Tags (2)
0 Kudos
1 Reply

572 Views
JorgeRama_rezRi
NXP Employee
NXP Employee

Hi,

 

There may be some features they decided not to include in the driver because they may not be common. If you need this one, may I suggest you to modify the driver according to the following description:

 

The precharge will time-out and stop charging, in case it did not succeed in raising the battery to a high enough level: BATTON for internal precharge, external precharge in the case of USB, and BPON for the external precharge, in case of a charger. This is a fault condition and is flagged to the processor by the CHGFAULTI interrupt, and the CHGFAULTS[1:0] bits are set to 10. During charging, a charge timer is running. When expiring before the battery is fully charged, the charging will be stopped and an interrupt generated. The charge timer can be reset before it expires by setting the self clearing CHGTMRRST bit (this may not be implemented in the driver). After expiration, the charger needs to be restarted. Proper charge termination and restart is a relatively slow process. Out of any state and after a time-out, the charger state machine can be restarted by removing and reapplying the charger. A software restart can also be initiated by setting the self clearing CHGRESTART bit.

 

Best regards.

Jorge.

0 Kudos