Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
3 years, 3 months ago.
How to use MBED_TICKLESS on STM32?
I'm investigating low-power modes for a battery powered application.
I would appreciate any guidelines or thoughts because I've tried
MBED_TICKLESS but haven't managed to do anything useful yet.
If I just add
MBED_TICKLESS the power consumption goes up. I think this is because it is still ticking at 1 ms but goes into to 'deep sleep' for that 1 ms. The overhead of 'deep sleeping' must cost more than is saved in 1 ms. In other words,
MBED_TICKLESS on its own doesn't work.
If I also switch to the RTC, i.e add
"target.lowpowertimer_lptim": 0, I can see that the 1 ms ticks stop and the 'deep sleep' lasts for the length of the
Thread::wait. If the
Thread::wait lasts for seconds I can see the power consumption dropping to uA.
But, this doesn't work for multiple threads. AFAICT, when 'deep sleep' is entered by
Thread::wait only the that thread is considered in the timeout. Any other threads also using
Thread::wait no longer run (correctly).
Is it necessary to attach attach a special idle hook in order to do anything useful with