UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
4,560 Views
Registered: ‎02-18-2013

AXI GPIO Interrupt doesn´t work

Hello,

 

I try a AXI GPIO Interrupt example from Xilinx today and it works pretty fine.

Now I write some code on my own and my programm doesn´t jump into the ISR...
I compare it with the example code, but I don´t find any mistake.

 

	#define GPIO_IN_INT_ID XPAR_FABRIC_GPIO_EINGANG_IP2INTC_IRPT_INTR

Config_Out = XGpio_LookupConfig(XPAR_GPIO_AUSGANG_DEVICE_ID); Status = XGpio_CfgInitialize(&GPIO_Out, Config_Out, Config_Out->BaseAddress); Config_In = XGpio_LookupConfig(XPAR_GPIO_EINGANG_DEVICE_ID); Status = XGpio_CfgInitialize(&GPIO_In, Config_In, Config_In->BaseAddress); Config_Int = XScuGic_LookupConfig(XPAR_PS7_SCUGIC_0_DEVICE_ID); Status = XScuGic_CfgInitialize(&Int, Config_Int, Config_Int->CpuBaseAddress); XGpio_InterruptEnable(&GPIO_In, XGPIO_IR_CH1_MASK); XGpio_InterruptGlobalEnable(&GPIO_In); Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_IRQ_INT, (Xil_ExceptionHandler)XScuGic_InterruptHandler, &Int); Xil_ExceptionEnable(); Status = XScuGic_Connect(&Int, GPIO_IN_INT_ID, (Xil_ExceptionHandler)GPIO_In_ISR, (void *)&GPIO_In); XGpio_InterruptEnable(&GPIO_In, 1); XGpio_InterruptGlobalEnable(&GPIO_In); XScuGic_Enable(&Int, GPIO_IN_INT_ID);

 And the ISR:

 

void GPIO_In_ISR(void *Instance)
{
	printf("Interrupt\r\n");
}

 

Thanks for help!

0 Kudos
1 Reply
Explorer
Explorer
4,539 Views
Registered: ‎02-18-2013

Re: AXI GPIO Interrupt doesn´t work

It works now. Don´t know why...

0 Kudos