Even though it's not even used, the speed drops to 500Hz which is almost 10x slowdown.
fast.ino.txt - this is fast version
slow.ino.txt - this is slow version
- scope comparing fast and slow version
The only difference is really only the presence of one unused function. Of course in real code this function is used and does something but I was able to minimize the code to still cause the slowdown.
I'm using STM32F103C8T6 blue pill. I'm bitbangin DAC8830. Everything works fine, the output is sawtooth at around 4kHz. But if I add this function:
Even though it's not even used, the speed drops to 500Hz which is almost 10x slowdown.
fast.ino.txt - this is fast version slow.ino.txt - this is slow version
- scope comparing fast and slow version
The only difference is really only the presence of one unused function. Of course in real code this function is used and does something but I was able to minimize the code to still cause the slowdown.