2020-07-05 09:00 AM
Hi,
I posted a question on StackExchange about this topic:
My STM32F4 (running on 100Mhz) is somehow faster than my STM32F7 (running on 200Mhz) and I really don't know what I could do about it. I wrote a small test programm and the rest is equally generated from CubeMX. FPU support is activated for both and I use the CubeMX generated settings, except I deactivated the optimization of the compiler, but also with optimization the same problem occurs.
Has anyone an idea, what I could further try? I changed from atollic studio 9.3 (truestudio toolchain) to the STM32CubeIDE and here the F7 runs even slower (cycle time increased to 11ms from 9.9ms)
2020-07-05 09:17 AM
How is the processor connected to the flash? If you study the block diagram of the f7 you will see that there are 2 different data busses you can use. The ART accelerator and it's data bus are much faster. Also, double check that the fpu is properly started and that the compiler is generating the right instructions
2020-07-05 09:34 AM
Thank you, it was really the ART Accelerator, that was deactivated. Now it runs properly.
2020-07-05 11:26 AM
As strange as it sounds, but on Cortex-M7 with 8+8 KB or more cache actually ART isn't the fastest. AXI bus with I-cache is even faster. Look at AN4667 table 8.
2020-07-06 03:30 AM
Interesting, that runs counter to my experience with f730. Do the performances of the I-cache vs. ART have anything to do with the structure of the code?
I tried 3 different arrangements, measuring execution speed by setting/clearing a gpio pin at the beginning and end of the main loop.
I found itcm flash with ART and dtcm ram to about the same speed as itcm ram and dtcm ram, not axi flash with I-cache which was noticeably slower.
Could there some interaction between compiler optimisation and the I-cache behavior vs. ART? Before i read the app note, all i had read about ART is that it can approach 0 wait-states, so my results seemed logical.