cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
4,593 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
Highlighted
Explorer
Explorer
4,572 Views
Registered: ‎02-18-2013

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

0 Kudos