cancel
Showing results for 
Search instead for 
Did you mean: 

How to create CubeProg stldr loader file for QSPI external memory?

JNguyen
Senior
 
23 REPLIES 23

Not super well documented. Review doc for Keil FLASH algorithms to understand the background.

Several examples under the ExternalLoader directory that could be adapted.

Basically wrapping the BSP QSPI code, providing entry points to Initialize and map the memory, and then additional routines to erase device/sectors, and write memory.

If you have specific requirements I'll quote the work.

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

STM32H750

MT25QL256, 32MB

PB6 NCS

PB2 CLK

PD11 D0

PD12 D1

PE2 D2

PA1 D3

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

Thanks.

My board has H750V and MT25QL256 QSPI memory. I got stldr file for CubeProg created. CubeProg can read QSPI correctly. Here are my issues:

1) At the first time target is power on, CubeProg cannot read QSPI. I have to load the loader hex file (that is used to create stldr file) to CubeProg, download it to target. Then CubeProg can read memory OK from here on, until target is power cycled. This means that CubeProg does not set the entry point in H750V RAM. I don't know how to fix this.

2) After CubeProg read memory successfully, CubeProg does sector erase and reports successfully. However, memory is not erased when CubeProg reads it again.

3) If I try to modify a location (a byte, or a word, or 4 bytes) of the memory after CubeProg read it, I'll get and error msg "Memory edition verification failed"

My board has the exact same QSPI connections, configured for single flash/BK1/Quad. My board FW runs QSPI memory verification successfully, writes LCD image data to QSPI memory, and copy it to LCD w/o error.

The Cube Programmer is a bit fragile on the H7 currently. Prefer the GUI and ST-LINK Utilities in some contexts.

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

I'm seeing the same issues in ST-Link Util

Would you review my linker, Loader_Src.c, main.c, etc...?

Sure, send as a .ZIP, sourcer32@gmail.com

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

For those of you seeing the similar issue with stldr file, I found out one of the reason for my issue was that the below is not met:

  • VECT_TAB_SRAM has to be defined
  • VECT_TAB_OFFSET has to be 0x200

These are in system_stm32h7xx.c in my case. This is not documented any where. I found it out the hard way. I hope this saves you time.