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.

f28377d EPWM占空比问题

Other Parts Discussed in Thread: C2000WARE

 f28377d确定好epwm的计数周期TBPRD之后,可以通过改变EPwm1Regs.CMPA.bit.CMPA = 0;    // Set compare A value这个寄存器的值来改变其占空比,我写了一个for循环来改变其占空比。epwm1的初始化配置完全按照例程来的可行。

然后配置好epwm1之后我在主函数的最后写了一个for循环:

想实现占空比的改变,但是测到epwma1占空比并没有发生变化,始终是1%,想问一下程序哪里出现了问题,这一这样写吗