cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
2,326 Views
Registered: ‎03-21-2018

How to write a code in SDK to use the interupts in the interupt enabled custom AXI peripheral IP

Jump to solution

I have created a custom AXI peripheral with interrupt enabled. When the task of the custom IP is completed, I need to inform it to the microblaze using interrupt. I am having trouble in writing the software in SDK to accept the interrupt. Please help me how this can be done. 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
2,239 Views
Registered: ‎09-12-2007
You can still use the same code as reference. You need to connect your handler, and enable interrupt using the mask for your custom interrupt.

See TmrCtrSetupIntrSystem in the example below:
https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/tmrctr/examples/xtmrctr_intr_example.c

To debug, you can monitor the registers in the axi interrupt controller
https://www.xilinx.com/support/documentation/ip_documentation/axi_intc/v4_1/pg099-axi-intc.pdf#page15

View solution in original post

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
2,295 Views
Registered: ‎09-12-2007
You can use the example driver code for the axi timer as reference

This assumes you have an interrupt controller though.

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/tmrctr/examples
Highlighted
2,251 Views
Registered: ‎03-21-2018

Hi thanks for the reply.

 

The timer interrupt code and other peripherals have the interrupt capability built in. So when they they are connected to the interrupt system it works. But still i didnt get how to make an instance of the custom axi peripheral with interrupt enabled to be passed into the interrupt controller. Simply how the interrupt registers should configured and how to setup the interrupts.

0 Kudos
Highlighted
Moderator
Moderator
2,240 Views
Registered: ‎09-12-2007
You can still use the same code as reference. You need to connect your handler, and enable interrupt using the mask for your custom interrupt.

See TmrCtrSetupIntrSystem in the example below:
https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/tmrctr/examples/xtmrctr_intr_example.c

To debug, you can monitor the registers in the axi interrupt controller
https://www.xilinx.com/support/documentation/ip_documentation/axi_intc/v4_1/pg099-axi-intc.pdf#page15

View solution in original post

0 Kudos