Fix PWM Timer un-inversion when setting the frequency at runtime.