Hey Gringo

Well, you will have to use a Hardware PWM instead. Have a look to HPWM.

It runs in background and whatever else your code do... it shouldn't affect the PWM signal.