Sleep Mode

27 Oct 2009 . Edited: 27 Oct 2009

Can the mBed do a sleep (low current) mode for extended battery data logging apps.

Regards
Paul

27 Oct 2009 . Edited: 27 Oct 2009

Hi Paul,

Paul Mulvey wrote:
Can the mBed do a sleep (low current) mode for extended battery data logging apps.

No, not at the moment. Also, we've not optimised particularly for low power applications yet, however the LPC1768 MCU we use is very good for that sort of thing.

It is something we could look at if there was enough interest, and although the hardware is certainly not optimised for ultra-low power, we could do a lot better than running flat-out the whole time!

What would be good is understanding how you'd imagine using/controlling it. An example of use case in pseudo C code would be a good place to start.

FYI, I had imagined a low power "sleep(seconds)" function, with functionality basically the same as wait(), but put in to a state-retaining, interruptable power down mode for the duration. Any other use models or design patterns welcome.

Simon

28 Oct 2009

Hi Simon,

As an alternative to the sleep(seconds) approach, which I imagine would work like:

while(1) {
    led = ~led
    sleep(10);
}

I would prefer something like:

Ticker flipper;

void flip() {
    led = ~led
}

int main() {
    flipper.attach(&flip, 10.0);

    while(1) {
        sleep();
    }
}

Where sleep() just puts the core to sleep indefinitely, until it is interrupted. This is more complicated for the simple case in my example, but has the benefit that the rate at which something is done can be precisely controlled, and also means that you can sleep waiting for non-regular interrupts (e.g. InterruptIn).

What do you think?

Max

28 Oct 2009

Can an inlined WFI or WFE be of use?

31 Oct 2009

Is there some way to change the processor clock speed and thus the power consumption. Afterall some apps might only demand 1% of the MIPS. Being able to change this dynamically would be neat i.e. go fast or slow depending on the job at hand.

28 Nov 2010

I want to use the MBED as the core of a system that communicates via SMS. 99.999% of the time it is sitting in a corner doing nothing. Wake on serial interrupt would be a massive bonus. In Addition the ability to wake on RTC interrupt would be an added advantage. Since my system only needs to check some IO every second or so and most of the rest of the content can be run every 10 minutes.

i appreciate the MBED is a prototypeing/rapid development system primarily but being able to prove out the power draw is part of the prototyping phase surely.

28 Nov 2010

Hi Ian,

You can try a version of the firmware that allows you to turn off the interface chip when not plugged in, which can help reduce the power consumption somewhat:

With that powered off, that'll allow the LPC1768 core chip to be put in to low power modes etc if you poke the right registers.

Simon