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.

TMS570LC4357: ETPWM Trip Zone input identification

Part Number: TMS570LC4357

Hi,

I have grouped TZ1, TZ2 and TZ3 as trip zone group and will trigger interrupt when the event identified.

How can I distinguish which specific signal (TZ1 or TZ2 or TZ3) responsible for interrupt trigger?

I want tag fault for each respective input trigger independently.

Chandra

  • The TZ1/2/3 input signals alert the ePWM module of fault conditions external to the ePWM module. Each ePWM module can be configured to either use or ignore any of the trip-zone signals.

    After the TZ is enabled for the ePWM (for example TZ1 for ePWM2), the VIM channel 93 (ePWM2 TZ interrupt) should be enabled. 

  • Hi Wang,

    The configuration is working fine, and the input trigger is entering the ISR.

    My question is, once we have encountered by ISR, is there a way we can distinguish which TZx input is responsible for the interruption.

    For example, I have 3 inputs for TZ1, TZ2 and TZ3 as over voltage, over current and emergency stop. All of them result in stopping PWM module to stop.

    As this is a group, I have only one ISR. But I want to know which input cause the trip, so that I can raise the respective fault.

    Hope my question is clear now.

    Chandra

     

  • Dear Wang, 

    Waiting for your reply. 

    Chandra

  • Hi,

    Can any one please look in to my issue?

    Also, I have observed that, if the input signal on the Trip zone pin is active continuously, the ISR being called on every execution cycle even though it is configured for one shot.

    This is impacting the execution of my other tasks.

    How can I handle this?

    Chandra

  • Hello Chandra,

    There are no interrupts directly associated with a specific TZ event. The solution to your question is to configure ePWM2 to use TZ2 and ePWM3 to use TZ3 too.

    1. ePWM to use TZ1, TZ2 TZ3. The interrupt EPWM1_TZINT would be generated if any of TZ1/2/3 event occurs.

    2. ePWM2 to use TZ2, but no action to ePWM2 when TZ2 event occurs.

          etpwmREG2->TZCTL.TZA = NO Action

          etpwmREG2->TZCTL.TZB = NO Action

    3. ePWM3 to use TZ3, but no action to ePWM3 when TZ3 event occurs.

          etpwmREG3->TZCTL.TZA = NO Action

          etpwmREG3->TZCTL.TZB = NO Action

    So when both etpwmREG1->TZFLG.OST and etpwmREG2->TZFLG.OST are set, the event is from TZ2

          when both etpwmREG1->TZFLG.OST and etpwmREG3->TZFLG.OST are set, the event is from TZ3

          when only etpwmREG1->TZFLG.OST is set, the event is from TZ1