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.

TMS320F280049: TRIP6 for ePWM output control

Part Number: TMS320F280049

Hi Experts,

I would like to make a TRIP by using TRIP6 for ePWM1.
When the event TRIP6 occurs, the ePWM1 A/B output must be set to LOW.

I was not able to find out how to create TZx by TRIP6.
Do I have to treat TRIP6 by DC to change DCAEVT1/2 or DCBEVT1/2?

I would appreciate if a simple example code is kindly provided.

Thank you for teaching me.
Best regards,
Hitoshi

  • Hi Hitoshi,

    I recently posted thread with example how datasheet lead us to configure CMP's as SW forced DAC-A/B EPWM fault triggers. Some of the code was part of hal.c of the SDK labs. It uses Tz6 CBC as EMUSTOP from CPU. The CMP's xBAR Mux for EPWM Tz sub module is complex part and is in post too.

    Anyway the configuration didn't work original hal.c method. After my advanced Tz module features it still does not work to make EPWM stay low when forced, even from a while for loop to latch event. Please let me know if you find some odd bug in posted code or make it work somehow.

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/880195

          // x49x Technical Section 18.9 TZ6=EMUSTOP

            EPWM_enableTripZoneSignals(EPWM1_BASE,
                                       EPWM_TZ_SIGNAL_CBC6 );

  • FYI:

    • Trip-zone signals (TZ1 to TZ6).

    These input signals alert the ePWM module of fault conditions external to the ePWM module. Each submodule on a device can be configured to either use or ignore any of the trip-zone signals. The TZ1 to TZ3 trip-zone signals can be configured as asynchronous inputs through the GPIO peripheral using the Input X-BAR logic, refer to Figure 18-49. TZ4 is connected to an inverted EQEPx error signal (EQEPxERR), which can be generated from any one of the EQEP submodule (for those devices withan EQEP module). TZ5 is connected to the system clock fail logic, and TZ6 is connected to the EMUSTOP output from the CPU. This allows you to configure a trip action when the clock fails or the CPU halts.

  • Hi Experts,

    I am still confused.
    Trip-Zone Submodule takes care of input TZ1 to TZ6. 
    However, TZ4 is connected to EQEP, TZ5 is connected to System clock and TZ6 is connected to EMUSTOP.

    Therefore, there are TZ1, TZ2, and TZ3 available from GPIOs and DCAEVT1/2 and DCBEVT1/2 can be utilized for Trip-Zone Submodule.

    I am using TZ1 as TRIPIN1 to TZ3 as TRIPIN3 which are working OK.
    But I think TRIPIN6 needs to go DC and create DCAEVT1/2 or DCBEVT1/2 for TZ Submodule. 

    Am I making sense?

    In summary, as Nima told me that it is possible if I modify the TRIPIN4 example to TRIPIN6, it shoud work because it uses DC.
    Am I correct?

    In the Figure 9-1. Input X-BAR in the TRM (SPRUI33C), Trip6  is directly connected to ePWM.
    It seems that Trip6 is something special, but it seems it does not use ePWM X-BAR only.

    Hope you can understand what I would like to say.
    Thank you for your clarification.

    Best regards,
    Hitoshi

  • Hitoshi Sugawara said:
    But I think TRIPIN6 needs to go DC and create DCAEVT1/2 or DCBEVT1/2 for TZ Submodule. 

    DCA/DCB are dedicated events in the event trigger sub module Fig.18-44 page 1868

    Refer to 18-11 Fig.18-41 and Fig.18-44 far right bottom 2 pins on DC sub module.

    TZ6 is not the same as TRIP6, AKA TRIPIN6 via GPIO input xBAR. Fig. 9-1 page 990 

    So TRIPIN-1,2,3,6 are only ones allow to be GPIO xBAR input. 

  • Thank you so much I was able to resolve it.
    Best regards,
    Hitoshi