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: 
Highlighted
Newbie thomaslenzi
Newbie
3,685 Views
Registered: ‎04-18-2012

Can't get interrupts to work on MicroBlaze IP Core

Hello,

I am using the microblaze ipcore (not with xps) and I can't find documentation about how to get the interrupts to work. This is what I came up with but it is not working

 

 


 

    u32 id = XPAR_IOMODULE_0_DEVICE_ID;
    XIOModule iomodule;

    XIOModule_Initialize(&iomodule, XPAR_IOMODULE_0_DEVICE_ID);

    XIOModule_Connect(&iomodule,
            XPAR_IOMODULE_0_SYSTEM_INTC_INTERRUPT_2_INTR,
            (XInterruptHandler) ISR,
            (void*) 0);

    XIOModule_Enable(&iomodule, XPAR_IOMODULE_0_SYSTEM_INTC_INTERRUPT_2_INTR);

    Xil_ExceptionInit();

    Xil_ExceptionRegisterHandler(XPAR_IOMODULE_0_DEVICE_ID,
            (Xil_ExceptionHandler) XIOModule_DeviceInterruptHandler,
            &id);

    Xil_ExceptionEnable();

    XIOModule_RegisterHandler(XPAR_IOMODULE_0_IO_BASEADDR,
            XPAR_SYSTEM_INTC_INTERRUPT_2_MASK,
            (XIOModule_Timer_Handler) ISR,
            (void*) 0);

    XIOModule_Start(&iomodule);


I am able to read and write on the GPIO and the UART of the module so it is started, but the interrupts won't fire.

 

Thanks a lot.

 

0 Kudos
3 Replies
3,601 Views
Registered: ‎08-09-2012

Re: Can't get interrupts to work on MicroBlaze IP Core

Hi,

Have you find a solution?

I'm very interested in!!

0 Kudos
Newbie fhm
Newbie
3,564 Views
Registered: ‎08-23-2012

Re: Can't get interrupts to work on MicroBlaze IP Core

Hi

There are 2 ways to work with mb interrupts, using API or compiler language specific

Read

.http://chess.eecs.berkeley.edu/eecs149/documentation/th_ublaze_interrupts.pdf

or

Xilinx Embedded System Tools Reference Manual "Interrupt Management"

 

I have added som demo code

Hope it helps

/Frank

 

 

 

 

0 Kudos
Explorer
Explorer
2,984 Views
Registered: ‎02-17-2013

Re: Can't get interrupts to work on Arm zedboard custom peripheral

Hey 

I search example of application in c language which use interrupt with a custom peripheral. AI am interessed by the processor Arm of Zynq. 

0 Kudos