[ABANDONED] Failed to erase sectors @ address 0x0 (Algo91: Flash protection violation. Flash is write-protected.)

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

  • [ABANDONED] Failed to erase sectors @ address 0x0 (Algo91: Flash protection violation. Flash is write-protected.)

    After flashing my NXP S32K144-Q100 (firmware: J-Link OpenSDA, built on 2019-05-27) with a program I accidentaly linked incorrectly, I'm no longer able to flash a program onto the board. Using your J-Link GDB Server V6.54c, `load` in gdb silently fails with `ERROR: Failed to erase sectors 0 @ address 0x00000000 (Algo91: Flash protection violation. Flash is write-protected.)`. Looking at the program flash protection (FPROT) registers I see

    Source Code

    1. J-Link>mem 408 4
    2. 00000408 = 0A F0 C3 F9
    where I expect to read `FF FF FF FF`. I tried with a

    Source Code

    1. J-Link>w4 408 FFFFFFFF
    which does not fail, but after a power cycle the registers still read `0A F0 C3 F9`.

    How do I unlock all flash regions again?

    Thanks in advance.
  • Hi,
    Thank you for your inquiry.

    Have you tried the FlashEraseAllUnsecure command?
    It is documented in the reference manual for this device.

    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.