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
Solved! Go to Solution.
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.c' and see if they are reached.
Let me know if this helps you.
Yours faithfully,
Bancila Sorin-Ioanid
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.c' and see if they are reached.
Let me know if this helps you.
Yours faithfully,
Bancila Sorin-Ioanid