Skip to main content
Ss.9
Associate
November 12, 2021
Solved

Code running slow on M4 CPU of a STM32H747 DISCO board

I'm using a STM32H747 DISCO boad and I just want to use the M4 CPU. When start, the M7 configs the Clock and does nothing since then. There is only a simple case running on the M4 CPU. The case takes 200ms on M4 while it took only 20ms on a Risc-v@300Mhz CPU.

I use the "-O2" and hardfloat during compiling. But I have no idea what should I do next.

Any Ideas?

The codes are arrays multiply operation with data of float type.

This topic has been closed for replies.
Ss.9
Ss.9Best answer
Associate
November 15, 2021

Turns out I was using the AXISRAM implicitly allocated to M7. Now It is much faster. But The Dhrystone is 0.37 DMIPS/MHz, which is still not a good number for me. The CPU clock is 200Mhz and ahb is the same.

3 replies

KnarfB
Super User
November 12, 2021

Are you sure that the compiler uses hard fp and issues floating point instructions? M4 is single precision only? What is the M4 clock?

Ss.9
Ss.9AuthorBest answer
Associate
November 15, 2021

Turns out I was using the AXISRAM implicitly allocated to M7. Now It is much faster. But The Dhrystone is 0.37 DMIPS/MHz, which is still not a good number for me. The CPU clock is 200Mhz and ahb is the same.

Piranha
Principal III
December 1, 2021

For M4 core to run at decent speeds from the FLASH, one has to enable the ART.