Anelok: energy efficiency, second steps

Werner Almesberger werner at almesberger.net
Sat Mar 28 03:40:18 UTC 2015


This time I tackled the wasteful touch sensor:

http://downloads.qi-hardware.com/people/werner/anelok/tmp/current-reduction-2.png

"display off in ui_off" is where we left off the last time, with an
average standby current of about 6.7 mA.

"use msleep also in init_cal" eliminates the last bastion of mdelay,
the touch sensor calibration. Anelok now takes little naps between
samples.

So far, so good, but it still busy-waits while the touch sensor
controller is sampling. So this was next. This involved a bit of
infrastructure work, e.g., teaching the firmware how to handle
interrupts (unexpectedly painless), and deepening my understanding of
how wakeups from a deep sleep are handled in this processor (that took
a while. See fw/plat/sleep.c for details.)

"deep-sleep while waiting for TSI" shows the result of all this: the
MCU now spends most of its time in deep sleep while in standby.
Standby current is down to 0.9 mA, most of which should now be the
boost converter.

One unexpected side-effect of all this is that the calibration seems
to take about twice as long as before. Not sure why. Deep sleep itself
should only add about 1 ms to the whole process, but this difference
is much longer. To be investigated later.

- Werner



More information about the discussion mailing list


interactive