Hello,
I am using a MPC5744P microcontroller to control a PMSM. I use the PWM outputs to control the motor and I use the Output Enable Register (FlexPWM_OUTEN) to enable or disable the PWM outputs. When I want to enable the PWM outputs I use this command in my software:
FlexPWM_0.OUTEN.R = 0x0FF0;
And when I want to disable the PWM outputs I use this command in my software:
FlexPWM_0.OUTEN.R = 0x0110;
The submodules I use to control the three motor phases are the submodules 1, 2 and 3. I use the submodule 0 to control other semiconductors that are not related with the three motor phases. So, I have the PWM outputs of submodule 0 always enabled.
The control of the motor goes fine but when I want to stop the motor I use the "FlexPWM_0.OUTEN.R = 0x0110;" command and in very few cases we have an overcurrent in the phases of the motor. Am I using correctly the "FlexPWM_0.OUTEN.R = 0x0110;" command to stop the motor control? Must I use other command?
I want to add in this message that when I configure the PWM outputs I configure them as SIUL_PULL_DOWN.
Thanks,
Iker Leunda