Thanks,Daniel
If I clearing PWMENx, it will not work well when I set PWMENx again. There is no output on PWM channel.
Now, I use the Timer0 interrupt to check the input square wave's duty. If the duty under 10% , I will close the motor. Meanwhile, I want to reduce stand-by current. If the duty up 15%, it will restart the motor. I disable the GDU and PMF by PMFENCA_PWMENA = 0; &GDUE_GFDE = 0. But when it restarts the motor ,there is no output on PWM channels. I enable the GDU and PWF when it restarts.
What can I do to disable the GDU and PMF if I don't use it? OR is there other way to reduce the stand-by current?
Regards,
Frank