mod for hardware pwm