cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,933 Views
Registered: ‎08-29-2016

Zynq basic interrupt help needed

I am trying to create an interrupt handler using Zynq.  I am using a Digilent Zybo board and am using the Linux kernel from the following link: https://github.com/Xilinx/linux-xlnx.git.  I have searched the internet and this board and I think I have everything set up properly but my handler never gets called in my driver.  Here is my block design:

 

block_design.png

 

... and my interrupts set up in vivado:

 

GIC.png

 

My dts file (attached here) contains the following:

 

ps7_gpio_0: ps7-gpio@e000a000 {
	#gpio-cells = <2>;
	clocks = <&clkc 42>;
	compatible = "xlnx,zynq-gpio-1.0";
	emio-gpio-width = <64>;
	gpio-controller ;
	gpio-mask-high = <0xc0000>;
	gpio-mask-low = <0xfe81>;
	interrupt-parent = <&ps7_scugic_0>;
	interrupts = <0 59 4>;
	reg = <0xe000a000 0x1000>;
} ;

I am trying to hook interrupt 91 on the PS that is triggered from PL using AXI GPIO.  I have subtracted 32 from 91 hence the <0 59 4> in the dts file.   My interrupt_v1_0 IP simply creates a 10ns pulse every second.  I expect to see my interrupt function being called in the driver every second once I load my bitstream and driver but this does not happen.  Can someone please check and tell me what I am doing wrong?  I have attached my driver, dts and code for my interrupt IP here.

 

Thanks.

 

0 Kudos
4 Replies
Highlighted
Teacher
Teacher
3,916 Views
Registered: ‎03-31-2012

Re: Zynq basic interrupt help needed

I am not sure why you expect ps7_gpio at 0xe000a000 to create an interrupt. You have an axi-gpio which should be at a different address. Did you run address assignment in your block diagram? You should use the address assigned to your AXI GPIO block to add the interrupts line. That should also go into your pl.dtsi file not the main PS dts.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Highlighted
Visitor
Visitor
3,906 Views
Registered: ‎08-29-2016

Re: Zynq basic interrupt help needed

My AXI GPIO Offset address is 0x41200000.  Can I just replace 0xe000a000 with 0x41200000 in my dts file and rebuild the dtb?  I'm not sure what a dtsi file is and I don't seem to have one in my vivado project.  Is there anything else that may also be wrong with my setup?

0 Kudos
Highlighted
Teacher
Teacher
3,884 Views
Registered: ‎03-31-2012

Re: Zynq basic interrupt help needed

you can do "export hardware" from your project and generate a device tree from the hdf file. This will give you the system dts and pl dtsi (dts include) files which describe your hardware.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Highlighted
Participant
Participant
531 Views
Registered: ‎10-29-2018

Re: Zynq basic interrupt help needed

Can you please point to any documentation to refer to to know more about this?

Thanks!

0 Kudos