设置如下,EPWM2跟EPWM1设置是一样的
EPwm1Regs.AQCTLA.bit.CAU = 2;
EPwm1Regs.AQCTLA.bit.ZRO = 0;
EPwm1Regs.AQCTLA.bit.PRD = 1;
EPwm1Regs.AQCTLB.bit.CBU = 1;
EPwm1Regs.AQCTLB.bit.PRD = 2;
EPwm1Regs.AQCTLB.bit.ZRO = 0;
其中EPwm1Regs.TBPRD = 15000;占空比赋值:
EPwm1Regs.CMPA.half.CMPA = 4000;
EPwm1Regs.CMPB = 15000;
EPwm2Regs.CMPA.half.CMPA = 4000;
EPwm2Regs.CMPB = 15000;
EPwm3Regs.CMPA.half.CMPA = 4000;
EPwm3Regs.CMPB = 15000;
EPWM1A跟EPWM1B输出一样,EPWM2两个不一样,EPWM3两个不一样
如果按照下面赋值:
EPwm1Regs.CMPA.half.CMPA = 15000;
EPwm1Regs.CMPB = 4000;
EPWM1A跟EPWM1B输出又变成不一样的了
为什么呢?难道是28335坏了吗
mangui zhang:
有输出 应该没有坏
相关配置请查看
http://www.deyisupport.com/question_answer/microcontrollers/c2000/f/56/t/17365.aspx