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.

CCS/TMS320F28377S: 10kHz triangular signal generating

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

Hi,

i need to generate 10kHz triangular signal for comparing sine, so can i generate this in CLA or DMA for sharing loading between CPU and CLA or DMA?

when i read SGEN_MDL , the maksimum sampling loop is 20Khz (if i am not misunderstand), this sampling is really so small for 10Khz triangle for comparing with sine..

So what can i do for this?

  • Eren,

    If I understand you correctly, you want to generate a triangle wave (carrier wave) and modulate it with a sine wave to create a PWM waveform. If this is the case, you can use the ePWM module. To learn more about generating PWM waveforms with the device, please see the F2837xD workshop:

    processors.wiki.ti.com/.../C2000_Multi-Day_Workshop

    Please see module/lab exercise 7 for more details.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Hi,

    I believe you want to have a carrier that is 10KHz. Which means that the SGEN_MDL is invoked at 10Khz, that's at the carrier frequency not the actual generated sine wave frequency. Right?
  • Hi Ken,
    Thank you for your answer.
    No ,i do not want to use PWM output, you are right i will compare sine with triangular wave but this is not for output..so i need to compare but i will not use any output...
  • Hi Subra,
    Yes carrier signal will be 10kHz.the sine wave frequency is 50Hz. but the sampling frequency of carrier signal should be more than (about)200kHz for better comparing result...
  • Hi,

    What is the significance of carrier frequency in your case? I'm not sure I understand your exact requirement.
    Are you willing to generate a sine wave (may not be on the output, but internally as a reference)?
    With SGEN function you can only vary 2 parameters freq (50Hz in your case) and step_max which are in turn is calculated from sampling frequency. So, for your case you may want to create a table of your own and use it as reference.
  • Hi Subra,
    i will create many triangular carrier signal with different phases and will be compared with single sine reference signal. so i need to create many triangular carrier signal.. can i create them in DMA or CLA..
  • Hi,
    Yes - you could create tables using CLA or CPU, or you could even pre-generate the tables and store it in memory and move it using DMA if needed.
  • what about SGEN?

    if i use tables, it will not contunious time , right? and i have to create interrrupt for it.. i want to make , i should set my many triangular carrier signal in DMA or CLA without any interrupt(it will run continously inside of it without interrupt, as PWM timers) and when i measure or calsulate reference Sine value i will go to DMA or CLA and compare this value with many triagular signal at that time..so can do this with table?

  • Hi,

    From your explanation above it seemed like SGEN doesn't address your requirement. That's the reason I said,

    "With SGEN function you can only vary 2 parameters freq (50Hz in your case) and step_max which are in turn is calculated from sampling frequency. So, for your case you may want to create a table of your own and use it as reference."

    Even if you use tables or a different approach - you'll still have to create a certain time reference using interrupts or by other some other means.
    CLA or CPU can be used for comparison. Note that DMA can only move data and doesn't have any compute capability.
    You can start with implementation on CPU and later, once you are able to accomplish what you need, move to CLA as well.
     

  • Hi,
    Do you have any update? Were you able to resolve this, if so, please close the thread.