在使用28335作为移相全桥控制是,分别使用EPwm1和EPwm2作为A、B桥臂控制,其中Epwm2的移相功能使能,通过改变
EPwm2Regs.TBPHS.half.TBPHS
能起到移相的作用,但是当EPwm2Regs.TBPHS.half.TBPHS的值设置为1时,PWM2的脉冲变成全高输出,而对应值为0、2、3等其他值时都正常。
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.
EPwm2Regs.TBPRD = 468; // Set timer period
EPwm2Regs.TBPHS.half.TBPHS = 50; // Phase is
EPwm2Regs.TBCTR = 0x0000; // Clear counter
// Setup TBCLK
EPwm2Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
EPwm2Regs.TBCTL.bit.PHSEN = TB_ENABLE; // Enable phase loading
EPwm2Regs.TBCTL.bit.HSPCLKDIV = TB_DIV4; // Clock ratio to SYSCLKOUT
EPwm2Regs.TBCTL.bit.CLKDIV = TB_DIV4; // Slow just to observe on the scope
这样配置了还是不能移相怎么回事呢??