cancel
Showing results for 
Search instead for 
Did you mean: 

External QSPI flash programming using JLink

G_Anastasopoulos
Associate III

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

6 REPLIES 6

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?

Pavel A.
Evangelist III

First, get the latest J-Link software update from Segger. They update often and add support for most ST devices.

The updater will detect and update J-Link modules in CubeIDE and other known IDEs.

J-Link has "universal" QSPI flash programmer where you only have to specify pinout of the QSPI/OSPI controller and the flash chip is detected automatically. Details & bug reports ->  Segger J-Flash forum.

 

TKana.1
Associate III

TKana1_0-1727159971141.png

I am having similar issue with MT25QL128. Unfortunately Jlink does not support

Tim