[Gta04-owner] charging log

Dr. H. Nikolaus Schaller hns at goldelico.com
Sun Sep 8 19:26:55 CEST 2013


Hi Radek,

Am 08.09.2013 um 19:00 schrieb Radek Polak:

> Hi,
> attached is shell script and log from my GTA04. I just left GTA04 on USB of my 
> computer. Expected result is that it should keep charging/discharging. Actual 
> result is that it discharged to 0. Does the log help somehow? Otherwise i was 
> quite busy but i plan to test the changes suggested by Neil.
> 
> Regards
> 
> Radek
> <charging.txt><charging.sh>

You could use this script which does the same but a little more elaborated:

http://git.goldelico.com/?p=gta04-rootfs.git;a=blob;f=debian/config/root/batt;h=07cc6aad1ba330e8ea67484970c8197a5b68a644;hb=HEAD

There you can also see the influence of VBUS.

But it is already clear what happens from these lines:

==============================================
Thu Sep  5 17:45:32 CEST 2013
cat /sys/bus/platform/devices/twl4030_usb/vbus
on
cat /sys/class/power_supply/twl4030_usb/uevent 
POWER_SUPPLY_NAME=twl4030_usb
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4406892
POWER_SUPPLY_CURRENT_NOW=486087
cat /sys/class/power_supply/bq27000-battery/uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Full
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=4174000
POWER_SUPPLY_CURRENT_NOW=-92284
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CAPACITY_LEVEL=Full
POWER_SUPPLY_TEMP=363
POWER_SUPPLY_TIME_TO_FULL_NOW=0
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=1097953
POWER_SUPPLY_CHARGE_NOW=1097953
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=18
POWER_SUPPLY_ENERGY_NOW=3946380
POWER_SUPPLY_POWER_AVG=0
POWER_SUPPLY_HEALTH=Good
==============================================
Thu Sep  5 17:46:32 CEST 2013
cat /sys/bus/platform/devices/twl4030_usb/vbus
on
cat /sys/class/power_supply/twl4030_usb/uevent 
POWER_SUPPLY_NAME=twl4030_usb
POWER_SUPPLY_STATUS=Not charging
POWER_SUPPLY_ONLINE=0
cat /sys/class/power_supply/bq27000-battery/uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=4115000
POWER_SUPPLY_CURRENT_NOW=372886
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=363
POWER_SUPPLY_TIME_TO_EMPTY_NOW=10440
POWER_SUPPLY_TIME_TO_EMPTY_AVG=9780
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=1097953
POWER_SUPPLY_CHARGE_NOW=1095990
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=18
POWER_SUPPLY_ENERGY_NOW=4207720
POWER_SUPPLY_POWER_AVG=397296
POWER_SUPPLY_HEALTH=Good
==============================================

Essentially it shows that your USB charging voltage is too low. It should
be ~5V. Maybe you are drawing too much current from the charger or
the cable is weak.

There is a comparator in the TWL-usb-chager hardware set at fixed
4.5V that turns off the charger if VBUS goes below.

Software only turns on the charger if you manually unplug USB and replug
because only then, you get an MUSB event that enables charging.

There have been heavy discussions last year that this behaviour is right,
i.e. that you battery drains even if connected to USB and that we can't
do anything...

The main argument is that this is a safety comparator detecting USB
unplugging even if the CPU isn't. And if the CPU would override that
(which is easily done - I had discussed and tested a patch), there is a
risk of overcharging the battery.

BR,
Nikolaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130908/f116f129/attachment.html>


More information about the Gta04-owner mailing list