Multiple External Interrupt handling in Microblaze

Hello. I am currently implementing a Microblaze system with 2 external interrupts. Let us call them bus_reset_INTR and opb_intc_0_Intr_pin . Now earlier I had written some code to include only opb_intc_0_Intr_pin and it worked perfectly fine. The code is given below:

XIntc_Initialize(&InterruptController, XPAR_OPB_INTC_0_DEVICE_ID); microblaze_enable_interrupts(); XIntc_Connect(&InterruptController, DEVICE_INTERRUPT_ID,(XInterruptHandler)PacketParser,(void *)0); XIntc_Start(&InterruptController, XIN_REAL_MODE); XIntc_Enable(&InterruptController, DEVICE_INTERRUPT_ID); XIntc_Initialize(&InterruptController, XPAR_OPB_INTC_0_DEVICE_ID);

void PacketParser() { //BLAH }

The MHS/MSS files were straight forward.

//MHS //BLAH PORT npa_INTR = INTR, VEC = [0:0], DIR = I, SIGIS = INTERRUPT, SENSITIVITY = EDGE_RISING BEGIN microblaze PARAMETER INSTANCE = microblaze_0 PARAMETER HW_VER = 4.00.a PARAMETER C_USE_FPU = 1 PARAMETER C_INTERRUPT_IS_EDGE = 1 PARAMETER C_USE_BARREL = 1 PARAMETER C_USE_DIV = 1 BUS_INTERFACE DLMB = dlmb BUS_INTERFACE ILMB = ilmb BUS_INTERFACE DOPB = mb_opb BUS_INTERFACE IOPB = mb_opb PORT CLK = sys_clk_s PORT INTERRUPT = microblaze_0_INTERRUPT END

BEGIN opb_intc PARAMETER INSTANCE = opb_intc_0 PARAMETER HW_VER = 1.00.c PARAMETER C_IRQ_IS_LEVEL = 0 PARAMETER C_BASEADDR = 0x41200000 PARAMETER C_HIGHADDR = 0x4120ffff BUS_INTERFACE SOPB = mb_opb PORT OPB_Clk = sys_clk_s PORT Intr = INTR PORT Irq = microblaze_0_INTERRUPT END

Now when I include bus_reset_INTR in my design, everything collapses. Both interrupts aren't detected by the processor. The C code for this new hardware is:

XIntc_RegisterHandler(XPAR_OPB_INTC_0_BASEADDR, XPAR_OPB_INTC_0_DCAM_SUPREMO_13_BUS_RESET_INTR_INTR, (XInterruptHandler)BusReset, (void *)0); XIntc_RegisterHandler(XPAR_OPB_INTC_0_BASEADDR, XPAR_OPB_INTC_0_DCAM_SUPREMO_13_OPB_INTC_0_INTR_PIN_INTR, (XInterruptHandler)PacketParser, (void *)0); XIntc_mMasterEnable(XPAR_OPB_INTC_0_BASEADDR); microblaze_enable_interrupts();

void PacketParser() { //BLAH } void BusReset() { //BLAH }

The modified MHS is: PORT opb_intc_0_Intr_pin = opb_intc_0_Intr, DIR = I, VEC = [0:0], SIGIS = INTERRUPT, SENSITIVITY = EDGE_RISING PORT bus_reset_INTR = bus_reset_L, DIR = I, SIGIS = INTERRUPT, SENSITIVITY = EDGE_RISING, VEC = [0:0] //BLAH BEGIN microblaze PARAMETER INSTANCE = microblaze_0 PARAMETER HW_VER = 4.00.a PARAMETER C_USE_FPU = 0 PARAMETER C_USE_DIV = 1 PARAMETER C_INTERRUPT_IS_EDGE = 1 BUS_INTERFACE DLMB = dlmb BUS_INTERFACE ILMB = ilmb BUS_INTERFACE DOPB = mb_opb BUS_INTERFACE IOPB = mb_opb PORT CLK = sys_clk_s PORT INTERRUPT = opb_intc_0_Irq END

BEGIN opb_intc PARAMETER INSTANCE = opb_intc_0 PARAMETER HW_VER = 1.00.c PARAMETER C_NUM_INTR_INPUTS = 2 PARAMETER C_IRQ_IS_LEVEL = 0 PARAMETER C_BASEADDR = 0x41200000 PARAMETER C_HIGHADDR = 0x4120ffff BUS_INTERFACE SOPB = mb_opb PORT Irq = opb_intc_0_Irq PORT Intr = opb_intc_0_Intr&bus_reset_L END

And my MSS file reads:

PARAMETER VERSION = 2.2.0 PARAMETER int_handler = PacketParser, int_port = opb_intc_0_Intr_pin PARAMETER int_handler = BusReset, int_port = bus_reset_INTR //BLAH

Now I am wondering where the problem could lie. If someone could help me make this work, then that would be great!!!

Thanks Viswanathan

Reply to
viswanathank
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.