STm32H745 M4 Clock limitation problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-23 11:56 PM
Hi! I am working with the dual core STM32H745 nucleo board, currently on the M4 core.
I am having trouble with configuring my wanted system clock frequency.
I want the clock to be 200 MHz and accordingally i try to set it in the CubeMX clock config interface (a snapshot added)
also i use the following power configurations:
After the code is generated the system clock is 64Mhz.
(checked with scope and HAL_RCC_GetHCLKFreq() function).
Please help me understand how can i increase the sysclock frequency and what am i doing wrong in my configurations?
thanks alot!
- Labels:
-
RCC
-
STM32CubeMX
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-24 1:28 AM
Hello,
I see you are using the bypass mode for High Speed Clock in the RCC configuration.
Maybe you'll want to use HSE source in the clock tree, for the PLL source MUX. and enter 8MHz instead of 25.
Or if you want to use HSI, try to disable High Speed Clock in RCC configuration.
Anyways, in case of failure, you should restart your project, click on "acces to board selector" and select the nucleo H745.
And answer "yes" when you are asked "Initialize all peripherals with their default mode".
Then, it should start with a correct configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-24 2:02 AM
Hi! Thanks for the quick response!
i have generated a new project with the default defenitions as suggested, here is the clock config interface:
when i generate the code i still see that the system core clock is 64MHZ,.
i excpect the clock to be as i defined in the cubeMX, am i looking on the wrong thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-24 2:13 AM
If you're just looking at these variables, I think they are just init values.
What value HAL_RCC_GetHCLKFreq() is returning ?
You can use MCO output and a scope to check the frequency as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-24 2:19 AM
After all proper initializations i try to call the HAL_RCC_GetSysClockFreq(), the returned value is 64Mhz (64000000)..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-24 3:33 AM
I have tried the project as well.
HAL_RCC_GetSysClockFreq() in the CM7 context sends back a values of 240Mhz
But in CM4 context always send back 64MHz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-29 2:07 AM
So from what i understand this is the maximal clk frequency for the M4?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-30 9:12 AM
No, the H745 datasheet says up to 240Mhz for the M4.
+ check the RM0399 reference manual page 378:
https://www.st.com/en/microcontrollers-microprocessors/stm32h745-755.html#documentation
CM4 clock is derived from the CM7 one.
So I'm not sure whether this is an HAL problem that reports wrong frequency or CubeMX generated code that makes HAL to return incorrect frequency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-04 11:42 PM
Hello @Mike_ST​ ,
Did you get 240Mhz in CM7 context when your SYSCLK is set to 240MHz or 400MHz ?
Thanks,
Sara.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-05 1:34 AM
Hello Sara
I got that when SYSCLK is set to 480Mhz in the CubeMX clock configuration.
