[SOLVED] j-Link commander and j_flash: Failed to erase chip

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

  • [SOLVED] j-Link commander and j_flash: Failed to erase chip

    Environment:
    - J-Link Commander V7.54b
    - J-Flash V7.54b
    - Windows 11 Pro Version 10.0.22623 Build 22623
    - J-Link Base V10 .1 (not sure how I find the firmware vesrion
    - Target MCU: ATSAME54P20, SWD, 4000 KHz

    When I issue command Target => Manual Command => Erase Chip, the log prints out the following:

    Source Code

    1. Erasing chip ...
    2. - Connecting ...
    3. - Connected successfully
    4. - 130 sectors, 3 ranges, 0x0 - 0xFFFFF, 0x804000 - 0x8041FF, 0x4000000 - 0x4FFFFFF
    5. - Start of preparing flash programming
    6. - End of preparing flash programming
    7. - Start of determining dirty areas in flash cache
    8. - End of determining dirty areas
    9. - CPU speed could not be measured.
    10. - Chip erase not supported for flash bank @ 0x00000000. Switched to sector erase
    11. - Start of determining dirty areas in flash cache
    12. - End of determining dirty areas
    13. - Start of erasing sectors
    14. - Blank checking 0x00000000 - 0x0001FFFF
    15. - Blank checking 0x00020000 - 0x0003FFFF
    16. - Blank checking 0x00040000 - 0x0005FFFF
    17. - Blank checking 0x00060000 - 0x0007FFFF
    18. - Blank checking 0x00080000 - 0x0009FFFF
    19. - Blank checking 0x000A0000 - 0x000BFFFF
    20. - Blank checking 0x000C0000 - 0x000DFFFF
    21. - Blank checking 0x000E0000 - 0x000FFFFF
    22. - End of erasing sectors
    23. - Start of restoring
    24. - End of restoring
    25. - Start of preparing flash programming
    26. - End of preparing flash programming
    27. - Start of determining dirty areas in flash cache
    28. - End of determining dirty areas
    29. - CPU speed could not be measured.
    30. - Chip erase not supported for flash bank @ 0x00804000. Switched to sector erase
    31. - Start of determining dirty areas in flash cache
    32. - End of determining dirty areas
    33. - Start of erasing sectors
    34. - Blank checking 0x00804000 - 0x008041FF
    35. - Erasing range 0x00804000 - 0x008041FF ( 1 Sector, 512 Bytes)
    36. - End of erasing sectors
    37. - Start of restoring
    38. - End of restoring
    39. - Start of determining flash info (Bank 2 @ 0x04000000)
    40. - ERROR: Failed to prepare RAMCode using RAM
    41. - ERROR: Error while determining flash info (Bank 2 @ 0x04000000)
    42. - ERROR: Failed to erase chip
    43. Disconnecting ...
    44. - Disconnected
    Display All
    The questions:
    - I'd like to make sure the chip is properly erased. How do I interpret this error message?
    - Is there something I can do to properly erase the chip?
  • Note that there are multiple flash banks defined for this chip.
    There is the internal flash but also a flash bakk @ 0x04000000 for the external QSPI flash.
    When hitting „chip erase“ all flash banks are tried to be erased.
    If you do not have an external QSPI flash connected, erasing the flash bank @ 0x04000000 will throw an error.

    You may disable a flash bank under Project settings -> Flash -> Disable bank
    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.