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.

Trouble generating a ramp signal of 50kHz using SGEN library

Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE

Hello,

I am using a TMS320F28335 delfino board. I wanted to generated a ramp signal of around 50kHz. I have used the SGEN library in control suite. However the sampling frequency in the library/examples is taken to be 20kHz. Is there any way i could change the sampling frequency in the example present?

Regards,

Kiran L

  • Hi Kiran,

    20KHz is just example. You can change to any sampling frequency depending on your application.
    Please refer to the SGEN module documentation in controlsuite\libs\dsp\sgen.
    You can change both the generated Sine wave frequency and sampling frequency using freq and step_max parameters.
    Document has all the details. 

    -Bharathi.

  • Hello,

    Thanks for the quick reply.

    The code snippet in the control suite document has a interrupt function which deals with the sampling frequency. However after importing the example code I could I could not find any function where I could edit the sampling frequency. Even in the step size the calculation considers 20kHz as the reference sampling frequency. It would be very helpful if you could tell me exactly what I should do in order to generate a 20Khz ramp using a higher sampling frequency like 500kHz.