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.

TMS320F28377S question on using a singular external interrupt on multiple pins

I was wondering if I could use xint to be triggered by not just one GPIO pin, but 4 GPIO pins.

  • Hi Benjamin,

    I was wondering if I could use xint to be triggered by not just one GPIO pin, but 4 GPIO pins.

    If I understand correctly, you want to trigger same interrupt by toggle on any one of four GPIO pins. Correct?

    In general, only one of GPIO pin can be mapped to a single interrupt line so there is no direct path for the same but on this device we have powerful X-BARs which can be used to OR multiple signals (including input GPIO pins). And this ORed output can be routed to another GPIO pin which can be used as XINT.

    Here are steps to do it -

    • Configure INPUT X-BAR to map 4 GPIO to four different INPUT select lines (refer INPUT X-BAR section of TRM) of INPUT X-BAR (INPUT1 to INPUT 6).
    • Configure OUTPUT X-BAR to select the 4 INPUT select line as one of the output for OUTPUT X-BAR (refer OUTPUR X-BAR section of TRM). Need to select the output pin which is not used.
    • Configure the INPUT X-BAR to map OUTPUT X-BAR output (GPIO pin) to INPUT13 (XINT4) or INPUT14 (XINT5) to generate the interrupt.

    Please note that you'll have some more delay in interrupt generation due to XBAR. Also since all the inputs are getting ORed, you need to use active low edge to trigger the interrupt (in XINTxCR configuration register).

    Hope this was helpful.

    Regards,

    Vivek Singh

  • Thank you for your reponse Vivek. You are correct in your understanding that I want to trigger the same interrupt by toggling any one of four GPIO pins.

    You say that since all the inputs are getting ORed that I would need to use an active low edge to trigger the interrupt. I would like to have the interrupt to be triggered by either edge, is there a workaround that would allow me to accomplish this while still using just one interrupt for four GPIO pins?

    You also mention that there will be more delay in the interrupt generation? Do you have an estimate of by how much? I would need <10ms latency to satisfy the requirements of my specific application.

    If either one of the requirements mentioned in the above two paragraphs cannot be met I think I will need to externally attach my 4 GPIO pins to a 5th GPIO pin that would generate the interrupt. Would that be a better overall plan do you think?
  • Hi Benjamin,

    You say that since all the inputs are getting ORed that I would need to use an active low edge to trigger the interrupt. I would like to have the interrupt to be triggered by either edge, is there a workaround that would allow me to accomplish this while still using just one interrupt for four GPIO pins?

    Sorry, I mixed it up.  Since all the inputs will be ORed, you'll not see another transition if any one of them is already high.  You should be able to generate interrupt on either edge on any of GPIO pin toggle as long as no other input is high that time.

    You also mention that there will be more delay in the interrupt generation? Do you have an estimate of by how much? I would need <10ms latency to satisfy the requirements of my specific application. 

    Delay I am talking about is few 100s ns (nano-second) so it should not be an issue for your use case.

    Regards,

    Vivek Singh