Disable PWM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Disable PWM

1,310件の閲覧回数
IkerL
Contributor I

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

0 件の賞賛
返信
2 返答(返信)

1,297件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if output enable signal is cleared, the output immediately goes to high-Z. So depending external circuitry it can bring some issue. Weak pull down could not help too.

PetrS_1-1699445138300.png

It would be better to put outputs to inactive state, for example using MASK or FAULT logic.

BR, Petr

0 件の賞賛
返信

1,262件の閲覧回数
IkerL
Contributor I

Hello Petr,

thank you for your answer. I am using the solution you gave me and I am testing it with a motor. The problem I had, ocurred in very few cases so I have to test it many consecutive days.

However, I have seen with an oscilloscope that putting the pwm outputs to inactive state as you recommended me, the outputs of the pwm go to 0 much faster than clearing the output enable as I did before. So it seems it will go perfect.

Thanks,

Iker Leunda

0 件の賞賛
返信