S32K396 Change sampling & switching frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K396 Change sampling & switching frequency

Jump to solution
1,198 Views
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.

0 Kudos
Reply
1 Solution
1,115 Views
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

View solution in original post

1 Reply
1,116 Views
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