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.

ePWM avoid using CMP = 0

Hi Sir,

I'm study the TI's interleave LLC so far, when setup the ePWM why need to avodi using CPM = 0 and CMP = PRD?

Regards

Johnny

  • please see F2837xD reference manual 14.6.5,it reads:
    Use up-down-count mode to generate a symmetric PWM:
    • If you load CMPA/CMPB on zero, then use CMPA/CMPB values greater
    than or equal to 1.
    • If you load CMPA/CMPB on period, then use CMPA/CMPB values less than
    or equal to TBPRD-1.
    This means there will always be a pulse of at least one TBCLK cycle in a
    PWM period which, when very short, tend to be ignored by the system.

    then the code configures as
    (*ePWM[n]).CMPCTL.bit.SHDWAMODE = CC_SHADOW;
    (*ePWM[n]).CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
    (*ePWM[n]).CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    (*ePWM[n]).CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
    it load CMPA and CMPB on zero,so (*ePWM[n]).CMPA.bit.CMPA = 1
    it does not make difference between (*ePWM[n]).CMPB.bit.CMPB = (period/2 - 1) and (period/2) because the 1 count time is very short and can be ignored