cancel
Showing results for 
Search instead for 
Did you mean: 

External QSPI flashes directly supported by ST

rohan_m
Senior

Hello community,

Are there any QSPI external flashes that are directly supported by ST in the form of drivers and external loaders that we can use for our project ? 

5 REPLIES 5
Andreas Bolsch
Lead II

Hardly: You may skim through the various CubeMX packages for examples (in particular for the Discovery and Eval boards). However, by using one of these you will be nailed down to the very same pin configuration. The pins used for QSPI and OctoSPI interfaces are configurable (in limited ways). And as soon you configure even a single pin differently, you have to change the driver and external loader appropriately ...

At least for the external loader you're better off with OpenOCD and the integrated stmqspi driver, as there the pin configuration is strictly separated from the driver and handled in a simple script. Even configuration of the flash chip itself can be handled easily in a script. Hence no need to rebuild anything ...

MNapi
Senior III

for example

MT25QL128ABA1EW9-0SIT

it is 128 Mbit flash

it is on a few discovery boards, it has a lot of examples which come with the boards

so it is easy to connect. all QSPI work the same way. if you got this one working then you can try another one

you need to initialize it then configure by sending a few commands

 

and you are ready to write and read from it. or use as external loader

article

AN333, Autumn 2020, v1.0 (use google to find)

will show you how to use it as external loader

 

 

 

Any variant s with 256 Mbit ? Will this work -> N25Q256A. Is it supported ?

Hello,

The external flash loaders supported by ST are provided here.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

it works the same the only difference is size

 

you only need to change in CubeMX

 

FLASH Size 23 (for 128 Mbit )

to

Flash Size 24 (for 256 Mbit )

Here is part of the code for 128 Mbit, 

 

/* Size of the flash */
#define QSPI_FLASH_SIZE 23
#define QSPI_PAGE_SIZE 256

/* Reset Operations */
#define RESET_ENABLE_CMD 0x66
#define RESET_MEMORY_CMD 0x99

/* Identification Operations */
#define READ_ID_CMD 0x9E
#define READ_ID_CMD2 0x9F
#define MULTIPLE_IO_READ_ID_CMD 0xAF
#define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A

/* Read Operations */
#define READ_CMD 0x03
#define READ_4_BYTE_ADDR_CMD 0x13

 

Just check data sheet if your QSPI has the same hex codes but most are the same particularly if it is the same manufacturer