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

cpu/stm32: centralize PM_BLOCKER_INITIAL define #11383

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Apr 12, 2019

Contribution description

This PR move the PM_BLOCKER_INITIAL macro definition of stm32f1/stm32l0 to a common stm32 place. This is because all STM32 families now support pm_layered.

The define is also overridable now: this is required when one wants to unlock by default a certain pm mode from its application Makefile (useful with LoRaWAN).

Another option is to completely remove the define from stm32l0 and stm32f1, since the default value in pm_layered is already the same. Maybe this would be the preferred solution ?

Testing procedure

A green Murdock should be enough. One can also add CFLAGS += '-DPM_BLOCKER_INITIAL={ .val_u32=0x01010100 }' in any application and verify that it builds without error.

Issues/PRs references

Required by #11237

@aabadie aabadie added Platform: ARM Platform: This PR/issue effects ARM-based platforms CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: pm Area: (Low) power management labels Apr 12, 2019
@aabadie aabadie requested a review from vincent-d April 12, 2019 06:17
* @brief Default initial PM blocker
* @todo All modes are blocked per default, until PM is cleanly implemented
*/
#define PM_BLOCKER_INITIAL { .val_u32 = 0x01010101 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is now identical as in sys/pm_layered/pm.c. Should we just drop it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that was the alternative solution I proposed in the initial comment of this PR. If it's ok for you I can drop it no problem :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I just saw that. Yeah, let's drop it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@aabadie aabadie force-pushed the pr/cpu/stm32l0_pm_initial_blocker branch from 61b9652 to db9b341 Compare April 12, 2019 09:11
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@kaspar030 kaspar030 merged commit 0ea3c4f into RIOT-OS:master Apr 12, 2019
@aabadie aabadie deleted the pr/cpu/stm32l0_pm_initial_blocker branch April 12, 2019 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pm Area: (Low) power management CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants