Code to output CPU clock on pin PA7: Call the function from setup() like this:
Sample code to adjust the PWM frequency for analogWrite without affecting millis(). D5, D9 and D10 cannot be changed from 970Hz at 16MHz and 1221Hz at 20MHz without affecting millis(). D3 and D6 are by default, the same as D5, …
This is the code used in the following Tweet.