2021-11-26 12:41 AM
Hello, i am using stm32h723zg nucleo board in my project. my system clock frequency 480 MHZ, that means it does an instruction for about 2,08 ns as well but the time i measure
9-10 ns , That's too much.(application ; Writing adc value to another variable in an adc interrupt.)
2021-11-26 05:40 AM
thanks,I understand but I am surprised, how stm32f4 faster than stm32h7,,, (stm32f4-> 168 MHZ, STM32H7->550MHZ),,because i choose h7 only for fast
2021-11-26 06:29 AM
The bus structures are different, the CM4F vs CM7 cores are very different
The RMW you use eats significant cycles, and stalls the pipeline by doing slow reads and write across more buses, where you are forcing completion end-to-end, and in-order completion.
The WRITE form to BSRR will use the Write Buffers, which allow for deferred completion (execution pipeline proceeds), but then you read something else which causes it to stall to insure the activity is done in-order.
If you removed the BSRR interactions completely the code would run/loop faster.
You should do a LOCK/XCHG on memory on a multi-GHz x86 sometime and see how much whiplash you suffer..
2021-11-26 07:16 AM
Perhaps do your profiling on some more relevant piece of code which does actual processing rather than a single instruction.