-
Notifications
You must be signed in to change notification settings - Fork 67
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
Thoughts on clock config #157
Comments
Closing in favor of #159 |
Also some ideas came up in #156. |
I just noticed that the L0 hal implementation is very similar to the |
This is an issue, I still want to tackle, but had no time as of now. I summarized my preferences how to implement a more robust and flexible clock configuration in #156 (review) |
It seems like the current system fails silently, and gives the user too many degrees of freedom. Eg the illusion you can set whatever speeds you want. I think the STM32Cube IDE visual clock config is a good guide for what configs are valid.
Suggestion: Instead of setting speeds, set the various scalers. This alone reduces the degrees of freedom. Have a helper method to show what speeds these output. Calculate the speeds, and validate before setting. This deals with errors in 2 ways: Prevents requesting speeds that can't be set using the scalers and 2: Fails explicitly if the resulting speeds are out of range.
The text was updated successfully, but these errors were encountered: