Hello Sebastian,
Could you provide me the project you are using, please? There are many possibilities how to cerate the application. The TimerInt and PWM support several devices that can be used for the application. Please, provide the description of the configuration at least.
There can be also problem of unstable clock source (e.g. unadjusted internal oscillator). Do you use external crystal as clock source for the PWM device?
Best Regards,
Marek Neuzil