cancel
Showing results for 
Search instead for 
Did you mean: 

STm32H745 M4 Clock limitation problem

yuri CH
Senior

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) 0693W00000GYfaCQAT.png 

also i use the following power configurations:

0693W00000GYfdQQAT.png 

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!

13 REPLIES 13
Mike_ST
ST Employee

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.

yuri CH
Senior

Hi! Thanks for the quick response!

i have generated a new project with the default defenitions as suggested, here is the clock config interface:

0693W00000GYgwsQAD.pngwhen i generate the code i still see that the system core clock is 64MHZ,.

0693W00000GYgq7QAD.png i excpect the clock to be as i defined in the cubeMX, am i looking on the wrong thing?

Mike_ST
ST Employee

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.

yuri CH
Senior

After all proper initializations i try to call the HAL_RCC_GetSysClockFreq(), the returned value is 64Mhz (64000000)..

Mike_ST
ST Employee

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.

yuri CH
Senior

So from what i understand this is the maximal clk frequency for the M4?

Mike_ST
ST Employee

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.

Hello @Mike_ST​ ,

Did you get 240Mhz in CM7 context when your SYSCLK is set to 240MHz or 400MHz ?

Thanks,

Sara.

Hello Sara

I got that when SYSCLK is set to 480Mhz in the CubeMX clock configuration.