addition tweaks to prevent pwm signal glitches

after the period has been set and the pwm is running the duty cycle
can be changed without setting run value to 0