I've been trying for hours to change the PWM frequency of my Arduino Due to a value between 15kHz...18kHz but nothing worked. I found this manual https://folk.uio.no/jeanra/Microelectronics/GettingTheBestOutOfPWMDue.html to change the PWM resolution to 12bit and the frequency to 20kHz which works very well. Now my question: if it's possible to change the PWM-Frequency to a value between 15kHz...18kHz with a resolution of 11 or 12bit, how can I do this? The pins I want to change are number 6, 7, 8 and 9. I use the command analogWrite(pin, value) for changing the PWM outputvalue.
Thanks in advance for your help.