# PYNQ VDMA fails

**URL:** <https://discuss.pynq.io/t/pynq-vdma-fails/1586>\
**Category:** Support\
**Created:** [July 28, 2020, 10:35am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586 "2020-07-28T10:35:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [July 28, 2020, 10:35am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/1 "2020-07-28T10:35:59Z")

</div>

I’m building a VDMA pipeline as shown on the image below on PYNQ 2.5. It fails.

Any idea what is wrong with the VDMA driver?

Failure occurs when  
cam\_vdma = ol.axi\_vdma\_0

is loaded even though the overlay is loaded successfully.

 ![5](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/1/1e906d2e692fd3a79ece37a57561a62dcde419d8.png)

The error on the notebook is related to uoi:  
ValueError " Could not find UOI device for interrupt pin for IRQ number 0

but the driver shows under ls/dev/uio0- uio3.

 ![3](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/5/5e45046a2b68c07d47f85329023c6c92202275f6.png)

The configuration for the VDMA is shown below:

 ![a](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/7/7b5ef55c8dd0ba41540916b7562cde0e7950636b.png)  
 ![b](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/a/afd579cb974a23aff2e458f5d46019c819fc863f.png)

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [July 29, 2020, 10:06pm UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/2 "2020-07-29T22:06:21Z")

</div>

Looks like an interrupt parsing problem - can you try add a concat block between the AXI intc and the PS block?

---

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [July 31, 2020, 1:15am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/3 "2020-07-31T01:15:52Z")

</div>

I did try and I’m getting the same message.  
This is just a TPG to VDMA on an ZYNQ UL+ , so I’m wondering why it does not work.  
Can the driver work without the interrupt?

---

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [August 4, 2020, 1:01am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/4 "2020-08-04T01:01:46Z")

</div>

I did some further troubleshooting. On Ultra96 the design initializes correctly the VDMA. On another board I ported PYNQ (Ultrazed) the VDMA fails with exactly the same pipeline. TPG-\>pixelPack-VDMA.

When querying with overlay? the output is pretty much identical.

Is there any specific setting on the PYNQ kernel that configures the interrupts? U96 has 5 instances under /dev : uio0-4 whereas Ultrazed has uio0-uio3.

Error occurs at this line immediately after overlay successfully loads:  
cam\_vdma = overlay.axi\_vdma\_0

Why would the TPG pipeline work under one UZ+ and fail on the other board?

[TPGdesign.tcl](https://discuss.pynq.io/uploads/short-url/cIjb1l7WwvMhur7dpLxlGRRW6on.tcl) (56.8 KB)

The only hint I see right now is the warning from the Vivado design:

WARNING: [BD 41-1731] Type mismatch between connected pins: /axi\_intc\_0/irq(undef) and /zynq\_ultra\_ps\_e\_0/pl\_ps\_irq0(intr)

The same warning occurs on U96 though.

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [August 17, 2020, 4:48pm UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/5 "2020-08-17T16:48:49Z")

</div>

For the design that works, does it use petalinux or PYNQ?

You mentioned “ls /dev/uio0- uio3”. Did you see any uio name with `fabric`? You can check that by `cat /sys/class/uio/uio0/name` and things like that.

The warning message you mentioned is irrelevant so you can safely ignore.

---

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [August 19, 2020, 1:14am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/6 "2020-08-19T01:14:37Z")

</div>

Ultra96 uses the common stock PYNQ image v2.5.

Ultrazed uses the PYNQ image from Ultra96 , I replaced the kernel with a custom Petalinux kernel. Xlnk works fine. This is the only case where it fails.  
Now, I tried to add the UIO functionality by copying following under system-user.dtsi.

```
   /include/ "system-conf.dtsi"
/ {

chosen {
		bootargs = "root=/dev/mmcblk1p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id=\"generic-uio\" clk_ignore_unused";
		pynq_board = "Unknown";
	};
amba {
		fabric@A0000000 {
			compatible = "generic-uio";
			reg = <0x0 0xA0000000 0x0 0x10000>;
			interrupt-parent = <&gic>;
			interrupts = <0x0 0x59 0x4>;
		};
	};};

```

under /dev there are 4 uio entries (uio0-uio3).  
Issuing cat /sys/class/uio/uio3/name for uio0-3 gives axi-pmon for all 4.  
There is no fabric.  
Issuing cat /proc/interrupts  
gives

 ![1](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/b/b89432dd9aea75b5ae3a0a8ef8a821492ebf1126.png)

So I’m stuck at the moment as I don’t understand why the uio does not work on this device.

I have attached the .dtsi file below.[system-userdtsi.txt](https://discuss.pynq.io/uploads/short-url/y31kpyuQlPWPGwho9UqcP4ePZYL.txt) (2.7 KB)

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [August 19, 2020, 1:52am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/7 "2020-08-19T01:52:18Z")

</div>

Connect your AXI intc to M\_AXI\_HPM\_LPD port of PS. And make sure the address assigned to AXI interrupt controller is 0xA0000000 in the address editor of Vivado IPI.

---

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [August 20, 2020, 12:05am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/8 "2020-08-20T00:05:32Z")

</div>

That won’t work. It’s outside the address range.

 ![1](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/4/422a4665178427a09d76f2c5f5f70dbbbeeb1840.png)  
I revised the design and made sure that the AXI INTC was assigned the correct address but it still gives the same message.

I also changed PYNQ dma.py to remove the intc connections to mm2s and s2mm , set to 0. That also did not work.

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [August 20, 2020, 12:31am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/9 "2020-08-20T00:31:44Z")

</div>

If you want to try debug this, you can disable the interrupt and try first. To do that, you can remove the lines coming out from dma IP block and disable the interrupt in dma IP block. Then try to see if that still hangs the system.

---

<div class="post-metadata">

**Author:** ![dimiter](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dimiter](https://discuss.pynq.io/u/dimiter)\
**Post date:** [October 1, 2020, 12:24am UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/10 "2020-10-01T00:24:18Z")

</div>

I worked around this by removing all interrupt references on the DMA.py file. It works with the TPG.

---

<div class="post-metadata">

**Author:** ![D\_BL](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@D\_BL](https://discuss.pynq.io/u/D_BL)\
**Post date:** [June 5, 2021, 3:05pm UTC](https://discuss.pynq.io/t/pynq-vdma-fails/1586/11 "2021-06-05T15:05:59Z")

</div>

Hi, @dimiter, I’m stuck in using it with TPG now.  
please can you tell me how to edit DMA.py (in Video folder) to **completely** remove all interrupt references?  
I only tried setting ‘interrupts’ parameter to ‘None’ by default as what another DMA.py does (in Lib folder), but it didnt work.  
Thank you!
