We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Observer creative1
Registered: ‎04-05-2018

PS SPI Slave configuration issue on zynq7000


I am trying to use PS PSI as a SLAVE, but due to some reason my code gets stuck at XSpiPs_PolledTransfer() API. It does not execute next line. But when i configured the same SPI as MASTER then it works properly, but doesnot work when i set it as a SLAVE.

The Options set for SPI SLAVE are as follows:



Also i have one confusion, the API XSpiPs_PolledTransfer()  says it receive one byte for each byte of data transmission in MASTER Mode. Is the same true for SLAVE mode too? Then the MASTER and SLAVE both would be writing to the MOSI line at the same time. So is this right? How does SPI controller solve this conflict

Thank you.


0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
Registered: ‎10-30-2017

Re: PS SPI Slave configuration issue on zynq7000

Hi @creative1 ,

The code that you are reffering is only applicable when SPI is in master mode. if SPI is configured in slave mode then it will hang if you use the same code. so the behavior is expected. Please use the below code when PS SPI is configured as Slave:



Best Regards,
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.


0 Kudos