cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone has a driver for QSPI flash S25FL512S?

Pavel A.
Evangelist III

ST has something on their github but it is incomplete.

The Infineon/Cypress forum offers something here but it is too obtuse.

13 REPLIES 13

The full name of the memory chip is W25Q256JV. There are 6 options for the W25Q256xxx series. They differ in body, set of commands, and the number of control registers. You need to find documentation for the full name of your chip, without abbreviations. It is very important!!!

The W25Q256xxx series has shadow registers that load their value from one-time memory. Disposable memory can only be programmed once. For example permanently enable mode 4 data lines. Shadow register writes work in the same way as flash memory writes, the difference is in the speed of completion of the operation.

Shadow registers are not reset by a software reset, just like a hard reset - only by turning off the power. The control registers are loaded from the shadow ones during software and hardware resets, they can also be programmed an unlimited number of times - this is a simple memory with a flash memory interface.

W25Q256xxx will work well if you do not use all the features that the manufacturer has provided. Use only what is required at the moment. Otherwise, it may turn out to be a brick, with a gilded interface for a fixed frequency - for example, to load the firmware of an FPGA chip.

Line of code:

gpio_one_pin(zap_gpio.B.pin02.v_af09_quadspi_clk.speed4.pull_down.lock_on);

My personal bicycle will not work for the stm32h series - there are differences. You will have to replace these lines with your bike (with square wheels).

I'm interested in what you got.

Hi Sergei,

S25FL256S  is not Winbond W25Q256. It has 256KB erase sector size.

Copy/paste is my mistake.

Used by S25FL256SDPNFB000 and S25FL256SAGNFV000 on different boards.

The conversation was about the S25FL256S series.

Pavel A.
Evangelist III

For those who may find this thread in future - ST support answered that the driver for S25FL512S is in the board BSP examples for QSPI - here is one for STM32469I_EVAL:

https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/BSP/STM32469I_EVAL/stm32469i_eval_qspi.c

This code works with S25FL512S and N25Q512, in fact the commands are defined in the n25q512.h though many register bits differ.

This driver supports only common basic operation of the flash, no specific features of S25FL512S or N25Q512.

 To summarize - take the above ...eval_qspi.c file + one or both .h files for S25FL512S and N25Q512 (and as I wrote this should work also with S25FL256S). Then add advanced i/o modes and specific features such as DDR, protections, ECC...