How to enable second UART on Pynq board (Zedboard or Pynq-Z1)

I have a functional Pynq image running on Zedboard. This is the image I found on the internet and is completely operational because my custom overlays are working like a charm. The problem is that the only one UART is used to display the boot messages during the boot process. There is also another UART (uart_0) which is on the PS side, but is disabled by default. Moreover, I have alse checked for the Pynq-Z1 board, it is the same case (uart_0 is disabled by default).
I would like to enable and use it for communication purposes with other platforms. The question is how this can be done?
Do I need only to rebuild the base overlay with this second UART enabled or the procedure is more complex? I already tried to generate the bitstream with the second UART enabled, without success.
Or to enable this second UART, the pynq image should be rebuilt?
Thank you in advance for your help.

This is not as trivial as it may seem to be.

The 2nd PS UART can only be connected into the PL, as there aren’t any physical connectors available on either of those boards to connect it to, so yes, you would need to modify the PL design.

As it is a PS UART, you would need to modify the Linux device tree. Then you would need to write C/Python to control this UART.

What are you trying to do? If you need to control a “UART” peripheral, the Arduino IOP subsystem (MicroBlaze based system) in the base overlay for the PYNQ-Z1 has a UART already connected. You could write some C code for the MicroBlaze to control a UART peripheral.
You could also add a new MicroBlaze to control the UART, and again write some C code to manage the UART interface.

This would probably be the way I would approach this. Depending on what you need to do/your experience and prior knowledge, you may prefer to do this a different way.

Cathal

hello,is it okey to use python directly to contral the uart in ardunio?
I also want to try C coxde,But don’t know how to do it and the time seems too short.:slight_smile: