I need to generate a 25 KHz square signal. The Arduino UNO timers are already set up. My question is which pair (Timer, Pin) can be free to use without altering the Arduino's behaviour. I have no problems with C, C++ or even assembler; my problem is to break something inside the platform for using, for example, a system timer.
If you don't use analogWrite() no any pin will be configured for PWM. So you can use any. Timer0 is used for time keeping millis() so don't change its pre-scaler and don't use Timer0 overflow interrupt. You can still use Timer0 compare interrupts.