[Gta04-owner] various powermanagement issues
H. Nikolaus Schaller
hns at goldelico.com
Mon Oct 19 10:24:17 CEST 2015
Am 19.10.2015 um 08:41 schrieb Andreas Kemnade <andreas at kemnade.info>:
> On Mon, 19 Oct 2015 07:28:16 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>> Approx. 3 seconds after the TPS autoboots with an empty battery, we have
>> U-Boot up and running. And hacking U-Boot is much simpler and more flexible.
>> It may be not well known that our U-Boot has some additional commands:
>> and there is:
>> • systest ch[arge] - enable battery charger and print mV levels
>> So the solution could be as simple as adding a "systest charge" command
>> (potentially slightly modified to better integrate into a script) to the boot.scr
>> to enable more power drawn from USB and unburden the battery.
>> I love simple solutions where all components are already on the table :)
>> In this case for ca. 4 years...
>> So we have to ask ourselves why nobody did solve it in that long time frame.
>> Are such things not known?
> The answer is quite simple.
> 1. My initrd-thing works (I have published here on the list) except for
> some batteries at the end of their life. My 350mAh-battery has begun to
> getting thick. So I will not use the battery anymore. Uboot-hacking
> would have giving we approx 1 week more use time if it would work. So
> no practical need to fix that using uboot.
Ok, I mainly asked to find out if we should improve code or documentation.
It appears that we need neither because it turns out that we both do not see
it as an urgent or high-priority problem to be solved immediately.
> Except that my system fully
> boots on first try when there is power available.
> The reason for that topic was just because I wanted to know how to best
> live with bl6c batteries. Now I have found out that MADC gives at least
> some information.
> 2. More logic than just enable charger is needed.
> Reason: Booting the system (after booting the kernel) gives quite high
> currents, especially if peripherals are enabled at powerup time. That
> means that there might be even some discharge.
Indeed. But less if the USB current is limited.
> And further on it feels that there is some hidden logic which lets the
> GTA04 boot when there are red traffic lights in the vicinity on my bike
Yes, we have built in some situation awareness firmware :)
> or I have to start climbing a hill so that there is less than 500mA
> charging current.
> The autamatic charging has some logic making it switch to slow charging
> mode, which means limiting IUSB(!!) to 100mA when battery goes below
> approx 3.2V. or something like that. Therefore I enable linear charging
> and disable most things in my script and then wait until Vbat reaches
> 3.45V (I just noticed that my script still does that via bq27000 and
> not via MADC in12). Then I check whether the GTA04 sits in my bike
> holder via accel sensor. If not I switch back to automatic charging.
> The root fs is mounted then (and power-consuming things like
> journal replay can start. Shorter red-phases can be handled using that
All this is very fine. What we discuss with MLO/U-Boot is to help
for the first 30 seconds after a depleted battery is starting something
and before kernel (and scripts in initrd or whereever) take over
But with most batteries it works with the current situation, so that
it is an improvement for old batteries.
When I find time (sigh... I assume people are still waiting for GTA04A5
news...), I can look into the U-Boot systest approach.
More information about the Gta04-owner