cancel
Showing results for 
Search instead for 
Did you mean: 

Can we get a universal QSPI flash loader in CubeProgrammer and Cube IDE debugger?

Pavel A.
Evangelist III

For everyday work I use ST-LINKs. Recently a customer gave me a JLINK for a board with a new QSPI flash chip, for this chip I could not find a ready external loader.

Nevertheless the J-Flash software can program this chip, knowing only the the MCU and QSPI pins.

It does this probably by decoding the built-in parameters table of the flash.

Can CubeProgrammer do the same?

Or is there already a smart QSPI flash programmer that works with ST-LINK?

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

Yet another update: Segger has resolved the problem with detection of S25FL256L.

Fix is available in version 7.82e.

It works at least with my STM32F767 board.

But again - they do not have a specific loader for that flash chip. Users only have to select the MCU model and one of few QSPI pinout variants, then J-Flash does its magic.

View solution in original post

4 REPLIES 4

The JEDEC ID can be used to identify what you're working with.

The methodology ST uses does not provide for a Query, the size of the device, or the size of the erase blocks is hard coded in the header structure of the STLDR.

STM32 Cube Programmer could be smarter, but it's not.

A better method would be to have a table or script driven model.

It would be easier to expand and extend regardless of the pins and STM32.

Knowing what STM32 is involved it could provide a finite list of pins the QUADSPI/OCTOSPI available.

Reading the .IOC could provide it with a pin list.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Back in the day I might have written an auto-gen tool in Windows, with selections for parts and pins, but with viruses and malware the appeal of that has dropped significantly.

Explaining to dozens of people how to compile something on their own toolchain is also unappealing.

So I build out for the combinations that show up

https://github.com/cturvey/stm32extldr

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

Update: the Segger "magic" seems to be broken in recent versions (at least in 7.82c).

In the recent versions they introduced funny names of the QSPI loaders, with pin names:

for example "CLK@PB2_nCS@PB6_D0@PC9_D1@PC10_D2@PE2_D3@PD13"

After update to 7.82, and making the required change in my jflash file, J-Flash no longer can detect the QSPI flash parameters.

Older versions up to 7.80 work like a miracle ( = not clear why and how).

The old project file from the customer does not have any pinout or board hint (but it should?)

Another update - J-Flash 7.82 works with another, much older QSPI flash on the same board.

So it looks like either a bug in their flash chip detection logic, or bug in the embedded parameters table of S25FL256L - causing detection failure.

Pavel A.
Evangelist III

Yet another update: Segger has resolved the problem with detection of S25FL256L.

Fix is available in version 7.82e.

It works at least with my STM32F767 board.

But again - they do not have a specific loader for that flash chip. Users only have to select the MCU model and one of few QSPI pinout variants, then J-Flash does its magic.