-
Notifications
You must be signed in to change notification settings - Fork 2k
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
periph/pm: pm_layered never used #6655
Comments
In case it's relevant. I am compiling with |
cgundogan
added
Area: pm
Area: (Low) power management
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
labels
Mar 7, 2017
Same as #6709, should we close one of them? |
Closed
@immesys can you recheck with the 2017.10 branch? |
The weak functions don't exist anymore since #7726. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On SAMR21 the
pm_set_lowest
implemented insys/pm_layered
is never called because the weakly defined noop version indrivers/periph_common
takes precedence. If I knew why, this would be a pull request not an issue.To see this, you first have to fix #6640 which at the time of writing is not merged. So
Then compile a trivial example for samr21
Now look at the symbol for pm_set_lowest:
It's the weak symbol that was defined in drivers/periph_common which does nothing.
Now remove the fallback weak symbol:
Now recompile the app and check the symbol. The proper one in
sys/pm_layered
is now there and it is called at runtime. Consequently the cpu's pm_set function is no longer stripped and actually appears too.At present this bug means that the new power management system doesn't work and the SAMR21 stays at 5mA+ even when doing nothing. I'm not sure why testing did not detect this, but we should fix it soon.
The text was updated successfully, but these errors were encountered: