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.

Not able to produce PWM

The foliowing program not able to produce PWM wave

//long pulse_variable1=0; pulse_variable2=0; pulse_variable3=0;
long EPWM6_TIMER_TBPRD=5000;


time_counter++;
if(time_counter>=200)
{time_counter=0;
}

angle_A=_IQ16(2*PI*pulse_counter/200);
// angle_B=_IQ16(2*PI*pulse_counter/200+_IQ16(2*PI/3));
// angle_C=_IQ16(2*PI*pulse_counter/200+_IQ16(4*PI/3));

phase_A=_IQ16mpy(_IQ16sin(angle_A),_IQ16(.8));
pulse_variable1 = _IQ16int(_IQ16mpy(phase_A,_IQ16(EPWM6_TIMER_TBPRD/2))) + EPWM6_TIMER_TBPRD/2 ;//3.016712
// temp_variable1 = _IQ16int(_IQ16mpy(sin_out,_IQ16(EPWM6_TIMER_TBPRD/2.353))) + EPWM6_TIMER_TBPRD/2 ;//3.016712
EPwm6Regs.CMPA.half.CMPA = pulse_variable1;