Fix bug pwm pulse at initialization

Bug: when pwm is initialized, a pulse is running for a very short time
(<1us).
Fix it.
Fix bug pwm pulse when disable