You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Amr Bekhit <am...@gmail.com> on 2018/06/28 15:36:59 UTC

Sleep modes in mynewt

Hello,

What's the status of sleep/power saving in mynewt? Does mynewt have any
support for bringing the CPU into various sleep modes? Does the system go
into sleep mode during the idle task (I've done some digging - I don't
think it does)? I've done some search in the source for 1.4.0 and found
references to hal_bsp_power_state, but all implementations are empty with
simply a return 0.

Amr

Re: Sleep modes in mynewt

Posted by will sanfilippo <wi...@runtime.io>.
Generally speaking it is up to the developer to implement various “low power states” for their application. If you are running on a cortex-M processor the OS uses “tickless idle”. This means that the CPU is halted on a WFI instruction until the OS needs to do something next. Other than that the OS only provides a framework/hooks for implementing low power states.

> On Jun 28, 2018, at 8:36 AM, Amr Bekhit <am...@gmail.com> wrote:
> 
> Hello,
> 
> What's the status of sleep/power saving in mynewt? Does mynewt have any
> support for bringing the CPU into various sleep modes? Does the system go
> into sleep mode during the idle task (I've done some digging - I don't
> think it does)? I've done some search in the source for 1.4.0 and found
> references to hal_bsp_power_state, but all implementations are empty with
> simply a return 0.
> 
> Amr