update pwm frequency