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.

TM4C1290NCPDT: Port G per-pin GPIO interrupts always firing port G0 interrupt.

Part Number: TM4C1290NCPDT


I'm trying to use GPIO port G pins 0, 1, and 2 to generate individual interrupts.  The interrupts for the 3 pins work, except that any interrupt on pins 1 or 2 also always generates an interrupt to the pin 0 ISR.  GPIOIntEnable() in the Periperal Driver Library has this note:

Note:
If this call is being used to enable summary interrupts on GPIO port P or Q (GPIOIntTypeSet()
with GPIO_DISCRETE_INT not enabled), then all individual interrupts for these ports must be
enabled in the GPIO module using GPIOIntEnable() and all but the interrupt for pin 0 must be
disabled in the NVIC using the IntDisable() function. The summary interrupts for the ports are
routed to the INT_GPIOP0 or INT_GPIOQ0 which must be enabled to handle the interrupt. If
this is not done then any individual GPIO pin interrupts that are left enabled also trigger the
individual interrupts.

My code is:

    GPIOIntTypeSet(GPIO_PORTQ_BASE,
                   PQ_Fan1Cnt_BIT |
                   PQ_Fan2Cnt_BIT |
                   PQ_Fan3Cnt_BIT |
                   GPIO_DISCRETE_INT,
                   GPIO_FALLING_EDGE);

    GPIOIntRegisterPin(GPIO_PORTQ_BASE, 0, Fan1_Interrupt);
    GPIOIntRegisterPin(GPIO_PORTQ_BASE, 1, Fan2_Interrupt);
    GPIOIntRegisterPin(GPIO_PORTQ_BASE, 2, Fan3_Interrupt);

    #define INT_GPIOG_TM4C129    47

    IntDisable(INT_GPIOG_TM4C129);                              // Disable the not-per-pin interrupt
                                                                // on GPIO_INT_PIN_0.
    GPIOIntEnable(GPIO_PORTQ_BASE, GPIO_INT_PIN_0 |
                                   GPIO_INT_PIN_1 |
                                   GPIO_INT_PIN_2 );

I hard coded the "#define INT_GPIOG_TM4C129 47" from  inc/hw_ints.h  as when I include it I get a raft of "incompatible redifinition of macro ..." from tm4c1290ncpdt.h"

Thanks, Doug