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.

TMS320F2800135: EPWM peripheral related issues

Part Number: TMS320F2800135


Tool/software:

Hello, experts from TI; I have a question about the EPWM module of the TMS320F2800135 chip. I need to use the EPWM4 peripheral to output PWM waves on the GPO6 and GPO7 pins; The relevant configurations of EPWM4 are as follows:


EPwm4Regs.TBPRD=3000;
EPwm4Regs.TBCTL.bit.CTRMODE = 0x02;


EPwm4Regs.CMPCTL.bit.LOADAMODE = 0x2;

EPwm4Regs.CMPCTL.bit.SHDWAMODE = 0x0;
EPwm4Regs.AQCTLA.bit.CAU = 0x01;
EPwm4Regs.AQCTLA.bit.CAD = 0x02;


EPwm4Regs.CMPCTL.bit.LOADBMODE =0x2;

EPwm4Regs.CMPCTL.bit.SHDWBMODE = 0x0;
EPwm4Regs.AQCTLB.bit.CBU = 0x02;
EPwm4Regs.AQCTLB.bit.CBD = 0x01;

in addition, I assign values to EPWM4 CMPA.bit.CMPA and CMPB.bit.CMPB in the zero crossing interrupt function of the EPWM4 ;


My question is: I see the following paragraph in the chip manual.  If I use it this way, assign EPWM4 CMPA.bit.CMPA and CMPB.bit.CMPB to 0 or 3000; Will it cause the EPWM4 module to lose control, resulting in abnormal waveforms output from the GPO6 and GPO7 pins, always at a high level? 

  • Terrell,

    The paragraph you are referring is for loading instance of CMPA/CMPB not the value of CMPA/CMPB.

    If you load these values on zero/period, since it takes one TBCLK to update then it will not update in current cycle and it will take effect in next cycle which is intended functionality in shadow mode. 

    Regards,

    Sumit