[SOLVED]JLink Failed to erase sectors 0 @ address 0x00000000

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

  • [SOLVED]JLink Failed to erase sectors 0 @ address 0x00000000

    Hi,
    When I connect mk60n512 target board via JLinkGDBServer, the log says:
    ------------------
    ......
    02-00-00015893-0037: JLINK_GoIntDis() (0002ms, 0192ms total)
    02-00-00015897-0045: JLINK_IsHalted() returns TRUE (0004ms, 0194ms total)
    02-00-00015897-004D: JLINK_ReadReg(R15) returns 0x1FFFC000 (0000ms, 0198ms total)
    02-00-00015897-004C: JLINK_ReadReg(R0) returns 0xFFFFFFFE (0000ms, 0198ms total)
    02-00-00015897-000E:
    02-00-00015904-009B: ***** Error: Failed to erase sectors 0 @ address 0x00000000 (Algo135: Flash protection violation. Flash is write-protected.) -- End of flash programming
    02-00-00015904-004A: JLINK_GetDeviceFamily() returns 14 (0000ms, 0198ms total)
    03-00-00015904-0076: ERROR: Failed to erase sectors 0 @ address 0x00000000 (Algo135: Flash protection violation. Flash is write-protected.)
    03-00-00015999-001F: Connection to debugger closed !
    ------------------
    I am not sure how to fix this issue, so could anybody help me?

    Thanks very much.
  • Hi,

    is it possible that the flash got write-protected by accident?
    If yes, please open the J-Link Commander and type
    unlock Kinetis
    in order to trigger a mass erase of the flash memory via the MDM-AP of the Kinetis device.
    Is the GDBServer then able to program the MK60N512?

    Which version of the GDBServer do you use (current one is V4.36k (release) / V4.39a (beta))?

    Best regards
    Alex
    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.
  • I was using JLink 4.28c and J-Link seems not working right, it did not prompt me a command line and just hanged.
    Don't know whether related to my cygwin or system environment.
    Anyway I switched Jlink 4.36i on another pc and unlock command ran successfully.

    Thank you for your quick support.

    The post was edited 1 time, last by can.finner ().