[riot-users] Cortex Kinetis KW2xD Low Power Modes
joakim.nohlgard at eistec.se
Wed May 16 20:07:58 CEST 2018
Welcome to RIOT!
There is a pull request to integrate stop modes for the Kinetis CPUs .
There's no VLPR or VLPW yet, but STOP, VLPS, and LLS are working. It does
need a rebase though.
We could use some help reviewing this and some other related Kinetis pull
requests , ,  if you would like to help with this. Feel free to
open new PRs for any other improvements you may have.
On Wed, May 16, 2018, 09:01 Matthew Blue <matthew.blue.neuro at gmail.com>
> Hi Olivier,
> Unfortunately, it seems that low power management hasn't gotten a lot
> of love for most platforms yet. The basic API is in place though, if you
> wish to implement it on your platform.
> Relevant files:
> The PR that introduced power management:
> This command will let you find a few areas where the API has been used:
> grep -r -e 'pm_[un]*block' -e pm_set
> In general I think the idea is to number the power modes such that you:
> * Start by giving your lowest power mode 0
> * Then find the next lowest power mode that supports features that are
> a superset of the features supported by 0, and make that mode 1
> * Repeat until you run out of power modes.
> You then write a function pm_set in cpu/*/periph/pm.c that implements
> switching the power modes. And also you set up anything that can't run
> in a certain power mode to pm_block that mode, and then to pm_unblock
> when it stops running. I think the kernel then handles the rest.
> There may be some details I missed, because I am not super-familiar
> with the system, but this should give you a good start.
> Good luck!
> Matthew Blue
> On Wed, 16 May 2018 08:06:45 +0200
> Olivier Fauchon <ofauchon2204 at gmail.com> wrote:
> > Hello,
> > I'm using RIOT with KW2xD Kinetis MCU for Wireless sensors.
> > I could observe that the board's current is 10mA when idle which is
> > too high for long battery
> > operation.
> > The application note :
> > http://cache.freescale.com/files/32bit/doc/app_note/AN4503.pdf),
> > says there are Very Low Power Run / Wait / Stop modes.
> > There are at lease these functions to integrate in RIOT Kernel.
> > void enter_vlpr(void); => Enter low power run mode
> > void exit_vlpr(void); => Go back in regular power run mode
> > void enter_vlps(void); => Go to low power sleep
> > What is the correct way to integrate this low power mode in Riot Power
> > management?
> > Are there existing implementation for these low power modes for other
> > MCUs to take in example ?
> > Thanks
> > Olivier
> users mailing list
> users at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users