Best option would be to use Hardware PWM and HPWM command.