Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/lpm_arch: Clarification of the lpm arch interface #2247

Closed
fnack opened this issue Jan 6, 2015 · 8 comments
Closed

core/lpm_arch: Clarification of the lpm arch interface #2247

fnack opened this issue Jan 6, 2015 · 8 comments
Assignees
Labels
Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: doc Area: Documentation Area: pm Area: (Low) power management Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: question The issue poses a question regarding usage of RIOT

Comments

@fnack
Copy link
Member

fnack commented Jan 6, 2015

I provided an implementation of the lpm_arch interface for the STM32F4 cpu (see #2246).

During that process, I wondered what the difference behind RIOT's LPM_POWERDOWN and LPM_OFF mode is. From my perspective, I couldn't find a difference and documentation doesn't help either. Maybe someone could explain the intention behind separating these two mode options?

If there is no difference, I'd vote for removing the LPM_OFF mode.

@fnack fnack added Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: doc Area: Documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Jan 6, 2015
@fnack
Copy link
Member Author

fnack commented Jan 6, 2015

Ping @haukepetersen. Here's the discussed new issue report from yesterday.

@haukepetersen
Copy link
Contributor

@OlegHahm do you remember the notion behind the different modes?

@OlegHahm
Copy link
Member

OlegHahm commented Jan 6, 2015

No, these defines already existed when I started to work with FireKernel. @kaspar030?

@OlegHahm OlegHahm added the Type: question The issue poses a question regarding usage of RIOT label Jan 6, 2015
@saurabh984
Copy link

I've used these mappings for SAM D21 LPM if it helps!

LPM_ON = Run Mode
LPM_IDLE = SYSTEM_SLEEPMODE_IDLE_0 (Wake up source: Synchronous, (APB, AHB), asynchronous)
LPM_SLEEP = SYSTEM_SLEEPMODE_IDLE_1 (Wake up source: Synchronous (APB), asynchronous)
LPM_POWERDOWN = SYSTEM_SLEEPMODE_IDLE_2 (Wake up source: Asynchronous)
LPM_OFF = SYSTEM_SLEEPMODE_STANDBY (Wake up source: Asynchronous)

Datasheet Ref: http://www.atmel.com/Images/Atmel-42223-SAM-R21_Datasheet.pdf (Page: 115)

@PeterKietzmann
Copy link
Member

So as there are some devices whith multiple idle modes it seems to make sense that there are for example five different power modes. Correct? One could maybe rename them so it becomes clear that they differ in "strengh" but I don't mind staying with the existing solution.

@jnohlgard
Copy link
Member

The Kinetis devices have even more power modes:

  • RUN
  • WAIT
  • STOP
  • VLPR
  • VLPW
  • VLPS
  • LLS
  • VLLS0
  • VLLS1
  • VLLS2
  • VLLS3

Having five different LPM enums is probably enough for most use-cases though.

@haukepetersen
Copy link
Contributor

I had a quick discussion with @OlegHahm about this. The most important transition seems to be the one called by the idle thread. In my opinion we could even go with less modes (as the kernel uses only IDLE and RUN), but put some platform specific code in place, so that each time the system goes into IDLE it will figure out the best mode available (depending on running peripherals and the hardware platform). Does this make sense to you?

@PeterKietzmann PeterKietzmann added the Area: pm Area: (Low) power management label Mar 18, 2016
@PeterKietzmann
Copy link
Member

Obsolete (see #6160)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: doc Area: Documentation Area: pm Area: (Low) power management Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: question The issue poses a question regarding usage of RIOT
Projects
None yet
Development

No branches or pull requests

6 participants