Spi on PYNQ-Z2 Pmod

Hi @hsuharry12,
Welcome to pynq forum. You need a driver to initiate and transfer the data through axi quad spi and I am not sure if there is a prebuilt driver for this in pynq. Also, reading and writing on a spi device might be different according to required specification of the device.

I have attached the code I used for transferring data via quad spi quite a long ago (this is not written by me, it was collected from somewhere and I don’t exactly remember from where or from who, all credits go to the original writer), also it might not work as you are using v2022.1.

As far as I remember there was no problem with writing but when you are reading you have to omit two cycles of data. It might be the specific case to my EEPROM.

The main idea is you have to go through the AXI QUAD SPI datasheet and make a driver according to the datasheet in python to send the register’s value via axi-lite interface to control the IP.

Mizan
spi.py (1.5 KB)

1 Like