cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
689 Views
Registered: ‎12-20-2017

Zynqmp 2018.1: Not getting interrupts in petalinux

Jump to solution

I'm using 2018.1 (vivado) and 2018.2 (petalinux).  (I know this slight mismatch is not optimal)

I have a firmware design that is sending three interrupts through an xlconcat into the zynq pl_ps_irq[2:0]. Two interrupts are AXI DMA, and a third is from a custom block.  I use the DMA and I'd also like to get interrupts through this custom block for a separate functionality.  This custom block has addressible registers to enable and ack interrupts.

I've heard that xlconcat might not be optimal for routing interrupts through.  Will this work?

Capture.PNG

DMA works just fine, but I'm having trouble receiving interrupts in my linux driver, though I can see the interrupt blocks status bits being set when I look (separately) at the addressible registers of the interrupt block.

I have a linux driver (based on the petalinux-create -t module template) that assigns an interrupt service routine (ISR) to the device, and after the probe() routine, I can see a new line in /proc/interrupts.

I can generate the appropriate traffic that SHOULD give an interrupt, but my ISR never gets called.  Nor does the count in /proc/interrupts increment.  In firmware, I have an ILA on the signal going into the xlconcat, and I see the input go high (it's a very short blip)

Here is the entry in my device tree:

 

                TR_intr@a0002000 {
                        compatible = "xlnx,TR-intr-1.0";
                        interrupt-names = "irq";
                        interrupt-parent = <0x4>;
                        interrupts = <0x0 0x5b 0x4>;
                        reg = <0x0 0xa0002000 0x0 0x1000>;
                        xlnx,intr-active-state = <0xffffffff>;
                        xlnx,intr-sensitivity = <0x0>;
                        xlnx,irq-active-state = <0x1>;
                        xlnx,irq-sensitivity = <0x0>;
                        xlnx,num-of-intr = <0x1>;
                        xlnx,s-axi-intr-addr-width = <0x5>;
                        xlnx,s-axi-intr-data-width = <0x20>;
                };

Here is the line in the driver that registers for interrupts:

 

	r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
	rc = request_irq(irq->start, &tx_irq, 0 /*IRQF_SHARED*/ , DEVICE_NAME, lp);

 

Here is the /proc/interrupts output showing the dma controller's interrupt count incrementing due to the activity I'm generating (I did three transactions), but the tx device that should be generating interrupts is not incrementing.

 33:          0          0          0          0     GICv2 123 Level     tx
 34:          3          0          0          0     GICv2 121 Level     xilinx-dma-controller

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
638 Views
Registered: ‎12-20-2017

Re: Zynqmp 2018.1: Not getting interrupts in petalinux

Jump to solution

I was able to fix this by specifying that it was a rising edge-type interrupt (the default is level).

	rc = request_irq(lp->irq, &tx_irq, IRQF_TRIGGER_RISING, DEVICE_NAME, lp);

View solution in original post

0 Kudos
2 Replies
Highlighted
Explorer
Explorer
639 Views
Registered: ‎12-20-2017

Re: Zynqmp 2018.1: Not getting interrupts in petalinux

Jump to solution

I was able to fix this by specifying that it was a rising edge-type interrupt (the default is level).

	rc = request_irq(lp->irq, &tx_irq, IRQF_TRIGGER_RISING, DEVICE_NAME, lp);

View solution in original post

0 Kudos
Highlighted
Voyager
Voyager
628 Views
Registered: ‎05-25-2016

Re: Zynqmp 2018.1: Not getting interrupts in petalinux

Jump to solution

Thanks for sharing this information!

0 Kudos