PWM Function Debug

Fix PWM Function Debug
End Function now with all reset execute when called.