[SOLVED] Unable to flash QSPI flash connected to IMXRT1052

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

  • [SOLVED] Unable to flash QSPI flash connected to IMXRT1052

    Hello,

    We are trying to use J-Link (V6.32h) to program QSPI flash on an NXP IMXRT1050-EVKB development board. We have modified the board as per the NXP instructions to enable QSPI, and we have modified the JLinkDevices.xml file, according to the instructions on the Segger Wiki.

    The problem is, although programming works, erasing mostly doesn't. It is necessary to use MCUXpresso with the dev board OpenSDA interface in order to erase the flash device. J-Link can then program the flash device. If the development board is then reset, such that the program in flash runs, J-Link cannot erase the flash (although it can if I do it before resetting). When it fails, It we receive the following output:

    J-Link>erase
    Erasing device (MIMXRT1052xxxxB)...
    J-Link: Flash download: Total time needed: 0.006s (Prepare: 0.003s, Compare: 0.000s, Erase: 0.003s, Program: 0.000s, Verify: 0.000s, Restore: 0.000s)

    ****** Error: Failed to erase sectors 0 @ address 0x60000000 (erase error)
    ERROR: Erase returned with error code -5.


    I start by programming a blank board, using the command loadfile <path to hex file>. This is successful, so I reset the board, and see that the firmware is executing.

    I then attempt to erase, running the following commands after starting JLink.exe:

    1. connect [select the default processor type "MIMXRT1052XXXXB", SWD and default clock rate].
    2. exec EnableEraseAllFlashBanks
    3. Erase [which fails, as above]

    If I then use the OpenSDA interface from MCUXPresso to mass erase the part, which works, it is possible to run the above erase process, without any problems, and it is possible to program the flash part again.


    I've also tried with the latest version of J-Link (6.40), updating the firmware on our J-Link Pro device, but the result is the same. It does not seem to make much difference if I explicitly halt execution or not.

    Unfortunately, we can't just use the OpenSDA interface, because later we will design our own PCB, which will not have this part fitted, so we will need to use a JTAG / SWD debugger.

    What could we be doing wrong here?

    Many thanks,

    Andrew Walsh.

    The post was edited 2 times, last by AndrewWalsh ().

  • Hello Andrew,

    Sorry for the delay in response.
    The reported issue is not known to us.
    Could you open a support ticket in that regard?
    More information can be found in my signature.

    Best regards,
    Nino
    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.