cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vivienwwp
Explorer
Explorer
518 Views
Registered: ‎10-28-2018

AXI Quad SPI

Hi,

  I've added the AXI Quad SPI into my design but when I tried to debug in Xilinx SDK. I don't see the module. Is that normal?

Also, I've selected the SPI module to be a slave and it is polling to receive data (1 byte) from an external micro (master). However, my code gets stuck within XSpi_Transfer(). Could you let me know if my code will work?


Thank you very much

ConfigPtr = XSpi_LookupConfig(SPI_DEVICE_ID);
	if (ConfigPtr == NULL) {
		return XST_DEVICE_NOT_FOUND;
	}
	status = XSpi_CfgInitialize(&Spi, ConfigPtr, ConfigPtr->BaseAddress);
	if (status != XST_SUCCESS) {
		//return XST_FAILURE;
	}
	else if (status == XST_DEVICE_IS_STARTED)
	{
		// device is started then stopped it and re-initialize
		XSpi_Stop(&Spi);
		if (status != XST_SUCCESS) {
				return XST_FAILURE;
		}
		status = XSpi_CfgInitialize(&Spi, ConfigPtr, ConfigPtr->BaseAddress);
		if (status != XST_SUCCESS) {
			return XST_FAILURE;
		}
	}


		 // Start the SPI driver so that interrupts and the device are enabled

		XSpi_Start(&Spi);
		if (status != XST_SUCCESS) {
			return XST_FAILURE;
		}

		XSpi_IntrGlobalDisable(&Spi);

		WriteBuff[0] = 0x55;

		status = XSpi_Transfer(&Spi,WriteBuff,ReadBuff,1);
		if (status != XST_SUCCESS)
		{
			return XST_FAILURE;
		}

 

spi.PNG
0 Kudos
2 Replies
venui
Moderator
Moderator
461 Views
Registered: ‎04-09-2019

Hi,

I want to verify the Vivado configuration,Could you please share your desing along with the schematics.

Thanks & Regards,

Venu

0 Kudos
vivienwwp
Explorer
Explorer
444 Views
Registered: ‎10-28-2018

Hi Venu
I've got this resolved. I turned on Master mode on my block design in Vivado and should have unchecked it to make it a slave.