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 PWM更新异常:compare更新前的最后一个周期持续时间不对



Hello,

在使用28035进行PWM配置的时候发现一个问题:

配置: PWM频率为50kHz(即单个周期为20us)

操作:定期将占空比从20%变更到80%,然后在变更为20%。

现象:变更前的最后一个周期,时间被削减为14us

波形如下图:

PWM配置源码使用的是参考手册(TMS320x2802x, 2803x Piccolo Enhanced Pulse gWidth Modulator (ePWM) Module)的代码,已经配置EPWM为shadow模式,zero为0的时候更新。

做过如下尝试:

不通过CMPA而是通过CMPAM寄存器更新比较值,问题依旧;

设定PWM counter值为zero时产生中断,在中断中更新比较值,问题依旧。

所以现在不知道是什么原因导致,恳请指导。