Better characterization of suspend current
andrzej zaborowski
balrogg at gmail.com
Tue Feb 12 13:33:14 CET 2008
Hi,
On 08/02/2008, Andy Green <andy at openmoko.com> wrote:
> I was lying awake in bed at 3.30am musing about the suspend current.
> The smart battery says on it that it is "3.7V 1250mAh", so naturally I
> divided 1250 / 5 and I say to myself "wah! Does it really mean we have
> a 250hr standby time now? Didn't I see that kind of number on adverts
> for mobile phones? 10 days? Cool!" Then doubts and suspicion crowded
> around me in the dark.
>
> - This "5mA" figure never got tied to any specific configuration I saw,
> it just got reported as a single figure. That needs specifying so the
> tests are repeatable and can be understood in context. For example,
> what are we measuring here? It is Vb at the battery terminal, right?
>
> - The GSM modem seems to be "off" according to Allen's last attack on
> the current monster. Is it off? What happens to suspend current when
> it is left on so in can wake on incoming call? Because that will be a
Just to give you something to think about, I'll describe the power
management idea in the Palm Tungsten|E, a low-end, 2003 device. With
a full battery it runs continuously awake for about 4 hours until it
dies, less than this if it's playing MP3's or doing something
intensive. But then, when it dies it doesn't really die. The OS gets
a LOW_BAT signal, similar to GTA (but it has to be polled), and
instead of shutting the system down it goes into suspend. The system
is never shut down, there's even no api for that on PalmOS. If you
try to "switch on" the device with a button, it will silently wake-up,
check the battery state and go back into suspend if the battery is
still low (appearing to be dead to the user).
In suspend the only thing that's still powered is the 32MB ram chip
(there's no modem). It turns out this is so well done that on several
occasions it has been sitting in my drawer for over 6 months and later
when charged, resumed with the button press into the same state it was
left in a fraction of a second. This is cool because it makes the
boot-up time completely insignificant - an average user, someone not
hacking the device, only sees the boot-up a single time in the life of
the device. The GTA02 has a removable battery so the most that could
be done is reduce the number of boot-ups to the number of
battery/SIM/microSD replacements plus one. I'm not sure if the plan
with init doing a full shut-down when signalled is the final plan or
just a temporary hack before suspend/resume is polished. Going the
PalmOS way there would be three low-power states:
* completely powered-off (since this is Linux, there must be a way to
shutdown) which wouldn't be used unless specifically requested,
* normal suspend, with modem awake for when the user is not calling
or playing games,
* emergency suspend with only the RAM still in refresh mode, entered
on battery low in order to protect the user from having his running
programs killed when the battery dies.
This would require near to perfect suspend/resume control of the
peripherals, but it would be nice to at least have it somewhere near
the end of the global TODO.
--
Please do not print this email unless absolutely necessary. Spread
environmental awareness.
More information about the openmoko-kernel
mailing list