PYNQ-Z1 SPI clock speed

Hello,

I have created a custom SPI overlay and successfully established communication with the slave device. However, I am facing challenges in achieving my desired clock frequency of 100 MHz. I have attempted to modify the PL Fabric clock configuration, but it appears to have no impact on the number of data reads.

Could someone please provide guidance on how to calculate the current clock speed and how to make the necessary modifications to achieve a clock speed of 100 MHz?

Please find snip of my design and python wrapper.



image

Thanks,
Bhargava

Hi Bhargava,
Sorry, I was on my holiday. I can’t reply to the previous post as it is closed. The equation is as follows:
SPI frequency = ((ext_spi_clk fcy) / frequency ratio) x Multiplying factor
considering axi clk and ext_spi_clk are in the range stated in product guide of axi quad spi IP and ext_spi_clk should not be greater than axi clk.

Thanks,
Mizan

Hi Mizan,

Thank you for your response. I am able to achieve the required clock speed for my design.

Regards,
Bhargava

Additionally, I’m trying to accessing the AXI Quad SPI IP available in the base overlay. Could you please provide guidance on how to access this IP within a Python wrapper?

iop_arduino:


spi_subsystem:

Hello! I’m doing the same thing as you now, using the SPI IP on the PL side to build an SPI protocol to connect with my analog capture chip, and my block design is the same as yours with the Python code. But I am currently experiencing a problem, that is, after I use transfer, the pmodb port will not have any output, I use an oscilloscope to monitor it and find that it maintains a sine wave, do you have any good suggestions? I followed the SPI method in (SPI, I2C, UART on PYNQ: a PL approach - MakarenaLabs) inside github.

1 Like

Hi @mizan,

I have successfully established SPI communication using MicroBlaze on GPIO pins 13, 12, 11, and 10 as illustrated in the code below. However, when I attempt to connect the slave select pin (10) to a different pin with a number below 8 (any pin from 0 to 7), I observe that I receive a signal of 0 at the output and works only when I connect the slave select pin to GPIO pins 8, 9, or 10.

The reason for this change is my need to connect multiple slaves. I would appreciate any insights or advice you may have regarding this behavior.
image

Regards,
Bhargava