Oh no, the settings.ini was a suggestion... For the mbed team to implement...
Thanks for the clarification - I misunderstood you in the previous post. Would it be great if there was such a control?
MBED is very powerful tool for mains-powered projects (and I have few of them queued), but for battery applications 140mA is a no-starter. It will take 240mAh battery out in under 2 hours. LPC1768 is positioned as a very-low power capable device. In non-related projects based on other low-power micros I routinely get 5-10 days operation time on 240mAh Li-Po battery. The key to that is keeping device in IDLE (Deep Sleep, PowerDown or any other name) and have absolute lowest current (<100uA). Device should only wake up when there is a task, and go back to sleep immediately after completing every task. LPC1768 supports that mode using interrupts and DeepSleep/PowerDown modes.
What was interesting to find out is while reset button is pressed, the current drops some, but stays quite high at 90mA. That's a lot higher than one would expect. I measured the blue LED current - it takes only around 2mA, so it is not the culprit. The 140mA is probably divided 30/70% between MBED chip and LPC1768, but based on very high reset current I would think that MBED chip takes around 80mA on its own.
Worst case I want to see below 10-40mA IDLE current. That will allow running up to 12 hours - it is good enough for proof of concept. With that battery-powered applications will make sense to prototype with MBED.
Simon,
Can you chime in here on the subject (supporting power savings modes wakeup on MBED, such as DeepSleep and PowerDown)? And also plans to make it lower-power overall?
Based on Michael's code (http://mbed.org/users/no2chem/notebook/mbed-power-controlconsumption/) which I fixed for myself, I played a little bit with various sleep modes. I did not do any power measurements (not near the lab today), but I was able to send MBED LPC1768 into every given mode (Sleep, Deep Sleep, PowerDown, Deep PowerDown).
I was able to wakeup MBED from Sleep using GPIO interrupt (switch on MBED_BoB2). For the Deep Sleep and Power Down, however, I cannot wake MBED up (Deep PowerDown is said to wakeup only upon reset or RTC interrupt). I tried p9 through p12 and p21 to no avail.
I've read LPC1768 user manual back and forth, and there is no indication of any black magic involved around sleep/wakeup. The only relevant information I was able to google out is that LPC1768 has problems waking up if SWD was ever used (see http://www.embeddedrelated.com/groups/lpc2000/show/44945.php). I think it may be what happens on MBED. Can anyone shed some light on this - does the little MBED chip always open JTAG port on the LPC1768? If that's the case, then we can forget about using Deep Sleep or PowerDown modes on MBED, unless it is fixed with firmware update of course.