Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F28035: sine of ramp output

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

Hi,

I have generated sine 230V using Ramp library as per below:

#define GRID_FREQ    50
#define INV_FREQ    12800.0

RAMPGEN_IQ rgen1;

RAMPGEN_IQ_init(&rgen1);
rgen1.Freq = _IQ24(GRID_FREQ);
rgen1.StepAngleMax = _IQ24(1.0/INV_FREQ);

    
    
RAMPGEN_IQ_MACRO(rgen1);
IntSineRampgen = _IQsinPU(rgen1.Out);
duty_inv_pu=_IQ24mpy(IntSineRampgen,InvModIndex);

duty_inv_pu= (duty_inv_pu>_IQ24(1.0))?_IQ24(1.0):duty_inv_pu;
duty_inv_pu= (duty_inv_pu<_IQ24(-1.0))?_IQ24(-1.0):duty_inv_pu;
duty_inv = _IQ24mpy((long)(INV_PWM_PERIOD),_IQ24abs(duty_inv_pu));

As I can not get pure sine wave (attached image for reference) and i am getting some distrotion near zero crossing on both edge.

Please guide us to understand this issue. What may be the possible reason for this.

Thanks.