cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI External flash loader

OguzhanBalci
Associate III

"I want to make a QSPI flash loader and I'm watching ST's video series (it's a bit old). I'm using an STM32F446RE. Are the function prototypes shown in the video sufficient for the flash loader to work? Do you have any advice you can give me?"

3 REPLIES 3

>>Do you have any advice you can give me?"

Thoroughly test your own BSP code from an application first.

Integrate into a loader, and use a wrapper/framework to test that.

Use instrumentation to test/debug your loader as you won't be able to "live" debug it directly.

All the functionality of your board is available, use LEDs, USARTs, etc

>>Are the function prototypes shown in the video sufficient for the flash loader to work?

The code has the structure/files you need, but how it comes together is more complicated.

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

The code I wrote here is working, but I have to disconnect and reconnect with CubeProgrammer before every operation. For example:

CubeProgrammer -> Connect

FlashErase -> OK

ReadData -> FAIL

CubeProgrammer -> Disconnect

CubeProgrammer -> Connect

ReadData -> OK

WriteData-> FAIL

I don't understand why it's working this way right now. I've included the Loader_Src.c file below.

I would suggest, again, fully testing the interactions with the memory from application space, where you can use a debugger, before porting into the loader which is significantly more difficult to debug.

With Erasing and Writing, you must wait for the memory device to complete the last operation. Review what's coming back from the Status Register(s) of the device.

Writing, typically you're limited to writing aligned 256-byte pages.

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