[SOLVED] Erase a secured ATSAM device

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

  • [SOLVED] Erase a secured ATSAM device

    Hi,


    I'm trying to flash a secured ATSAME51G19A using SWD. When I connect, I'm notified that the device is secured and that it needs to be unsecured
    using a mass erase of the internal flash. It seems to do something for a couple of minutes, repeating "Mass erase done!" but then fails at the
    end.

    I'm using a J-Link plus and J-Link 7.82c

    Is there another way I could unsecure the device to allow for flashing?

    There was a former post which is marked as [SOLVED], but i can't find the solution in it.

    [SOLVED] Erase a secured ateml SAMD device

    thanks and regards

    Michael
  • Hi Michael,
    We answered you via the the case you opened in the ticket system.

    For completeness the most important points:
    - The unsecure works fine on our side.
    - Please note that the unsecure is only possible, if the device can be mass erased via the DSU.
    - The device can NOT be unsecured if the mass erase was disabled via the CELCK command (NVMCTRL register).
    - It is the responsibility of the target application (user responsibility) to make sure that the device is in a state where the mass erase is not disabled.

    So, either you do have a way to make the application on the device issue the CEULCK command, thus re-enabling
    the mass erase via DSU, or the device cannot be unlocked and is "bricked".

    Regarding the J-Link Commander output:
    We will revisit the device specific connect of these devices and improve the output/functionality as follows:
    - The user will be notified in case mass erase is disabled.
    - A loop where "Mass erase done!" is printed again and again, even though it is clearly not will be prevented.

    BR
    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.