-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32L5: corrected voltage scaling when using MSI #14720
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
Conversation
@chrJost, thank you for your changes. |
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.
Good catch!
Every HAL_PWRxxx calls should be preceded by __HAL_RCC_PWR_CLK_ENABLE()
@jeromecoutant do you happen to know if any tests would check for the speed of the chip, so that this kind of error could be caught? I did a short check in the STM32L452xx folders, the init sequence there looks very different, so this kind of error could be in any other (STM32?) device as well. It would be very tedious to check everything by hand. Another thought I had was, if this kind of error could also happen in the init of other peripherals. I guess this leads back to the question if it can be detected automatically... |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
I'll merge this but the question above remains. |
I will open an issue for this, since this question is probably out of scope for this PR. |
It is maybe also out of scope of mbed :-) |
That is why I would use an issue for that, since that can easily be rejected as out of scope :) |
Summary of changes
Up to now the voltage scaling of the STM32L5 is set before the clock to the peripheral module is enabled. Therefore the voltage scaling is not applied correctly, the STM32L5 devices seem to always run in default mode.
I corrected this by moving the code lines around, and could confirm in custom STM32L552ZE hardware that the voltage scaling now works.
I am not aware if there are any tests yet that could catch this change of behaviour. If somebody with more knowledge of the test system could comment on this, I would be grateful.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers