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.

TMS320F28379D: Tripping of PWM by PWM itself

Part Number: TMS320F28379D
Other Parts Discussed in Thread: SYSCONFIG

Dear expert,

We want to implement PWM trip based on ePWMxA and ePWMxB. Is it possible?

For example if both ePWMxA and ePWMxB goes high simultaneously (after trip zone module), this condition generates an event to trip module to force ePWMxA and ePWMxB to go low. Can ePWM signals be routed back to trip module?

Regards,

Jitendra

  • Hi Jitendra,

    If you are checking for when both ePWMxA and ePWMxB go high simultaneously after the trip zone module there are two solutions I can think of that. However you can not trip the PWM on itself while simultaneously checking if both signals are high.

    The first one would be using the Configurable logic block (CLB) you can route your ePWM output signals to here and you can create an output LUT (look up table) to check if both signals are high at the same time and override the pwm signal. However you can only use this functionality of EPWM1-4. I can go more into detail on this if you wan this solution.

    The second one being you can use eCAP to capture the signals and check for when a rising edge occurance to see if they are within a certain window and trigger an interrupt to software force the outputs of both to go low with a one shot event.

    The third solution I can think of is ensuring a dead band between ePWMxA and ePWMxB. This would be the easiest, since you will not have to worry about the outputs both being high. Unless you trip them both to go high.

    Best,

    Ryan Ma

  • Hi Ryan,

    We're using ePWM1-4. Our application is to drive two full bridge (8 PWMs). In this implementation many combination of PWMs is possible except 1A and 1B/2A and 2B/3A and 3B/4A and 4B going high simultaneously.

    So if any combination of xA and xB is high at the same time, PWMs should trip immediately.

    I'm confused what features from ePWM are required to be used to satisfy all the requirements and to avoid any unfavorable outputs. So want to implement fail safe mechanism in the hardware itself for fast response.

    Regards,

    Jitendra

  • Hi Jitendra,

    It sounds like implementing the ePWM dead band module would be your best bet to keep from both A/B outputs from both going high simulatenously.

    Have you already implemented this dead band submodule within ePWM?

    Best,

    Ryan Ma

  • Hi Ryan,

    We've been able to use dead band module. But I've some doubts/questions. For example, high time for ePWMxA is 10000 ns and for ePWMxB it is 10000 ns for all ePWMs. And ePWMxA is phase shifted with ePWMxB.

        - Can we achieve high time of 9955 ns on ePWM1A/ePWM2B and high time of 9945 ns on ePWM2A/ePWM1B with the help of dead band (slightly different dead times are required during switching)
        - What is the maximum value of dead band RED/FED possible? Can we use it to reduce high time significantly (up to 500 ns)
        - While moving from one value of phase shift to another value of phase shift (between ePWM1A and ePWM3A) it required that first we move only  1 edge (falling or rising) by the half of total required and then in subsequent events achieve the required phase shift on both the edges. Can we achieve it?
        - We also intend to use HRPWM submodule. Can you also suggest if all of this achievable in high resolution mode?

    Thanks

  • The max value of the RED/FED registers are 2^14

    You can use HRPWM submodule, there are a few must haves to incorporate HRPWM with dead band that is explained within the TRM and within our SysConfig Tool.

      For your waveform questions, could you provide a visual description of what you want to achieve? 

    Thank you,

    Ryan Ma

  • Hi,

    For example, there are two phase shifted PWMs ePWM1A/ePWM2B and ePWM3A/ePWM4B. Time period is 20 us of all the ePWMs. PS1 is the current phase shift of 1us and PS2 is the target phase shift of 2us.

    In the required output below, rising edge is delayed by 0.5 us, i.e., (PS2-PS1)/2, but falling edge is delayed by 1us only, i.e., PS2-PS1. From the next cycle both edges have phase shift of 2us.

    Jitendra

  • Hi Jitendra,

    You should be able to put a rising edge delay by 0.5 us through the dead band rising edge delay. 

    However note that when HR dead band RED/FED you cannot have both RED and FED together applied to both ePWMxA and ePWMxB.

    RED/FED together can be applied only to either OutA or OutB. 

    Best,

    Ryan Ma

  • Dear Ryan,

    We've one more issue. We are able to run the PWMs but don't know how to stop the PWMs in a predefined manner. If we stop by disabling clock to ePWM, output is not predictive.

    Other way is to use trip zone which forces the signal to a given level but we're not able to trip using software trigger.

    Can you please suggest the best way?

    Regards,

    Jitendra

  • Yes the trip zone module is the module to force the signal to a given level. 

    There are other ways to trip and not use a software trigger.

    You can use a GPIO to trip the outputs, CPU EMUSTOP, CLOCKFAIL, digital compare event etc. Depends on how you want to trip the outputs?

    BEst,

    Ryan Ma