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.

TMS320F28377D: F28377D Action Qualifier module T1/T2 from /TZn example code? Unclear about interrupt usage, interaction with other TZ functionality.

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Is there any example code for using the T1/T2 inputs to the Action Qualifier?  I have a lot of questions about how using /TZ1 as a T1 input to AQ works, whether or not you have to have OST or CBC selected - the data sheet and hardware reference manual show T1 and T2 coming into the action qualifier as if by magic, so the relationship of how they are derived from either the /TZn or DCnEVTs is somewhat mysterious to me right now.  I am using a TZFRC for a different purpose, but I really want built-in deadband and extremely fast response time to the event I'm putting on /TZ1 via the GPIO XBAR.  I've convinced myself that the T1/T2 is the best mechanism for this, since everything else I've tried so far (eCAP, XINT, AQSFRC) has met with inconsistent response time ranging from 2 to 8 usec even for a 150MHz processor and 75MHz TBCLK.  Any help is appreciated.  I would especially like to be able to discuss with an FAE via direct messaging, if possible.

  • Susan,

    I don't think there is a good example on how to use T1/T2, you should be able to start from any of the PWM examples in  C2000Ware.(C:\ti\c2000\C2000Ware_1_00_04_00\device_support\f2837xd\examples\cpu1) 

    1. What are you trying to do to the PWM with the T1 input?
      1. If its as simple as shutting down the PWM...Have you used all of the Trip-zones TZ1-3?
    2. T1 is simply a way for the Action Qualifier to quickly react to a verity of sources. The source of the event can be configured by modifying the AQTSRCSEL register.

    Hope it helps,
    Cody 

  • Hi Cody,

    I have tried several methods of getting a quick current limit trip on the ePWM (up-down count mode using CMPA to generate my PWM signal, active high complementary pairs on the ePWMA and ePWMB using the deadband module.  I have so far tried using TZ, ECAP, XINT via the GPIO input XBAR, and AQCSFRC (continuous software force).  While I can get each method to work, I have been experiencing a wide variety of latency, anywhere from a minimum of 2usec to a maximum of 10 usec.  I need to detect the current limit and flip the ePWM (upper turns off, lower turns on, with deadband required to prevent shoot-through current) within 5 usec and for a duration of at least 25usec, or half of my period. 

    I thought the best solution (lowest latency) that would still give me deadband would be either the AQCSFRC (still requires an ISR and some code, so it isn't the most efficient) or even better using /TZ1 as the source for T1 input to the AQ to produce what I would have done with the Trip Zone (force A low, force B high using either OST or CBC) but can't do because of the missing deadband.

    Everything I've read in the forum about T1 makes me think it won't work - there was a lengthy thread where someone else was kind of doing the same thing but using the digital comparator, not the TZ as the source for T1.  That other thread made me think maybe T1/T2 was intended more for comparators than trip events, and I don't understand how to get from my /TZ1 event to T1. 

    I see via the example code how to configure TZ as the source for T1 and how to configure the AQ action on T1 UP, T1 DOWN, but I don't understand what defines the T1 event - is it the raw /TZ1 or is it the resulting "event" from me setting up all the TZ1 register settings in the trip zone module, even though I don't want to take trip zone action on the event?  So if I configure /TZ1 to be falling or rising edge triggered, does that mean I get an event on T1 for falling and rising edges on the /TZ1?   I don't want the /TZ1 causing any action in the trip zone module or generating an interrupt, just helping me to alter the PWM signal (with deadband still in effect) for a specific period of time.

    Thanks,

    Susan

    • to produce what I would have done with the Trip Zone (force A low, force B high using either OST or CBC) but can't do because of the missing deadband.

    What about TZ action setup: A = HIGH, B = No action taken? High side swtich will be turned off, low side switch will keep running.

    Edward

  • Hi Edward,

    When the current limit occurs, A is high, B is low (active high complementary mode via the DB module settings). I want to switch as quickly as possible to A is low, B is high. This requires deadband delay, otherwise a bad condition is created. There isn't a "no action" case here - they both need to be forced to their opposite states.

  • To be clear, I understand that there are MANY ways within the device to accomplish this. I have implemented most of them (ecap, xint, tz, aqcsfrc) with varying degrees of success. Trip Zone doesn't work because of the deadband - they switch simultaneously which is not good. I was thinking that if the T1/T2 allows you to have the same reaction to a trip event but without needing an ISR and the associated overhead, that would be my best option to date. However, I cannot from the combination of the data sheet and HRM figure out what exactly defines the "event" when you connect /TZ1 as the source for T1. If I don't know what the event is (edge with polarity, level, CBC, OST, etc.) then I will be unable to get out of or clear the event when it is time for me to do so, other than by removing the /TZ1 as a source for T1, which seems like a really hack method, when a simpler one must exist, right?
  • That's why I suggest switching off only high side switch. Since TZ comes after DB unit, you can't have proper deadband after TZ when trip zone fires. I understand it may be not appropriate to all applications to switch off just high side switch, but deadband is guaranteed if you swtich off just high side switch. If that's not appropriate, then I would consider MOSFET drivers with build in DB.

    Edward
  • Since TZ comes after DB, I not only don't get the deadband that I need, but I also don't get the signal complement that I need, which is how we dissipate the current.

    So TI can't explain to me how to use the /TZ1 via the T1 input to the AQ in order to do what I want and still have deadband? The best suggestion, with all the many capabilities of this type 4 ePWM is that I should make my hardware guy put a different bridge driver IC on? I'm looking for an explanation of how the /TZn to T1/T2 functionality is implemented in the chip. The data sheet and HRM give me register settings but not much explanation of the event configuration. I'd like to understand what that capability is before I give up and tell the hardware guy that we can't do it and he has to find a different IC.