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.

Using Callbacks in TI-RTOS on a Tiva-C device

Hi all,

I'm running TI-RTOS on a Tiva-C device (TM4C1294XL). For interrupt handling, I'm using the GPIO_setCallback function (documentation link included below) to point an external interrupt to an ISR, and it works great. However, I've been having a hard time determining if it's necessary for me to have a check in the ISR to determine which specific pin the interrupt came from, or if that is handled internally. And if I do need a check, what is the best way for me to go about doing that?

Thanks!

Link: software-dl.ti.com/.../_g_p_i_o_8h.html

  • If you are using TI-RTOS 2.12 or newer, your ISR does not need to do anything to acknowledge the interrupt within the GPIO. That is handled internally by the driver prior to calling the user's callback.

    Alan
  • I'm using 2.14 so I should be fine there. However, maybe I misunderstand what you're saying, but I wasn't asking about clearing the interrupt within the ISR. I was more asking if I need to determine the source of the interrupt. For example, what if I have two pins interrupting on one port. Will callback differentiate between the two pins? Or do I need to do that myself?
  • Each entry in the GPIO_PinConfig array is associated with one pin of a port.
    Correspondingly, each entry in the GPIO_CallbackFxn array is associated with one pin of a port.
    A separate callback must be registered for each pin.
    Therefore, a registered callback will only be invoked for an interrupt on the one pin it is associated with.