# ValueError: Could not find UIO device for interrupt pin for IRQ number 0

**URL:** <https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790>\
**Category:** Support\
**Created:** [December 20, 2019, 4:12pm UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790 "2019-12-20T16:12:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsi](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bsi](https://discuss.pynq.io/u/bsi)\
**Post date:** [December 20, 2019, 4:12pm UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790/1 "2019-12-20T16:12:28Z")

</div>

Hi,

I have a custom board.  
In my overlay I have IP blocks that have interrupts. I am connecting them through AXI interrupt controller to Zynq pl\_ps\_irq[0]. I am using Zynq MPSoC FPGA.  
As soon as i access a block such as CSI2 IP which has a interrupt, I am getting following message

ValueError: Could not find UIO device for interrupt pin for IRQ number 0

Any hint on what might be wrong.

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [December 20, 2019, 4:19pm UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790/2 "2019-12-20T16:19:16Z")

</div>

When the PYNQ sdbuild flow generates the boot files it adds a UIO device to the devicetree that is bound to pl\_ps\_irq[0] - it’s one of the [fragments](https://github.com/Xilinx/PYNQ/blob/master/sdbuild/boot/meta-pynq/recipes-bsp/device-tree/files/pynq_uio_zynqmp.dtsi) we add. for some reason it looks like that in the case of your board that hasn’t happened. This is likely due to one of the following reasons

- The UIO device isn’t in the device tree
- There’s an existing device in your device tree for the board that binds to that interrupt first
- The UIO device drivers aren’t compiled into the kernel

How did you create the SD card image for your board?

Peter

---

<div class="post-metadata">

**Author:** ![bsi](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bsi](https://discuss.pynq.io/u/bsi)\
**Post date:** [December 31, 2019, 4:09pm UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790/3 "2019-12-31T16:09:11Z")

</div>

Hi Peter,  
Thank you so much for your reply and useful pointers.  
I was experimenting last week and i have some success.

I have a [Trenz 820 board](https://wiki.trenz-electronic.de/display/PD/TE0820+Test+Board#TE0820TestBoard-Download)  
I was able to build pynq image with this board and it seems to not crash when i access IPs which have interrupts in my PL logic. I can see fabric interrupt mapped when i  
do cat /proc/interrupts

Few questions from my side.

1. For one of the VDMAs i am using only S2MM channel. I am not using mm2s\_introut  
I get following error  
AttributeError : 'AXIVDMA object has not attribute ‘mm2s\_introut’

Is it a requirement in pynq that i need to use both channels for it to be working

1. How can i change default IP address of the board when i build Pynq image  
The default hostname is **pynq** and the default static IP address is **192.168.2.99**

---

<div class="post-metadata">

**Author:** ![bsi](https://avatars.discourse-cdn.com/v4/letter/b/f08c70/32.png) [@bsi](https://discuss.pynq.io/u/bsi)\
**Post date:** [January 2, 2020, 1:48am UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790/4 "2020-01-02T01:48:49Z")

</div>

Hi Peter,

I have now configured the VDMA to use both s2mm and mm2s channels and the error is gone. Please let me know if there is any example code for using VDMA with interrupts

Best Regards

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [January 2, 2020, 12:03pm UTC](https://discuss.pynq.io/t/valueerror-could-not-find-uio-device-for-interrupt-pin-for-irq-number-0/790/5 "2020-01-02T12:03:37Z")

</div>

The `readframe` and `writeframe` functions of the VDMA will use interrupts under the hood to avoid polling. If you want to interleave the reading and writing with other code then the way we support is to use the `asyncio` library along with the `readframe_async` and `writeframe_async` coroutines. The closest we have to an example for this I think is cell three in one of my [ZCU104 video notebooks](https://github.com/PeterOgden/ZCU104_VideoDemo/blob/master/notebooks/Mixer.ipynb) which is a bit cluttered and only uses the HDMI input functions.

To change the hostname and IP I would create a new sdbuild package which modifies `/etc/hostname` and `/etc/network/interfaces.d/eth0`. We don’t have a hook for configuring this as part of the normal flow.

Peter
