Change PWM inversion method, and add delay on PWM enable.