i'm trying to use interrupt with my cunstom IP.
My architecture is :
- PP440 master on PLB0, PPC400 slave on PLB1
- Central DMA master on PLB1, Central DMAslave on PLB0
- Custom IP slave on PLB1
- TEMAC, Uart, Timer, Xint slave on PLB0
- I also use the lwip library
I follow this tutorial (http://www.fpgadeveloper.com/2008/10/timer-with-interrupts.html
) to create a custom IP with interruption, just in my case the Custom IP VHDL code is a bit different since i don't need a timer.
After in XPS in order to setup the interuption i wrote this code (the code in the bellow tutorial seems to be for microblaze):
in my main before the while(1):
// Initialize Interrupts on PowerPC
// Register the interrupt handler of the XPS Interrupt Controller with the PowerPC's external interrupt.
xil_printf(" - Enabling XPS interrupts\r\n");
r, (void *)XPAR_XPS_INTC_0_DEVICE_I
// Register the Switch Debouncer interrupt handler in the vector table of the XPS Interrupt Controller
xil_printf(" - Registering interrupt handler\r\n");
er, (void *)XPAR_CUSTOM_READ_FIFO_0_
// Start the XPS Interrupt Controller
xil_printf(" - Enabling interrupts\r\n");
// Enable Switch Debouncer interrupt requests in the XPS Interrupt Controller
// Enable custom fifo read interrupts
xil_printf(" - Enabling CUSTOM_READ_FIFO interrupts\r\n");
// Enable PowerPC non-critical (external) interrupts
then the callback interrupt on another file :
ler(void * baseaddr_p)
xil_printf(" - CUSTOM_READ_FIFO_Intr_Hand
ler received \r\n");
The first problem is when i run this code (compile without error) i no more able to connect to the FPGA by LAN. i meen the callback function tcp_accept seems to not work anymore.
Can some could help me and give advice ? does the interrupt setup is wrong ??