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.

TMS320F28335 函数AngleCalFun生成的角度值通过graph看很不规律,可能是什么问题?

您好。

我在用官方例程进行svpwm控制输出时,发现angleout值生成异常,没法生成SVPWM;

具体代码:

void AngleCalFun(ANGLEGEN *p)
{
/* Compute the angle rate */
p->Angle += p->StepAngleMax*p->Freq;

/* Saturate the angle rate within (-2*PI,2*PI)*/
if (p->Angle>2*PI)
{
p->Angle -=2*PI;

}
else if (p->Angle<-2*PI)
{
p->Angle +=2*PI;

else
{
;
}
p->AngleOut=p->Angle;
}

但是生成的结果如下:

理论上波形应该是

麻烦专家帮分析下,可能是我哪里设置出了问题,还是芯片出现故障了?

x 出现错误。请重试或与管理员联系。