Open Source > Open source hardware

ZynqBerry SPI

<< < (2/3) > >>

Andrei Errapart:
Have you tried the "-p" option to specify some data to be sent to the SPI device? It is only when you write something to the SPI bus you get to read something back.

As to how to read a specific register, this is specific to the device you have on the SPI bus. SPI bus itself doesn't specify any commands like "read registers" or "start DMA". Read the datasheet of your SPI slave device; the description of the register read and write commands is usually there.

sergio:
Hello Andrei. Thanks for the reply!!

I'm finally able to retrieve data from my SPI slave device.

However I'm not done with SPI. Now I need 4 slaves connected to SPI0 master controller. I did some research and I know I'll need a 3-to-8 decoder (which I have already developed and tested). I also noticed that is-decoded-cs  must be set to 1 in the system-top.dts file.
 
Is there anything else that needs to be configured to use a decoder and connect more than 3 slaves to Zynq PS' SPI master controller?
 
Best regards!

Andrei Errapart:
Unfortunately, I have to admit my lack of knowledge in that particular area, CS decoding.

sergio:
Hello Andrei! Thanks for the replies!

Everything is working fine. I added the decoder without problem, it's straighforwad.

Best regards!

Deepak:
Hello,
I am also facing similar problem. I have enabled spi vivado hw design, petalinux kernel config and device tree.
https://forum.trenz-electronic.de/index.php/topic,1460.new.html#new
Now, /dev/spidev1.0 is available but I do not know how to test my spi.
Could you please let me know how can I test my spi communication.

Thanks

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version