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.

Deflino F28335 ePWM Module Dead-Band Generator Submodule



Dear Support Team

We are developing motor control software on a Delfino F28334 microcontroller.
In this context we are using the enhanced PWM (ePWM) module with the Dead-Band Generator submodule to control the opposed halfbridges.

Currently we have a control algorithm that writes new values into Rising Edge Delayed (RED) and Falling Edge Delayed (FED) registers while the ePWM module is running.
We are aware that the RED and FED registers are not shadowed.
So we probably risk to apply RED and FED in the ongoing PWM cycle which actually are intended for the next, or we even mix them.

This is not a huge problem, but we would like to know whether there are more potential problems.
For Example: Could the Dead-Band counter get confused, run into overflow, and miss to trigger an action? Or trigger the action far to late?

 

Thanks Josef

  • Josef,

    Most of the time this will be OK -> The Writes to RED/FED will be effective for edges immediately on or after the next TBCLK cycle, so PWM edges after this point will be fine. 

    By effective, I mean the RED/FED counters will start counting down as soon as an edge is detected on or after the next TBCLK cycle.

    You may run into a problem if the writes to RED/FED happen to be applied at the same time that the PWM edge occurs. In this case, because the DB counters start counting down immediately when the edge is detected, they miss the new RED/FED value which is applied in the next TBCLK cycle. So the new RED/FED values do not apply in this case until the next edge, and not the current edge.

    The dead-band counter does not really get "confused" or overflow. It simply counts down from whatever value you write into the counter and starts counting as soon as it detects an edge.

  • Hi Crissy 

    Thanks for your answer, I try to get that very precise...
    What I was/am worried about is that writing a new value to the RED or FED register may restart an ongoing downcounting sequence with the new value.
    In an extreme case this would result in a dead-band that is "twice" as large than required.

    If I get your answer right, this will not happen since:

    - In case of an PWM-edge the values in RED and FED registers a copied to a downcounter. 
    - The current counter value of an ongoing downcounting sequence is not affected by writing new RED or FED values.
    - The new values in RED and FED will not be copied to the downcounter until the next PWM-edge occurs.  

    Did I get that right?


    Thanks Josef

  • Josef,

    Yes, your understanding is correct.

  • Hi,

    I would like to clarify one more situation regarding the Rising/Falling Edge Delay Counters:

    - What is the reaction of the counter if a second EPWM edge is deteceted before the counter is back to zero?

    Does it restart counting or does it ignore the second event ?

    Thnak you very much for your attention.

    BR,

     

    Denise

  • Hi Denise,

    Here's the expected behavior of the dead-band sub-module on receiving edges before the delay counter has reached 0. Note that the input to the dead-band sub-module comes from the action qualifier sub-module.

    Case 1: A rising edge is followed by a rising edge before the RED counter reaches 0.

    The 2nd rising edge is ignored. At the output a rising edge will be seen after the programmed RED delay from the 1st rising edge.

    Case 2: Rising edge followed by a falling edge which is then followed by a 2nd rising edge.

    If the falling edge comes in before the RED counter reaches 0, the RED counter will get reset on the falling edge. At the output a rising edge will be seen after the programmed RED delay from the 2nd rising edge.

    I hope this helps.

    Hrishi