cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
marcel.schneider
Observer
Observer
2,262 Views
Registered: ‎07-17-2018

Spansion s25fl512s QSPI Flash Programming error

Jump to solution

Hi,

 

On a custom board with a virtex ultrascale xcu095 we are using two s25fl512s QSPI flashes in x8 mode.

When trying to program, the vivado labtools give an error during programming:

 

program_hw_cfgmem -hw_cfgmem [ get_property PROGRAM.HW_CFGMEM [lindex [get_hw_devices xcvu095_0] 0]]
Mfg ID : 1   Memory Type : 2   Memory Capacity : 20   Device ID 1 : 0   Device ID 2 : 0
Performing Erase Operation...
Erase Operation successful.
Performing Program and Verify Operations...
Program/Verify Operation failed.
Byte 10 does not match (20 != FF)
ERROR: [Labtools 27-3144] Invalid option: Byte 10 does not match (20 != FF)

If I do a erase and blank check only, i get a device not blank error. If however if I erase the hole device, the flash does get erased and the blank check passes. Programming still fails.

 

I was able to run the "prog_spi_quad_enable.tcl" scipt to verify I was able to comunicate with the flash chip:

 

xspi_read_id
0 = A956
1 = A956
2 = 0050
3 = FF01
4 = 0220
5 = 4D00
6 = 8130
7 = 3185
8 = 0000
9 = 0000
10 = 0000
11 = 0000
12 = 0000
13 = 0000
14 = 0000
15 = 000E
Manufacturer ID  : 01
Device ID
- memory type    : 02
- memory capacity: 20

The output is correct so I assume this is not a hardware problem. I also tried to configure the QSPI device for x1 operation using a slow clock and verified the timing with an oscilloscope. Same problem :(

 

Current settings are:

 

set_property CONFIG_MODE SPIx4 [current_design]
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
set_property BITSTREAM.CONFIG.SPI_32BIT_ADDR YES [current_design]
set_property BITSTREAM.CONFIG.CONFIGRATE 33 [current_design]
#set_property BITSTREAM.CONFIG.EXTMASTERCCLK_EN div-1 [current_design]
set_property BITSTREAM.CONFIG.SPI_FALL_EDGE NO [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]

I tried vivado 2017.2 and labtools 2018.2, this made no difference.

 

Note that the erase and programming is different from the micron devices, however according to the documentation, the spansion s25fl512s should also be supported.

 

Please advice!

0 Kudos
1 Solution

Accepted Solutions
marcel.schneider
Observer
Observer
2,277 Views
Registered: ‎07-17-2018

It turned out that we use a S25FS512S instead of a S25FL512S. We thought the only difference was the 1.8V compliancy. However looking more carefully at the datasheet it turned out that the QUAD Output Read  instruction (0x6B) is no longer supported :-(

 

2018-08-09 13_24_12-Cypress_002-00488_S25FS512S_512_Mbit_1.8_V_Serial_Peripheral_Interface_with_Mult.png

We will swap the SPANSION/CYPRESS device for a compatible device from MICRON (MT25QU512)

 

Regards Marcel

View solution in original post

0 Kudos
6 Replies
iguo
Xilinx Employee
Xilinx Employee
2,216 Views
Registered: ‎08-10-2008
Hi,

Did you always fail at byte 10 or the failed byte can be any byte?
If always byte 10, this might be that the byte is broken in flash.
1. Do you have another board for a test?
2. Try to readback the programmed file, compare it to the original image.

-Ivy
------------------------------------------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
---------------------------------------------------------------------------------------------------------
0 Kudos
marcel.schneider
Observer
Observer
2,209 Views
Registered: ‎07-17-2018

Hi,

 

Yes during programming it always fails with the same message. However I don't think the device is faulty.

 

Using the xapp1191 flashprogrammer I was able to write some data to the flash chip. This also does not work correctly but that is because the flashprogrammer was setup for a Micron Flash device (different program page sizes). But at least I could flash and read something.

 

1. I do not have another board

2. If I try to read back the programmed file with vivado, the file only contains FFFF's

 

~Marcel

0 Kudos
bpatil
Xilinx Employee
Xilinx Employee
2,201 Views
Registered: ‎03-07-2018

Hi @marcel.schneider

 

Enable compression option and try programming flash.

 

Regards,

Bhushan

-------------------------------------------------------------------------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------------------------------------------------------------------------

Regards,
Bhushan

-------------------------------------------------------------------------------------------------------------------------------------------------
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
marcel.schneider
Observer
Observer
2,197 Views
Registered: ‎07-17-2018

Hi,

 

As you can see in the the xdc file I have compression already on:

 

set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]

Regards Marcel

 

0 Kudos
marcel.schneider
Observer
Observer
2,182 Views
Registered: ‎07-17-2018

Hi,

 

Default the s25fl512s is configured for a Hybrid Sector Architecture, It looks like the labtools do not take that into account. To switch the device to a Uniform Sector architecture, OTP bit-3 in configuration register 3 should be programmed.

 

2018-08-08 09_18_25-Cypress_002-00488_S25FS512S_512_Mbit_1.8_V_Serial_Peripheral_Interface_with_Mult.png

 

Note that this could explain the erase error when not doing a full chip erase, however this doe not fix the programming problem.

 

This device also has a different programming page size of 512 bytes instead of 256 bytes which most spi flashes have.

 

Please look into this more thoroughly. Has this device been tested with an ultrascale FPGA?

 

Regards Marcel

0 Kudos
marcel.schneider
Observer
Observer
2,278 Views
Registered: ‎07-17-2018

It turned out that we use a S25FS512S instead of a S25FL512S. We thought the only difference was the 1.8V compliancy. However looking more carefully at the datasheet it turned out that the QUAD Output Read  instruction (0x6B) is no longer supported :-(

 

2018-08-09 13_24_12-Cypress_002-00488_S25FS512S_512_Mbit_1.8_V_Serial_Peripheral_Interface_with_Mult.png

We will swap the SPANSION/CYPRESS device for a compatible device from MICRON (MT25QU512)

 

Regards Marcel

View solution in original post

0 Kudos