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.

EK-TM4C1294XL: GPIO Interrupt handler not called.

Part Number: EK-TM4C1294XL

Tool/software:

Hi, 

I have the below code. The expectation is that when I press the User Switch2, it should print out the message "IntHandlerPortJ User Switch 2..". However, the interrupt handler is never called. I even put a breakpoint on the default interrupt handler and even that is not called. Not sure what is wrong.

-------

void IntHandlerPortJ(void)
{
GPIOIntClear(GPIO_PORTJ_BASE, GPIO_INT_PIN_1);
Debugprintf("IntHandlerPortJ User Switch 2..");
}

void PortJ_Init(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOJ);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOJ));

GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE, GPIO_PIN_1);
GPIOPadConfigSet(GPIO_PORTJ_BASE, GPIO_PIN_1, GPIO_STRENGTH_10MA, GPIO_PIN_TYPE_STD_WPU);
GPIOIntTypeSet(GPIO_PORTJ_BASE, GPIO_PIN_1, GPIO_FALLING_EDGE | GPIO_DISCRETE_INT);
GPIOIntRegisterPin(GPIO_PORTJ_BASE, GPIO_PIN_1, IntHandlerPortJ);
GPIOIntEnable(GPIO_PORTJ_BASE, GPIO_INT_PIN_1);
}

int main(void)
{
InitSystemClock();
PortJ_Init();

while (1);

return 0;
}