embassy
embassy copied to clipboard
Fix incorrect D1CPRE max for STM32H7 RM0468
Fixes #2445
seems it was not 100% a mistake, sorry :sweat_smile:. 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?
Oh I see it's part of the datasheet and not the reference manual :sweat_smile:
Reading (or writing) that bit seems a bit harder as it is part of SYSCFG_UR18
... which is not currently a part of the pac crate: https://docs.embassy.dev/stm32-metapac/git/stm32h723zg/syscfg/struct.Syscfg.html