Followup to: http://handhelds.org/hypermail/h5400-port/2/0269.html
(Apologies if this is a duplicate post to the list, my first attempt at sending doesn't seem to have come through. If the first did go through, this message has a little new information in it.)
Regarding how to discharge the battery, my iPaq 5400 has experienced the
same issue here, didn't seem to be holding a charge, but now in
retrospect I'm experiencing the exact same problem that Martin Dreher
reported; as soon as I disconnect power, the unit powers off, making it
difficult to discharge the battery.
Executing a "shutdown -h now" from a ssh session will accomplish this. The unit does not power off upon the completion of the shutdown, so the LCD is lit and the battery is being used, and the asic isn't shutting the unit down because it thinks the battery is in a critical state when it isn't.
I tried a few things with the learn_voltage parameter to the
h3600_asic_battery module, and got it to engage learning mode at one
point, but it didn't seem to stick. I wonder if it might be useful for
there to be a module parameter to force learn mode, or perhaps there's a
way to reset the values in memory to force learn mode to stay active?
The output from cat /proc/asic/battery on my 5400 is:
~ # cat /proc/asic/battery
Battery Monitor
Voltage : 4165 mV
Active current : 177 mA
Accumulated current : 5739 mAh
Temperature : 36.125 deg C
Local calculations
Local TAD : 1035240
Last ACR update value : 16530
Is learning? : no
DS2760 updates : 14
Full level : 5739 mAh
Derated full level : 5739 mAh
Empty level : 2 mAh
Percentage : 100
Lifetime : -1 min
Option jacket
chemistry : 0x04
percentage : 0xff (255)
flag : 0x08
If I read this correctly, the "Derated full level" should be the
discharge level, this says the battery is full (which makes sense since
it's been on the charger most of the day), but the lifetime is messed
up. (Additional - upon further inspection after a complete discharge, I'm not sure this is the case, but after suspending during a learn cycle, the full level and derated full levels now read about 1200 mAh instead)
If I read the source correctly, what may be causing the problem
here is the lifetime showing -1 minute rather than a real value. This
is done apparently in the battery_calc_levels function in
h3600_asic_battery.c, with the lines:
cur = active_cur_to_ma( dev->ds2760.cur, dev->ds2760.resistor );
if ( cur >= 0 )
dev->life = -1;
else
dev->life = -(60 * delta) / cur;
This is the only place where I can see the battery life being set to -1.
I'm guessing (but don't know the code well enough at this stage) that
somewhere there's code that says essentially that if the battery life is
below a certain threshold, shut the unit down. If the battery life is <
0, this would cause the unit to immediately go into a critical state and
shut down, though, resulting in this behaviour.
Perhaps someone more familiar with this code can enlighten me, or
perhaps my quick looks here will help someone diagnose this problem further.
Jim
Received on Tue Dec 23 2003 - 20:37:16 EST
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:20:09 EDT