cancel
Showing results for 
Search instead for 
Did you mean: 

H745 CM7 core has higher clock frequency but runs code slower than CM4 core

wwknoww
Visitor

Dear friends,

 

I am playing around with NUCLEO-H745ZI-Q.

I generated example motor control project from en.X-CUBE-MCSDK-FUL_6.4.0 for CubeIDE v.1.18.1.

This example project utilizes CM4 core.

 

Clock frequency for CM7 core can be twice higher than the clock frequency for CM4. 

Therefore, I believed that CM7 core can run code twice faster than the CM4. 

I use GPIO Output to measure code execution time on the oscilloscope.

To estimate completion time, I use a code in a while() like this:

 

HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_0);

Ialphabeta = MCM_Clarke(Iab);

HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_0);

HAL_Delay(100);

 

I/O pin is in “Very High Speed Mode”.

 

So, running it on CM4 @240 MHz, I get:

-         630 ns without optimization;

-         230 ns with FAST optimization;

 

Surprisingly, after migrating code on CM7@480 MHz, I get worse results:

-         850 ns without optimization;

-         470 ns with FAST optimization;Oscilloscope.png

 

Could you please help me understand how is it possible? Why could the code run so much slower on a core with the clock frequency twice higher?

 

Best regards, wwknoww.

1 ACCEPTED SOLUTION

Accepted Solutions
wwknoww
Visitor

I found a reason for such behavior in disabled ICash and DCash for CM7.

With cash enabled the code works nearly twice faster on CM7 than on CM4.

View solution in original post

1 REPLY 1
wwknoww
Visitor

I found a reason for such behavior in disabled ICash and DCash for CM7.

With cash enabled the code works nearly twice faster on CM7 than on CM4.