5 years, 2 months ago.

Oscillating current with peaks approx 1s (5uA->30uA) after calling wait () (in deepsleep) on mbed-os

Hi everyone,

I noticed an energy consumption issue on mbed-os after calling wait(). Previously, I worked on clean mbed (Mbed2) libraries and my device consumed about 4 ... 5uA after going to deepsleep mode. After rewriting the program on the mbed-os and using the built-in API for sleep modes for the STM32L476 microcontroller, I noticed that the current consumption after calling the wait () function fluctuates from the previous 4 ... 5uA up even to 30uA. As if the mbed-os work on a slow clock (tickless enabled) OS is checking something about every 1s because every 1s device raises the consumption of the current to around 30uA and after such a peak falls to the native 5uA. I switched the microcontroller to STM32L432 and I also tried to do the unmodified examples directly from the mbed team. The problem occurs all the time for different uC and unmodified example programs. For devices powered by small batteries is a serious problem. The question is, how can I slow down this work by OS in deep sleep (checking events or doing something else by mbed-os when fast clocks are off) at a slower rate to make these peaks with increased energy consumption occur less frequently eg. every 20s not on every about 1s? Maybe there is a chance to turn it off at all? Can someone explain the cause such temporary increases in the consumption after calling wait ()?

Yes I found that too, I did mention it somewhere but never got a response I haven't noticed it on Mbed 2 though and I use that for the moment. If Deep Sleep level on Mbed 2 does not do it then in theory it should not on OS5, but with all that thread stuff going its hard to say, but then whats the point of OS5 if it can't be low energy, so there must be a fix.

posted by Paul Staron 20 Feb 2019
Be the first to answer this question.