Hi all,
While working on a design that has EPWMA and B that are to be used independently, I'm encountering a problem with the way the action qualifier registers are working. I'm writing the EPWM CMPA, CMPB, and TBPRD registers immediately (no shadow mode) with updated data every ~500µs. If I have the CBU bit (Compare B, counting up) for AQCTLA and AQCTLB both set to 0 (Do Nothing), both PWM outputs will occasionally turn off when hitting CMPB, despite AQCTL saying to do nothing. I'm kind of at a loss at what would cause such behavior, as both AQCTLA registers have the same value being written to them once, on startup, which is 0 (Do Nothing).
My register initialization values are below, if helpful, though keep in mind that the CMPA, CMPB, and TBPRD registers are updated every 500µs.
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // Enable TBCLK within the ePWM
EPwm1Regs.TBPRD=65535;
EPwm1Regs.CMPCTL.bit.SHDWAMODE=1;
EPwm1Regs.CMPCTL.bit.SHDWBMODE=1;
EPwm1Regs.TBCTL.bit.CLKDIV=7;
EPwm1Regs.TBCTL.bit.HSPCLKDIV=0;
EPwm1Regs.TBCTL.bit.SWFSYNC=0;
EPwm1Regs.TBCTL.bit.SYNCOSEL=0;
EPwm1Regs.TBCTL.bit.PRDLD=1;
EPwm1Regs.TBCTL.bit.PHSEN=0;
EPwm1Regs.TBCTL.bit.CTRMODE=0;
EPwm1Regs.AQCTLA.bit.CBD=0;
EPwm1Regs.AQCTLA.bit.CBU=0;
EPwm1Regs.AQCTLA.bit.CAD=0;
EPwm1Regs.AQCTLA.bit.CAU=2;
EPwm1Regs.AQCTLA.bit.PRD=1;
EPwm1Regs.AQCTLA.bit.ZRO=0;
EPwm1Regs.AQCTLB.bit.CBD=0;
EPwm1Regs.AQCTLB.bit.CBU=0;
EPwm1Regs.AQCTLB.bit.CAD=0;
EPwm1Regs.AQCTLB.bit.CAU=2;
EPwm1Regs.AQCTLB.bit.PRD=1;
EPwm1Regs.AQCTLB.bit.ZRO=0;