Operation without battery (GTA02)

Andy Green andy at openmoko.com
Fri Jul 18 10:19:58 CEST 2008

Hash: SHA1

Somebody in the thread at some point said:
| On 2008-07-18, Thomas Seiler <thseiler at gmail.com> wrote:
|>> | What's the advantage of enabling the charger?
|>> Well without it literally it won't charge the battery from USB power.
|>> It's fine to enable it except when it notices there is no battery there
|>> for some reason.
|> Question: Would it help to query the ADC and check for some battery
|> prior to enabling the charger help to keep the Freerunner switched on
|> in this case?
| No. We need the battery to power on, and then the ADC check would
| let us enable the charger.
| What we need to do, is detect when the battery is removed, and then
| disable the charger until a battery is reinserted

There are some interrupt events from PMU happening on battery removal,
but they are not always consistent.

The other issues are that VB (the battery +ve terminal) floats around a
bit when there is no battery and USB power, and that we run the risk to
mistake very low battery or battery in internal cutout mode for "no
battery -- don't enable charger" putting ourselves in a bad place.

But we continue to poke at the whole power area -- and Jeffrey's post
might be a clue of some kind.

Jeffrey, if you are interested about what the battery experiences, there
are a bunch of goodies from the Coulomb Counter in the battery
accessible down /sys/class/power_supply/bat, just cat them.  These tell
you the battery's view of what is going on directly.

# cat /sys/class/power_supply/bat/current_now

is particularly interesting, this is the flow of current out of (+ve) or
into (-ve) the battery in uA.  These values come fresh from the Coulomb
Counter each time, but that device itself updates its registers only
every few seconds.

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the community mailing list