cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
721 Views
Registered: ‎11-15-2018

Two QSPI flashes, Xilinx Ultrascale+

Hello,

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


XQspiPsu_Config spiConfig;


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_SelectFlash(&spiInstance, XQSPIPSU_SELECT_FLASH_CS_LOWER,XQSPIPSU_SELECT_FLASH_BUS_LOWER);


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?

 

 

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
693 Views
Registered: ‎03-19-2014

For dual parallel operation, both QSPI devices must be identical - same manufacturer, same capacity.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Visitor
Visitor
674 Views
Registered: ‎11-15-2018

Hello Glena,

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

0 Kudos
Moderator
Moderator
666 Views
Registered: ‎03-19-2014

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

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
637 Views
Registered: ‎10-11-2011

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.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos