-
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
stm32/cpu: Add functions for low power mode clock config #12579
Conversation
ff84016
to
43cc130
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about F0, F3 and L1 ?
As far as I could find, the F0, F1, F3 and L1 don't have these registers. No low power mode clock enable for them. considering this case, do you think it makes sense to omit the function completely? The other solution is to add an empty function for those. I'm not really sure what the 'better' solution is in this case |
Depends, is it more convenient if you can just always can call that function even if it's a No-Op or would that code path not be taken on those devices because they need an entirely different driver? |
I've been thinking about it a bit and I prefer to omit them for the cases where it would result in a No-op. The functions are internal and specific to a subset stm32 devices, they should only be used for periph drivers. In this case I prefer to have a hard fail on compilation compared to a silent "failure". We can always add the No-op functions if it is more convenient on the periph side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds a new function, code looks clean and no side effects.
1bb3578
to
799823b
Compare
Squashed! |
Contribution description
This PR adds functions for managing the clock config in low power mode for the STM32 devices.
Testing procedure
I'm not really sure, it should at least compile for all stm32 based devices
Issues/PRs references
Required for #12556