cancel
Showing results for 
Search instead for 
Did you mean: 

External QSPI flash programming using JLink

G_Anastasopoulos
Associate II

Dear All,

Currently I am trying to load some code to the STM32U599NJH6Q that is interfaced with the MT25QL128ABA QSPI flash over the OCTOSPI2 peripheral, using a JLink programmer.

The pinout of this peripheral on my custom PCB is:

G_Anastasopoulos_0-1721736293186.png

I have also checked that I can read and write data to the flash, so the wiring should be fine.


Since I am using JLINK to program my device, I came across this information:
https://wiki.segger.com/J-Link_Multiple_Flashloader
So, based on this I modified my run script like this:

G_Anastasopoulos_1-1721736456038.png

But I am getting this, when I am trying to download my app to the device:

G_Anastasopoulos_2-1721736631933.png
Has anyone encountered something like this before? Any ideas or recommendations on what to do in order to fix it?

Thanks a lot in advance

4 REPLIES 4

I'd assume there's not enough information passed for a "generic" loader to figure out it's on bank2, etc

I'd expect you'd still have to code something specific for your platform. Perhaps Segger has specific examples of this for other platform/chip options you can review.

https://wiki.segger.com/SEGGER_Flash_Loader

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

@Tesla DeLoreanthanks for your reply.

Could you elaborate a bit more on what steps do I need to take here?

Review how Segger implements on other STM32 platforms like the H743

See how it works for other platforms, see the code or scripting used / provided

Confer with Segger support and their documentation. Do they provide any U5 or U575 examples?

Not sure if CubeIDE can use J-Link and push in .STLDR External Loaders for ST-LINK. The mechanics there is to put the loader in available RAM, and call functional entry points. That's a pretty standard/common method to do that. Keil uses FLM. IAR/EWARM is a little more scripted.

Second bank OSPI/QSPI on the U5 would need specific code and AF relationships for the pins, and that's not exactly consistent between STM32 models, or U5 members either.

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

Do you have a pointer on where to start with reviewing the solutions they offer?

I have not been able to find much so far.
Where can I see the default configurations for a specific board? Is it part of the STM32CubeIDE plugins folder?