-
Notifications
You must be signed in to change notification settings - Fork 8.2k
STM32G4x/STM32L4Rx/STM32L4Sx: Fix sys clock frequency and boost voltage for highest clock frequencies #22311
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
|
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
1023ea9 to
2992246
Compare
b6fa354 to
cec6c13
Compare
|
power boost does not impact clock control but only valid for stm32g4. |
|
Not sure if this is helpful to this issue but I needed to change stm32g4xx_ll_utils.c in the stm32 hal in order to get the correct baud rate. |
239215c to
cec6c13
Compare
|
So this PR attempts to fix also #21681, which was not mentioned yet. I agree with @rosterloh that there is a bug in the STM LL driver, see also his PR. I think that's the root cause of the wrong UART baud rate. As far as I could see, the MCU actually runs at the specified speed, but only SystemCoreClock variable is set wrong in LL drivers. Did quite a lot of debugging looking at the actual register contents. |
|
stm32g4xx: set power boost mode for sys clock greater than 150MHz |
|
updating west.yml after merge of the zephyrproject-rtos/hal_stm32#37 |
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.
Please update the PR summary to include which issues it fixes. i.e., "Fixes #NNNN"
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.
MHZ(150) would be easier to read
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.
changed to MHZ(150)
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.
MHZ(80)
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.
changed to MHZ(80)
This patch activates the boost mode for the main regulator when the system frequency above 150MHz for stm32g4xx soc series. To save power, the boost mode should be disabled below 150MHz. Signed-off-by: Francois Ramu <[email protected]>
This patch activates the boost mode for the main regulator when the system frequency above 80MHz for stm32l4Rx/stm32l4Sx soc series. To save power, the boost mode should be disabled below 80MHz. Signed-off-by: Francois Ramu <[email protected]>
This updates the stm32cube drivers to fix the issue on sysclock Signed-off-by: Francois Ramu <[email protected]>
|
change to MHZ(xxx) |
This patch enables the main regulator boost voltage for sys clock highest frequency.
For STM32G4xx series, boost mode when sys clock is higher than 150MHz
For STM32L4Rx or STM32L4Sx series, boost mode when sys clock is higher than 80MHz
Fixes #22245
Signed-off-by: Francois Ramu [email protected]