Skip to content
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

Fix incorrect D1CPRE max for STM32H7 RM0468 #2518

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

msrd0
Copy link
Contributor

@msrd0 msrd0 commented Feb 2, 2024

Fixes #2445

@Dirbaio
Copy link
Member

Dirbaio commented Feb 2, 2024

seems it was not 100% a mistake, sorry 😅. Looking through the datasheet, you need to set the CPUFREQ_BOOST option byte in order to reach 550mhz. I think the reason the max is set to 520 is there's no support for setting that option byte yet.

perhaps a fix is to read CPUFREQ_BOOST: and set the limit to 520 or 550 dynamically. So it won't set the option byte for you for now, but if you do set it yourself via some other means (like when factory programming) you can use 550mhz?

screenshot-2024-02-02_13-57-20

@msrd0
Copy link
Contributor Author

msrd0 commented Feb 2, 2024

Oh I see it's part of the datasheet and not the reference manual 😅

@msrd0 msrd0 marked this pull request as draft February 2, 2024 13:06
@msrd0
Copy link
Contributor Author

msrd0 commented Feb 2, 2024

Reading (or writing) that bit seems a bit harder as it is part of SYSCFG_UR18

image

... which is not currently a part of the pac crate: https://docs.embassy.dev/stm32-metapac/git/stm32h723zg/syscfg/struct.Syscfg.html

@msrd0 msrd0 marked this pull request as ready for review March 9, 2024 10:51
Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! 🚀

@Dirbaio Dirbaio enabled auto-merge March 9, 2024 11:01
@Dirbaio Dirbaio added this pull request to the merge queue Mar 9, 2024
Merged via the queue into embassy-rs:main with commit 1366c27 Mar 9, 2024
6 checks passed
@msrd0 msrd0 deleted the issue-2445 branch March 9, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STM32H7 RM0468 incorrect D1CPRE max
2 participants