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: Raising one interrupt with multiple GPIOs

Part Number: TMS320F28379D

Hello everyone,

I have one question about interrupt : I am using an F28379D for drive a AC-DC converter and I have to monitoring IGBT drivers fault (16 drivers, 16 gpio).

Is it possible to raise only one intrerupt from multiple GPIO (instead of make a polling/external OR between 16 gpio) ?

Thank you very much,

Regards,

Jérémy

  • Hi Jeremy,

    We do not have this capability directly.

    - How quickly do you need to detect the fault?

    - Are you currently using both of the CLAs in your application? If not, you could dedicate one of the CLAs to monitor the GPIOs and have it send an interrupt to the C28x (or just handle the failure).

    - I can't get all 16 in, but if you have the Input X-Bar resources available, you could route up to 6 of them to the EPWM DC Submodule through the X-Bars. The DC submodule has a combinational OR input that you could feed all of them into. If any are different states (active high vs active low) you could invert them in the EPWM X-Bar. This could be configured to generate a single interrupt for those 6.

    - I have one other thought that is an admittedly odd but may be a great solution involving the DMA. I'm making sure it's possible and will get back to you.

    Regards,
    Kris
  • Jeremy,

    The DMA doesn't have access to the register I wanted so that won't work. I have a co-worker who will be posting a solution we discussed shortly. I'll go through the idea just in case it triggers an idea from someone else or may help someone with a similar scenario down the road.

    I wanted to use a CPU timer to repetitively trigger the DMA to copy the GPxDAT register into the ADCSOCFRC register. This would have triggered a ADC SOC for any bits that were set to a '1' (if the fault condition was active low, it could have been inverted via the GPxINV register). The issue with this is the DMA doesn't have access to the ADC configuration registers. If you had less than 16 GPIOs (8 for example), we could have used a different FRC register in a different peripheral such as the Output X-BAR or the EPWM (TZFRC), but this was the only one with a full 16 bits.

    Regards,
    Kris
  • Hi Jeremy,

    To add to Kris's suggestion of using the input Xbars, if you send a group of 6 input Xbar signal to the output Xbar or the ePWM Xbar here:

    Then this will let you OR these 6 together when you configure the output Xbar or the ePWM Xbar (the structure of both are the same):

    However, you have more options in the Xbar to select that could work.  The easiest would be to use the CMPSS modules as simple digital comparators.  To do this, set the reference DAC to mid-scale and then drive your GPIO into the CMPSS pin (these are shared with ADC pins, so you would need some spare analog pins).  This will get you to about 14 inputs to a single interrupt:

    This combines 14 inputs into one external interrupt using the following lines:

    So you still have 1 more XINT line that you can use (INPUT14).  You can probably map this to the same ISR as the other 14 inputs, so this gets you to 15 total inputs. 

  • To add on to Devin's solution- you could also use up to 6 eCAPs which have interrupts on edge detection (INPUT7-INPUT12 in Devin's figure). If you use the map these ISRs to the same address, it will be one interrupt.

    To know which pin triggered the interrupt through the Output X-Bar, you can reference the flags in XBAR_REGS. If the external failure signal stays set, you can of course just read the GPIO data registers also.

    The thing to be aware of in either scenario is if you're mapping multiple interrupts to the same position in the vector table- if you clear the first interrupt on exit it you may lose any pending interrupts for that vector position (I'd need to confirm this on a device, but I'm pretty sure it's the case) since you're clearing the flags in the vector table. You can work around it but just be aware of it. In Devin's solution, all of the signals going through the Output X-Bar will use a true single interrupt, but the others would be a dual mapped interrupt.
  • Hello,

    Thank you very much for your answers but I am afraid that will be not possible for my application. In fact I have to drive one PFC and two H bridge and I think lots of ressources/periphericals will be used.

    The goal is to shut down all pwm if one of the IGBT drivers is in fault. I am afraid that your solution will be too peripherical/pin greedy for my application.

    IGBT drivers have internal protection but I will try to combine with an OR solution.

    Thank you again and have a nice day,

    Best regards,
    Jérémy
  • Jeremy,

    I agree this is probably the best solution for the application. You may already be planning to do it, but since your original post was XINT I just wanted to mention a clarification. The best method for shutting down the EPWMs on a fault will be to take it into the Trip-Zone or Digital Compare submodules on the EPWM via the X-Bars. This allows the hardware to trip the PWMs much faster than doing it through a software interrupt. You can still receive the interrupt to handle the fault, but the hardware will be placed into your chosen condition before you receive it.

    Regards,
    Kris
  • Thank you for help again Kris,
    Have a nice day,

    Best regards,
    Jérémy