11-15-2018 05:22 AM
I am using XilQspiPsu v1.7 library (Xilinx SDK), to read the device ID of two QSPI flashes of different sizes (512Mb & 1 Gb).
Both the QSPI flash have independent chip select lines, clock and data lines.
Below you will find the information as to what I tried, but I am not able to get the ID of the second device (i.e. 1 Gb)
#define XQSPIPSU_CONNECTION_MODE_SINGLE 0U
#define XQSPIPSU_CONNECTION_MODE_STACKED 1U
#define XQSPIPSU_CONNECTION_MODE_PARALLEL 2U
#define XQSPIPSU_SELECT_FLASH_CS_LOWER 0x1U
#define XQSPIPSU_SELECT_FLASH_CS_UPPER 0x2U
#define XQSPIPSU_SELECT_FLASH_CS_BOTH 0x3U
#define XQSPIPSU_SELECT_FLASH_BUS_LOWER 0x1U
#define XQSPIPSU_SELECT_FLASH_BUS_UPPER 0x2U
#define XQSPIPSU_SELECT_FLASH_BUS_BOTH 0x3U
spiConfig.DeviceId = XPAR_PSU_QSPI_0_DEVICE_ID;
spiConfig.BaseAddress = XPAR_PSU_QSPI_0_BASEADDR;
spiConfig.InputClockHz = XPAR_PSU_QSPI_0_QSPI_CLK_FREQ_HZ;
spiConfig.ConnectionMode = XQSPIPSU_CONNECTION_MODE_PARALLEL;
spiConfig.BusWidth = 4; //XPAR_PSU_QSPI_0_QSPI_BUS_WIDTH;
spiConfig.IsCacheCoherent = XPAR_PSU_QSPI_0_IS_CACHE_COHERENT;
XQspiPsu_CfgInitialize(&spiInstance, &spiConfig, spiConfig.BaseAddress);
XQspiPsu_PolledTransfer(&spiInstance, FlashMsg, 2);
ConnectionMode SelectFlash parameters Result
Single cs_lower, flash_bus _lower returns ID1 (512Mb)
Single cs_upper, flash_bus _upper none
Parallel cs_lower, flash_bus _lower returns ID1 (512Mb)
Parallel cs_upper, flash_bus _upper none
Could you please describe how do I get ID2(1Gb) ?
Should I change any configurations?
11-15-2018 11:35 AM
For dual parallel operation, both QSPI devices must be identical - same manufacturer, same capacity.
11-15-2018 11:59 PM
In case of two different QSPI flashes, then Single mode , cs_upper/lower and flash_bus_upper/lower can be used? Please correct me if I am wrong
11-16-2018 05:38 AM
for Dual Stacked, both QSPI device must be from the same manufacturer, but different sizes should work. Note, the electrical connection is different. Refer to Figures 24-5, 24-6 and 24-7 in UG1085
11-20-2018 08:24 AM
Adding on what Glen said. It "should" work with different sizes but be aware that the SW might assume they have the same size and determine the size by reading the JEDEC id of the "lower" flash.
You might need to change the SW to be able to reach the entire upper flash.
I am not 100% sure about it but it's something to keep in mind if you go down this path.
NOTE: I suggest the lower flash to be the one with smaller size.