Skip to main content
Explorer
July 23, 2024
Question

External QSPI flash programming using JLink

  • July 23, 2024
  • 3 replies
  • 4005 views

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

    This topic has been closed for replies.

    3 replies

    Graduate II
    July 23, 2024

    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

    Explorer
    July 23, 2024

    @Tesla DeLoreanthanks for your reply.

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

    Graduate II
    July 23, 2024

    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.

    Super User
    July 24, 2024

    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.

     

    Graduate II
    September 24, 2024

    TKana1_0-1727159971141.png

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

    Tim