[ABANDONED] J-Flash/Lite/J-Link Commander fails to program external QSPI flash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] J-Flash/Lite/J-Link Commander fails to program external QSPI flash

    Hello,

    My problem is that I fail to program external QSPI flash using J-Flash or J-Link Commander.

    I have an ATSAMD51N20 MCU connected to an external QSPI flash memory in its SPI bus. The memory-mapped address of the QSPI memory starts at 0x4000000 and its size is 16MB. Once I establish connection using J-Link Commander, set SWD and its default speed, I try to issue a command loadbin <sample test.bin>,0x4000000. The size of the binary file varies from 8KB to 128KB. However, an error shows up:

    J-Link>loadbin C:\Users\TEDPI-EE\test2.bin,0x4000000
    Downloading file [C:\Users\TEDPI-EE\test2.bin]...

    ****** Error: Failed to prepare RAMCode using RAM
    Error while determining flash info (Bank @ 0x04000000)
    Unspecified error -1

    Any clue why this is happening? I'm also seeing something like this whenever I try to use J-Flash, once I connected, selected the correct bank (external QSPI flash still). It still shows the same error (Error: Failed to prepare RAMCode using RAM/Error while determining flash info (Bank @ 0x04000000)). This happens with every command (check blank, erase, program, program/verify) I try with external flash. The curious thing though is that J-Link commander and J-Flash works well with internal flash only so far, but have never worked for external flash in my case.

    With J-Flash Lite, I try to load the test binary I'd like to program, and proceed to program it. Log says it completed, but upon verifying from J-Link Commander using the mem command, the supposedly programmed binary contents were not written. I'm already suspecting that program failed with J-Flash Lite as "program device" button returned very quickly (I know that programming QSPI flash do take some noticeable time in seconds).

    What's wrong here? Why is it working for internal flash but not for external QSPI flash?


    Alvin
  • Does this mean the combination of my MCU and external QSPI flash has no RAMcode? Is my QSPI supported? I checked segger.com/products/debug-prob…es/supported-spi-flashes/ but my part GD25Q128EYIGR can't be found there. The closest supported I can see are GD25Q32E, GD25Q64E, and GD25Q16E. Does this mean I have to create my own RAMcode, or there is a RAMcode already but I haven't accessed it yet?

    For internal flash at address 0x0 flashing works but not for external QSPI flash.
  • Hi,
    Thank you for your inquiry and sorry for the delay in response.

    The GD25Q128E is listed as supported in the SPI-Flash device list you linked:


    Regarding the issue:
    I will try to reproduce this tomorrow and come back to you as soon as I have news.

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,
    I just gave it a quick try on an evaluation board and it seems to work on our side.

    Could you please check if you have the latest J-Link Software installed?

    You can get the latest version here:
    segger.com/downloads/jlink#J-L…twareAndDocumentationPack

    Does it work as expected with the latest version?

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.