Example code to use the interrupt of the UART on PYNQ-Z1

Hi, dear PYNQ elites,

We’re using the UART on the PYNQ-Z1 for communication with other boards. However, we don’t know how to control the interrupt of the UART and GPI IP on PYNQ.

Would you please share your experience or provide any python examples code or documents you know in this regard?

Thank you very much.

The best example to check, is the buttons and switches in base overlay. Open the vivado project of the base overlay, you can see they have some interrupts connected to the PS. Then we have some example notebooks, along with base.py in pynq/overlays folder, where you can check how they work together.

Thank you.

On top of that, if we would like to use the UART-0 and UART-1 on the PYNQ-Z1, are there any available python example code user can refer ?