Today, a friend pointed out that, if the PWM frequency was too low, the permanent magnets of the motor might slowly get demagnetized; thus their performance will drop over time. According to the reference, the default frequency of the PWM signal is about 490 Hz. My friend recommended to set the PWM frequency to about 2 to 4 kHz.
I am aware that one can set the Arduino's PWM frequency, but the code's comment also says that
Changes on pins 3, 5, 6, or 11 may cause the delay() and millis() functions to stop working.
a thing I definitely want to avoid.
Has anyone any hint what I should do?