Hi all,
I've been experimenting with overclocking Teensy 4.0 and I have some confusion on the correct way to change clock speed dynamically. I started off just setting the F_CPU macro which I believe is used as the frequency for the function call to set_arm_clock at startup. This updates F_CPU_ACTUAL to the correct value and when I call set_arm_clock from my code the F_CPU_ACTUAL variable updates as expected as well. Does any other code rely on the F_CPU macro being correct? Can I change the clock speed by calling set_arm_clock and not affect anything else?
Thanks
I've been experimenting with overclocking Teensy 4.0 and I have some confusion on the correct way to change clock speed dynamically. I started off just setting the F_CPU macro which I believe is used as the frequency for the function call to set_arm_clock at startup. This updates F_CPU_ACTUAL to the correct value and when I call set_arm_clock from my code the F_CPU_ACTUAL variable updates as expected as well. Does any other code rely on the F_CPU macro being correct? Can I change the clock speed by calling set_arm_clock and not affect anything else?
Thanks