stm32h7/clk: work in progress #17978
Draft
+1,910
−621
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Some time ago I've learned about the nuttx's clk framework. My work being mostly on stm32h7 mcu's I've some nucleo boards to spare.
I've worked in my spare time on moving the reset and clock configuration to this clk framework.
It is starting to get some shape although I'm kinda worried that is not really the "embedded" way of doing things.
It uses more (by 100% some can say) ram usage to store the clk structs, the clk file part of the procfs needs 10kb ram just to generate the output buffer.
That being said, there are lot's of reasons to use this approach, at least of this beefy stm32h7 mcu family.
It simplifies a lot the clock interaction
I'll keep this in draft to see if there is any use of these changes. Anyone is free, or encouraged, to have a look over this changes, although lots of things still missing, the stm32_rcc.c file is close to something final.
Impact
Should be considered breaking change.
Lot's of things will differ.
Testing
This is still work in progress, so, not many tests, other than the development lifecycle