FTM module block in simulink

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

FTM module block in simulink

Jump to solution
965 Views
Sriram
Contributor IV

Hello i am trying a generate pwm signals from the FTM module block in simulink. The model is built without any errors but when i see the pwm outputs it is not what i expect it to be. the output is stuck at the initial duty cycle i entered in the block settings. i have attached the model .

Is the problem because of the sine wave sources? if it is then how can i incorporate sine wave source in the code generation.

Thank you

Tags (3)
0 Kudos
Reply
1 Solution
937 Views
SorinIBancila
NXP Employee
NXP Employee

Hello, 

The problem I found in your model is that the Sample Time of the PWM Generator block is set too low. You can try to increase it so that each step has enough time to execute. You can try to use S32Design Studio for ARM to debug your application. Place breakpoints in the step function (svpwm_step), found in 'svpwm_mbd_rtw/svpwm.cand see if they are reached.

Let me know if this helps you.

Yours faithfully,

Bancila Sorin-Ioanid

View solution in original post

0 Kudos
Reply
1 Reply
938 Views
SorinIBancila
NXP Employee
NXP Employee

Hello, 

The problem I found in your model is that the Sample Time of the PWM Generator block is set too low. You can try to increase it so that each step has enough time to execute. You can try to use S32Design Studio for ARM to debug your application. Place breakpoints in the step function (svpwm_step), found in 'svpwm_mbd_rtw/svpwm.cand see if they are reached.

Let me know if this helps you.

Yours faithfully,

Bancila Sorin-Ioanid

0 Kudos
Reply