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.

TM4C129X gpio Interrupt on Port Q

Hi .

I  wang  to  capture an gpio interrupt on PORT Q (PQ5) when  PQ5 detected both-eages . I know each pin of port Q can trigger an interrupt  and each pin have an individual interrupt vector .

the  problem is that  it can't get into Interrupt  ISR  ,I'am  very  confused .The code is as follows :

void GPIOInt_Init(void)
{
	SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOQ);

	GPIOPinTypeGPIOInput(GPIO_PORTQ_BASE,GPIO_PIN_5);

	GPIOIntTypeSet(GPIO_PORTQ_BASE,GPIO_PIN_5, GPIO_BOTH_EDGES | GPIO_DISCRETE_INT);
	GPIOIntRegister(GPIO_PORTQ_BASE, &ZeroCrossingISR);
	GPIOIntClear(GPIO_PORTQ_BASE,GPIO_PIN_5);
	GPIOIntEnable(GPIO_PORTQ_BASE,GPIO_PIN_5);
	IntDisable(INT_GPIOQ0);
	IntEnable(INT_GPIOQ5);
}


void ZeroCrossingISR(void)
{
	uint8_t IntStatus;

	IntStatus = GPIOIntStatus(GPIO_PORTQ_BASE,true);
	GPIOIntClear(GPIO_PORTQ_BASE,GPIO_PIN_5);
	if(IntStatus & GPIO_PIN_5)
	{
		if((HWREG(GPIO_PORTQ_BASE + (GPIO_O_DATA + (GPIO_PIN_5 << 2)))&GPIO_PIN_5))
		{
		
		}
		else
		{

		}
	}
}