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.

TM4C129XNCZAD GPIO INterrupt

Hi All

my platform is TM4C129X, I just want to use the PD2 Interrupt, but I encounter a problem.

ROM_GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_2)

MAP_GPIOIntTypeSet(GPIO_PORTD_BASE, GPIO_PIN_2, GPIO_FALLING_EDGE);

ROM_GPIOIntClear(MRFI_GDO0_BASE, GPIO_INT_PIN_2);

MAP_GPIOIntDisable(GPIO_PORTD_BASE, GPIO_INT_PIN_2);

MAP_GPIOIntClear(GPIO_PORTD_BASE, GPIO_INT_PIN_2);

MAP_IntEnable(MRFI_GDO0_INT_VECTOR);

MAP_IntMasterEnable();

BSP_ENABLE_INTERRUPTS();

this is the part of Init.

then in the interrput service program:

 ROM_GPIOIntClear(GPIO_PORTD_BASE, GPIO_INT_PIN_2);

.......................................................................................................

............................................................................................................

GPIOIntEnable(GPIO_PORTD_BASE, GPIO_INT_PIN_2);

the program can get the first  falling edge then go into the interrupt service program,after have done this,the INT PD2 is enable again. but then the second flling edge is coming, the program cannot enter the Interrupt service program,

so I think my configuration with the Init program has some problems or in the Interrupt  I should do more things.......

  • Hi Wenrui,

    Inside the interrupt routine you should not need to re-enable the interrupt at all. It seems actually in your initialization that you forgot to do that (so how do you even get the first interrupt to work?). Are you sure that you ever get into your ISR? You have the Masked interrupt disabled.