embassy icon indicating copy to clipboard operation
embassy copied to clipboard

Fix incorrect D1CPRE max for STM32H7 RM0468

Open msrd0 opened this issue 1 year ago • 3 comments

Fixes #2445

msrd0 avatar Feb 02 '24 12:02 msrd0

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?

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

Dirbaio avatar Feb 02 '24 13:02 Dirbaio

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

msrd0 avatar Feb 02 '24 13:02 msrd0

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 avatar Feb 02 '24 15:02 msrd0