STM32CubeH5 icon indicating copy to clipboard operation
STM32CubeH5 copied to clipboard

System clock configuration issue in STM32H573I-DK OEMiROT_Boot sample project

Open CuriousSaman opened this issue 1 year ago • 1 comments

Hello, It seems that there is an issue in the PLL1M configuration in Projects/STM32H573I-DK/Applications/ROT/OEMiROT_Boot/Src/system_stm32h5xx.c file SetSysClock() function. RCC_PLL1CFGR_PLL1M_Pos was used as the value. https://github.com/STMicroelectronics/STM32CubeH5/blob/3d723b2467cdb13c2d780ceaa583b269680b67a4/Projects/STM32H573I-DK/Applications/ROT/OEMiROT_Boot/Src/system_stm32h5xx.c#L298

Also, I think the values for reaching 250MHz should be like this:

  • PLLM: 4 (RCC_PLL1CFGR_PLL1M_Pos will expand to 8)
  • PLLN: 31 (it's 60 in the current code)
  • PLLP: 2
  • PLLQ: 2
  • PLLR: 2
  • PLLFRACN: 2048

Screenshot image

Furthermore, it might be better to use: RCC_PLL1_VCORANGE_WIDE instead of RCC_PLL1VCOWIDE RCC_PLL1_VCIRANGE_2 instead of RCC_PLL1CFGR_PLL1SRC_1 RCC_SYSCLKSOURCE_PLLCLK instead of (RCC_CFGR1_SW_1 | RCC_CFGR1_SW_0)

https://github.com/STMicroelectronics/STM32CubeH5/blob/3d723b2467cdb13c2d780ceaa583b269680b67a4/Projects/STM32H573I-DK/Applications/ROT/OEMiROT_Boot/Src/system_stm32h5xx.c#L297

CuriousSaman avatar Aug 02 '23 15:08 CuriousSaman

ST Internal Reference: 158775

HBOSTM avatar Aug 04 '23 13:08 HBOSTM