STM32H745 - Code is sometimes slow, but can be fixed by NOP
Hello,
I have a rather strange problem on the CM7, where code executes with half or third the speed it should.
I have no idea what is causing this, but I know how to fix it: by adding one or several NOPs somewhere in the code.
Example: an ISR is taking 10us to execute. I change something (seemingly) unrelated in the code, and suddenly this ISR, with the same code, takes 20us. Now I add a NOP at the beginning of the main, and the ISR takes 10us again.
Any ideas what the cause might be?
edit:
Some details:
- no cache used
- CM7 code is mostly RAM code on TCM
- build with -Ofast
- FMC addresses an FPGA (memory mapped registers)
- there are only two interrupts with same priority
- clocks are unchanged, because the ISR frequency stays the same.
