[ABANDONED] JLink, JFlash, JFlash Lite, not able to erase MAX32660: Error: Failed to prepare for programming

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

  • [ABANDONED] JLink, JFlash, JFlash Lite, not able to erase MAX32660: Error: Failed to prepare for programming

    PROBLEM:
    When attempting to erase a MAX32660 device using the command line interface I get the following error:

    J-Link>erase
    Without any given address range, Erase Chip will be executed
    Erasing device...

    ****** Error: Failed to prepare for programming.
    RAM check failed @ addr 0x20004000.
    RAM check failed while testing 0x4000 bytes @ addr 0x20000330.
    ERROR: Erase returned with error code -1.

    When using JFlash, or JFlash Lite, I get similar, but less descriptive errors.

    SUCCESSFUL WORK AROUND:
    The MAX32660 has four SRAM blocks allocated to the following regions:
    SYSRAM0: 16KB @ 0x20000000-0x20003FFF
    SYSRAM1: 16KB @ 0x20004000-0x20007FFF
    SYSRAM2: 32KB @ 0x20008000-0x2000FFFF
    SYSRAM3: 32KB @ 0x20010000-0x20017FFF

    I can successfully erase the MAX32660 device if i restrict the memory region the JLINK uses to the 16KB SYSRAM0

    J-Link>exec map ram 0x20000000-0x20004000
    J-Link>erase
    Without any given address range, Erase Chip will be executed
    Erasing device...
    J-Link: Flash download: Total time needed: 0.152s (Prepare: 0.086s, Compare: 0.000s, Erase: 0.062s, Program: 0.000s, Verify: 0.000s, Restore: 0.004s)
    Erasing done.

    This can similarly be done in the JFlash application through the 'Project Information', 'Target', 'Use target RAM' setting

    I cannot find a way to do this in the JFLash Lite application.

    QUESTIONS:
    - Is there a MAX32660 configuration file that can be modified to adjust the usable RAM region?
    - Is there configuration or script file run by JFLash Lite that can be used to adjust the usable RAM region?
    - Is there a better way to fix this issue?