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

System clock configuration issue in STM32H573I-DK OEMiROT_Boot sample project #4

Open
CuriousSaman opened this issue Aug 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system projects Projects-related (demos, applications, examples) issue or pull-request.
Milestone

Comments

@CuriousSaman
Copy link

CuriousSaman commented Aug 2, 2023

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.

MODIFY_REG(RCC->PLL1CFGR, RCC_PLL1CFGR_PLL1M, RCC_PLL1CFGR_PLL1M_Pos << RCC_PLL1CFGR_PLL1M_Pos);

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)

MODIFY_REG(RCC->PLL1CFGR, RCC_PLL1CFGR_PLL1VCOSEL, RCC_PLL1VCOWIDE << RCC_PLL1CFGR_PLL1VCOSEL_Pos);

@HBOSTM HBOSTM self-assigned this Aug 4, 2023
@HBOSTM HBOSTM added the projects Projects-related (demos, applications, examples) issue or pull-request. label Aug 4, 2023
@HBOSTM
Copy link

HBOSTM commented Aug 4, 2023

ST Internal Reference: 158775

@HBOSTM HBOSTM added the internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system label Aug 4, 2023
@HBOSTM HBOSTM moved this from To do to In progress in stm32cube-mcu-fw-dashboard Aug 4, 2023
@KRASTM KRASTM added this to the v1.3.0 milestone Mar 21, 2024
@ALABSTM ALABSTM added the bug Something isn't working label May 10, 2024
@ALABSTM ALABSTM assigned ASEHSTM and unassigned HBOSTM May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal bug tracker Issue confirmed and reported into a ticket in the internal bug tracking system projects Projects-related (demos, applications, examples) issue or pull-request.
Projects
Development

No branches or pull requests

5 participants