This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to modify duty cycle and frequency of PWM?



I am using a f28027 controlSTICK to generate a PWM signal with duty cycle and frequency variable. In the same time the LED on the board needs to blink. For this things I created an model which be attached here. First I try it works, but now the LED is always red and the PWM doesn't appear on the oscilloscope. Where is the problem? someone can help me?

PS: the model is created in Simulink, but here I don't have the right to attached that kind of files. So if someone wants to help me and needs more detailed please ask me.

  • Hi Daniela,

    This forum is dedicated more for pure CCS based coding. can you help her to reach appropriate MATLAB forum.
    Also, do check Brian's thread: e2e.ti.com/.../484814

    Regards,
    Gautam
  • Hi Daniela.

    I'm not sure why it was working and then stopped. One hint when something "strange" like this happens", is to exit MATLAB, go into your MATLAB working directory and manually delete the slprj folder and the build folder (which is usually model_name_ert_rtw). Start up MATLAB and try building your model.  deleting these directories forces Embedded Coder to commence a full rebuild from scratch.

    Image: Blue box is model name, red boxes are slprj and build directories you would delete to force a full rebuild.

    -Brian