It's the same result using your code. In the 22.12-22.32MHz range. I got a little bump when I put arm_freq=1372 it showed me 23.58Mhz. I guess it's the reads and writes plus the branch prediction is out the window since we are taking alternating branches each time. I may just get rid of that branch and try to time it correctly within the 34 ns.Either use the scopes infinite persistence or statistics to tell you the maximum and minimum time. Now you have gone bare metal things get much better but I suspect there will still be jitter.
Statistics: Posted by MaximBondaruk — Fri Apr 05, 2024 9:41 am