cancel
Showing results for 
Search instead for 
Did you mean: 

Programming external QSPI flash on a custom Board

Hello

I'm working with a custom board based on a STM32F767IIT MCU with the framework touchGFX. The external flash is MT25QL512ABB8ESF.

Is there any solution to load the external flash with st-link utility or another tool?

Do I have to write an external loader for st-link? If so how can this be done?

Regards

Dejan

20 REPLIES 20

Hi @Dejan Nedeljkovic​ ,

It helped me, thanks!

Hi @eng23​ 

Did you get it also working with ST Link-Utility and Cube Programmer?

Hi @Dejan Nedeljkovic​ ,

Not yet. I'm finish other issue on my custom board and after I'm going back to external loader.

When I have updates I will post here.

I don't know about your external flash device, but in mine I needed to change commands and setup because it wasn't compatible with STM32F746DISCO command set.

Did you get working QSPI in write and read functions in normal operation?

Hi @eng23​ 

I can write and read from QSPI. My commands were the same as the STM32F746DISCO. I have tested the QSPI communication with the example QSPI_ReadWrite_IT in the STM32F746DISCO folder from the STM32F7 repository.

Different serial flash devices have different command, addressing and timing expectations. The BSP code will need to be adjusted to match the data sheet of the device in use.

The STM32F746DISCO uses the N25Q128A. Implemented drivers for an assortment of other QSPI parts here, and in Dual Bank modes on F7 and H7.

I would need to test ST-LINK Utilities, I was trying to use 4.2.0, and I think we are at 4.5.0 now, apparently enough people complained about it being deprecated/abandoned for the Java based tool.

0690X0000098IyWQAU.jpg

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

Hi @Community member​ ​ 

Do you know if there are some manuals or application notes for external loaders?

I am still struggling to get it working.

I don't believe ST has provided any, a working knowledge of tool chains, and loaders is presumed to be a prerequisite. Keil has some information on their loader, on which the ST solution is based.

http://www.keil.com/pack/doc/CMSIS/Pack/html/flashAlgorithm.html

http://www.keil.com/support/docs/3656.htm

My general recommendations are to thoroughly test QSPI functions in your existing platform. Build your own test framework to exercise the ST external loader model. Instrument the loader so you can see what's happening and how it is being called, and interacted with by the ST tools.

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

I am trying my best to get it working.

Have you already build an external loader with atollic?

I'm trying to get the N25Q512A_STM32F769I-EVAL from the ST-LINK Utility/ExternalLoader folder working. I've copied the folder to STM32Cube_FW_F7_Vx.y.z\Projects\STM32F769I-EVAL\Examples\QSPI as described in the readme file.

When I open the .project file it said that it couldn't import all settings and I may have to do some changes manually.

This is what my project looks alike. I added the folder Loader and linked the .c files to it.

0690X000009887mQAA.png

The good thing is that it builds. The next step was to rename the .elf to .stldr and copy it to the CubeProgrammer folder.

When starting the CubeProgrammer it says "Error: flash loader C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/ExternalLoader/MT25QL512A-MARVIN.stldr cannot be loaded."

0690X00000A9ShaQAF.png

I'm not using Atollic, I'm a Keil guy, and when I do GNU/GCC stuff I use makefiles.

Earlier versions of Cube STM32 Programmer seemed to enumerate the directory for *.stldr files, but then use the internal naming as the file naming when attempting to load them. The .ELF loader also has somewhat constrained expectations about the type/structure of file it would load properly.

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

Hi @Andreas Bolsch​ 

Do you have any example or suggestion how to set up an external flash on a stm32f767II with openocd?