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.

TMS320F280049C: Dead band not woking for my ePWM1a

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Hi,

I would like to have a RED and FED at my ePWM1a, but despite configuring it ine the deadband delay, I do not see any delay in the ePWM waveform.  Please what can be the problem.  

The configuration of my ePWM deadband is below

/**< dead band configuration */
/**< configure RED for delay of xxxms with the b comparator*/ //TODO verify
//EPWM_setDeadBandCounterClock (EPWM1_BASE, EPWM_DB_COUNTER_CLOCK_FULL_CYCLE);
EPWM_setDeadBandDelayMode (EPWM1_BASE, EPWM_DB_RED, true);
EPWM_setDeadBandDelayMode (EPWM1_BASE, EPWM_DB_FED, true);

EPWM_setRisingEdgeDeadBandDelayInput (EPWM1_BASE, EPWM_DB_INPUT_EPWMA);
EPWM_setFallingEdgeDeadBandDelayInput (EPWM1_BASE, EPWM_DB_INPUT_EPWMA);

EPWM_setDeadBandDelayPolarity (EPWM1_BASE, EPWM_DB_RED, EPWM_DB_POLARITY_ACTIVE_LOW);
EPWM_setDeadBandDelayPolarity (EPWM1_BASE, EPWM_DB_FED, EPWM_DB_POLARITY_ACTIVE_HIGH);

EPWM_setRisingEdgeDelayCount (EPWM1_BASE, 0x1ff);
EPWM_setFallingEdgeDelayCount(EPWM1_BASE, 0x5ff);

EPWM_setDeadBandControlShadowLoadMode (EPWM1_BASE, EPWM_DB_LOAD_ON_CNTR_ZERO);
EPWM_setRisingEdgeDelayCountShadowLoadMode (EPWM1_BASE, EPWM_RED_LOAD_ON_CNTR_ZERO);
EPWM_setFallingEdgeDelayCountShadowLoadMode (EPWM1_BASE, EPWM_FED_LOAD_ON_CNTR_ZERO);

I am enclosing a snapshot of the oscilscope reading

Thanks 

  • Hi Abayomi,

    Refer to this diagram in the dead-band section:

    Can you confirm the following:

    DBCTL[IN_MODE] is 0

    DBCTL[DEDB_MODE] is 1

    DBCTL[OUT_MODE] is 1

    DBCTL[OUTSWAP] is 1

    If all of these settings are correct the following will happen:

    EPWM1A will go into the rising edge delay module

    The output of the rising edge delay module will go into the falling edge delay module

    The output of the falling edge delay module will go go to OutA

    Thank you,

    Luke

  • Hi Luke,

    Thanks for the reply.

    I checked the registered and changed changed my code to get the expected values in the registers  it but the waveform became wrong and there was no deadband in the pwm.  

    A snapshot of my code/debuger view is enclosed and also a snapshot of the waveform is enclosed

    Snapshot showing register value and code session

    Oscilloscope channel 3 and 4 showing waveform

    Should i also post the entire code of the PWM.  I went through the manual id details and tried several way of configuring the epwm but i could still not generate the deadband.

    Thanks

  • Hi Abayomi,

    Can you test out epwm example 8 in C2000Ware? That demonstrates an example of dead-band with rising and falling edge delay. If that example works we can start to identify differences between the example code and your code.

    The example is located in [C2000WARE Installation]/driverlib/f28004x/examples/epwm/epwm_ex8_deadband

    Thank you,

    Luke

  • Hi Luke,

    Thanks for the reply.  I looked at the examples and they all worked fine.

    However, there was no example with a RED and FED delay in it. 

  • Abayomi,

    Your code seems to be correct from what I am seeing. What is your TBPRD? It's possible your rising edge and falling edge delay values are too big for your TBPRD.

    Could you also test adding an EALLOW statement before your dead-band configuration code?

    Thank you,

    Luke