Using a custom versus the base overlay and opening a UART device

Hello,

I have connected my Pmod BT2 device into PmodB of the Pynq-Z2 board.
I’m able to get it working in SDK/Vitis by creating a block diagram from an empty design on Vivado and using the Pmod IP provided by Digilent. I accomplished this by simply using the Z2 board file, adding the ZYNQ PS, and directly connecting the Pmod IP’s output to the PmodB connector.

I had a couple of questions.

1st, with my custom block design that does not make use of the PYNQ base overlay, will I still be able to import and use the pynq.lib.pmod libraries? (I want to use PmodOLED in my design too, but not use the Digilent IP block for it). If not, should I modify the base overlay to include the PmodBT2 IP block and connect the pins with reference to Z2’s xdc file?

2nd, how can I access the BT2 device through Jupyter Notebook? In my attempts to interface BT2 using UART via the MicroBlaze library with my current block design, I get an “unable to parse” error. is it wrong to assume that the UART class will work with the PmodB interface? A potential solution I was thinking about was to use the base overlay and connect the PmodBT2’s pins to the Rpi/Arduino(Z1) header, but I’m not really sure…

Thanks
Malachi

1 Like
  1. No, the pynq.lib.pmod libraries are for PYNQ IOPs - this is a particular implementation of a MicroBlaze subsystem. You would need to add this hardware subsystem to your design to use the PmodOLED.

  2. We have a relatively new repository with Peripheral examples here: https://github.com/Xilinx/PYNQ_peripherals/
    See the contributing section for instructions on how to create a new driver. This may be a good way for you to use the base overlay for your application and add your BT software as a new PYNQ driver.

If you just need a MicroBlaze to talk to the Pmod bluetooth, you could recompile your SDK project for the PYNQ IOP. You would need to add additional functions to control the IOP switch and you may need to modify your code to adhere to the PYNQ IOP conventions (E.g. where the MicroBlaze memory is and if you want to use the mailbox convention to control and interact with the MicroBlaze.)
https://pynq.readthedocs.io/en/v2.6.1/overlay_design_methodology/pynq_microblaze_subsystem.html

The PYNQ Peripherals link above should simplfy this process.

Please post back if you have questions.


Just to address another part of your question, I’m not sure what the issue is. If you want to post more details on your code and what you are doing I can try look into it further but I would suggest trying the approach above.

In my attempts to interface BT2 using UART via the MicroBlaze library with my current block design, I get an “unable to parse” error. is it wrong to assume that the UART class will work with the PmodB interface?

Cathal

1 Like