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

Call __WFI() when going idle #2769

Closed
betzw opened this issue Sep 21, 2016 · 12 comments
Closed

Call __WFI() when going idle #2769

betzw opened this issue Sep 21, 2016 · 12 comments

Comments

@betzw
Copy link
Contributor

betzw commented Sep 21, 2016

Description

  • Type: Enhancement
  • Priority: Minor

Enhancement

As long as there is no tickless mode, function default_idle_hook() should (at least) call __WFI() to reduce power consumption.

Target
all

Toolchain:
all

mbed-cli version:
all

Expected behavior
Reduced power consumption when idle.

Actual behavior
No reduction in power consumption when idle.


Enhancement

Suggested enhancement
Call __WFI() inside function default_idle_hook() in non-tickless mode.

@sg-
Copy link
Contributor

sg- commented Sep 22, 2016

@betzw can you point at the particular change? bdab10d is quite large

@betzw
Copy link
Contributor Author

betzw commented Sep 23, 2016

It is not related to any particular change since it seems as if this behavior exists since a long time.
Basically it is about commenting the call to sleep()out in function default_idle_hook() (see here).
Not sure how to interprete the comments above the commented sleep(), but I think that in an officially released OS a non-debug build should put the system in at least __WFI() when its going idle.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 23, 2016

Tickless mode shall get into the code base this year, there were some problems as you might have noticed with tickers that needs fixing, it's parked on the feature branch at the moment.

Even if you add __WFI() how much would we save as systick is running?

@betzw
Copy link
Contributor Author

betzw commented Sep 23, 2016

No, I didn't notice the issues with tickers. But did I get it right that when calling __WFI() in some situations tickers might not behave correctly anymore? If yes, obviously you shouldn't call __WFI() for the moment, otherwise even if it will save less than in tickless mode, it will anyway improve power consumption.

@betzw
Copy link
Contributor Author

betzw commented Nov 14, 2016

Any news on this @sg-, @0xc0170?

@betzw
Copy link
Contributor Author

betzw commented Dec 19, 2016

Ping!

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 19, 2016

There's feature branch, that needs more work: https://github.com/ARMmbed/mbed-os/tree/feature_rtos_tickless. It should resolve this.

cc @bulislaw

@betzw
Copy link
Contributor Author

betzw commented Dec 20, 2016 via email

@betzw
Copy link
Contributor Author

betzw commented Dec 20, 2016

@screamerbg

@bulislaw
Copy link
Member

There were difficulties with the tickless mode due to differences in platforms and how they implement low power timer. I have an idea how to address it, I'll write it down over Christmas and then we can discuss it and find some time to implement it.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 20, 2016

Seems like an abandoned branch, I mean last commit about 4 months ago. Have you any timeline for when this branch would be merged?

Addition to the comment above about issues with the tickers, there's a plan for RTX update, therefore this idle loop work should be based on that update (version >5.4)

@bulislaw
Copy link
Member

That shouldn't be a problem, as the RTX API changes are cosmetic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants