TI中文支持网
TI专业的中文技术问题搜集分享网站

F28377S_EPWM移相问题

在进行F28377S的PWM配置中,发现一个很奇怪的问题

我现在EPWM1用来做高频调制,开关频率配置为70KHz,然后将EPWM2和EPWM3配置为20KHz的频率去执行另外的任务,目前是想将EPWM2和EPWM3配置为相互错相180°,但是打开了EPWM3的移相使能后,EPWM3的开关频率就与EPWM1相同了,变成了70KHz。请问各位这个问题是否有解决方案,谢谢!

其中EPWM3的配置如下

EALLOW;
// EPWM Module 7 config
EPwm3Regs.TBPRD = BUCK_PWM_TIMER_TBPRD; // Period TBCLK counts
EPwm3Regs.CMPA.bit.CMPA = 0;//PWM_Control_Period_Count*0.25;
EPwm3Regs.TBPHS.bit.TBPHS = BUCK_PWM_TIMER_TBPRD >> 1; // Set Phase register to zero
EPwm3Regs.TBCTR = 0;
EPwm3Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Symmetrical mode
EPwm3Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm3Regs.TBCTL.bit.PHSDIR = TB_UP; // 0x1
EPwm3Regs.TBCTL.bit.PRDLD = TB_SHADOW;
EPwm3Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO;
EPwm3Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; //TBCLK=SYSCLKOUT
EPwm3Regs.TBCTL.bit.CLKDIV = TB_DIV1;

EPwm3Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO_PRD;
EPwm3Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO_PRD;

EPwm3Regs.AQCTLA.bit.CAU = AQ_CLEAR; // set actions for EPWM1A
EPwm3Regs.AQCTLA.bit.CAD = AQ_SET;
EDIS;

赞(0)
未经允许不得转载:TI中文支持网 » F28377S_EPWM移相问题
分享到: 更多 (0)