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.

TM4C129ENCPDT: Good pins to use for interrupts?

Part Number: TM4C129ENCPDT

A quick question as I'm starting out with TM4C129, about GPIO pins and interrupt. The way I understand it is that all GPIO pins can be configured for interrupts but that most of them will combine an interrupt from a pin for the whole port, so it will require additional house keeping to find out which one was triggered. Possibly that also means another interrupt can be missed on the same port during this process. Each port interrupt will combine all 8 pins into one interrupt vector, or possibly all ports together into one vector.

However, all port P and port Q pins can have dedicated interrupts for each pin. Additionally each pin on port P and Q can have their very own interrupt vector.

Is this correct?

If I have 3 independent interrupts that have to be guaranteed to be picked up by the MCU, I'd be wise to use port P / Q for this right?

Many thanks!

  • I did see that ports A, B, C, D, E, F, G, H, J, K, L, M, and N each use one interrupt vector/handler for all 8 pins per port.
    Port P and Q have one interrupt vector/handler dedicated for each pin.
    Found it on table 2-9, page 122.
  • Hello Pascal,

    You understanding is correct. Each pin (in a GPIO port) is capable of generating interrupt, but these interrupts will trigger the same interrupt service routine (ISR) for each port. The exception in Ports P and Q, which can be configured (in software) to trigger different ISR for each pin.

    Based on the above information, which GPIO port to use for interrupts depends on how time sensitive you application is. In most cases, using a single ISR to capture interrupts for multiple pins in a port should be acceptable, as long as the software in the ISR can identify the source of the interrupt correctly. The microcontroller will always pick up interrupts.

    Thanks,
    Sai
  • Maybe use a timer capture pin rather than GPIO?

    Robert