fix setting bits in pwm control registers