S32K396 Change sampling & switching frequency

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K396 Change sampling & switching frequency

跳至解决方案
1,194 次查看
agus_idiada
Contributor III

Hello,

I am using S32K396-BGA-DC1 board, with Simulink in matlab2024a. I am working on the S32K396_MBDT_BASED_MC_0_9_0 Motor Control Example Project.

In my setup I have the nxp connected with a HIL-RT hardware emulating the power stage and a motor.

I would like to change the sampling & switching frequency relationship. I found that the Fsam = 0.5 Fsw. So when I change the period on the pwm channel - Fsw (fig 1), Fsam change in the same way.

Where can I set up this? I would like to be able to do Fsam = Fsw and Fsam = 2Fsw

Moreover, modifying this, should I change the configuration somewhere for the resolver also?

Thanks, Agustin.

标记 (3)
0 项奖励
回复
1 解答
1,111 次查看
Vincent_Deng
NXP Employee
NXP Employee

Hi Agustin,

In the demo, the MasterReload signal of the FlexPWM is used as the ADC trigger. For your requirement, please change the following item:

Vincent_Deng_0-1731999268024.png

For more details please refer to the Reference Manual, Chapter eFlexPWM, register Submodule a Control(SM0_CTRL-SM3_CTRL). 

Vincent_Deng_0-1731999573769.png

 

Thanks,

Vincent

在原帖中查看解决方案

1 回复
1,112 次查看
Vincent_Deng
NXP Employee
NXP Employee

Hi Agustin,

In the demo, the MasterReload signal of the FlexPWM is used as the ADC trigger. For your requirement, please change the following item:

Vincent_Deng_0-1731999268024.png

For more details please refer to the Reference Manual, Chapter eFlexPWM, register Submodule a Control(SM0_CTRL-SM3_CTRL). 

Vincent_Deng_0-1731999573769.png

 

Thanks,

Vincent