cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I am using STM32f401 DISCO board and trying to generate sine modulated PWM through MATLAB. I am getting sine modulated PWM but the issue is of frequency.

VSira
Associate II
 
4 REPLIES 4
Ozone
Lead

Then you are doing it wrong.

The more detailed you describe your problem, the better chances are to get useful answers.

VSira
Associate II

0690X00000ARZnEQAX.png0690X00000ARZmQQAX.png

VSira
Associate II

Please refer 1st simulation picture.I need sine modulated pwm for 10ms and zero output for remaining 10ms. But it is giving me pwm for 100ms and off time is 100ms. when I am changing the sampling time of sine source to 1ms then it is providing desired pwm.

Cyril FENARD
ST Employee

​Hi @VSira​ ,

Could you also take a look at setting the solver step size in the configuration of your Simulink model.

Regards.

Cyril