Hello everyone,
The above design is for Standard SPI in IP mode is set to Standard. We are able to see data,SCK & SS in ILA as showned in above image.
The above design is for Quad SPI in IP mode is set to Quad. We are not able to see data in ILA as showned in above image.
Vitis code
#include <stdio.h>
//#include "platform.h"
#include "xil_printf.h"
#include "xparameters.h" /* XPAR parameters */
#include "xspi.h"
#include "sleep.h"
//#include "ps7_init.h"
/************************** Constant Definitions *****************************/
/*
* The following constants map to the XPAR parameters created in the
* xparameters.h file. They are defined here such that a user can easily
* change all the needed parameters in one place.
*/
#define SPI_DEVICE_ID XPAR_AXI_QUAD_SPI_0_DEVICE_ID
/*
* This is the size of the buffer to be transmitted/received in this example.
*/
#define BUFFER_SIZE 17
//#define SPI_C_SPI_MODE 0
//#define DualSPI_C_SPI_MODE 1
//#define QSPI_C_SPI_MODE 2
/**************************** Type Definitions *******************************/
/*
* The following data type is used to send and receive data on the SPI
* interface.
*/
typedef u8 DataBuffer[BUFFER_SIZE];
/***************** Macros (Inline Functions) Definitions *********************/
/************************** Function Prototypes ******************************/
int SpiPolledExample(XSpi *SpiInstancePtr, u16 SpiDeviceId);
/************************** Variable Definitions *****************************/
/*
* The instances to support the device drivers are global such that the
* are initialized to zero each time the program runs.
*/
static XSpi SpiInstance; /* The instance of the SPI device */
/*
* The following variables are used to read and write to the Spi device, they
* are global to avoid having large buffers on the stack.
*/
u8 ReadBuffer[BUFFER_SIZE];
u8 WriteBuffer[BUFFER_SIZE];
int main(void)
{
// init_platform();
int Status;
/*
* Run the Spi Polled example.
*/
Status = SpiPolledExample(&SpiInstance, SPI_DEVICE_ID);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
//return XST_SUCCESS;
// cleanup_platform();
return 0;
}
In IP data sheet
1.C_SPI_MODE = 0 for Standard SPI
2. C_SPI_MODE = 1 for Dual SPI
3. C_SPI_MODE = 2 for Quad SPI
We have done settings as per data sheet but we are not getting any data in ILA for Quad mode pls suggest us is there any other settings for Quad mode.