[SOLVED] [J-Link Commander] STM32 - default behavior when active read protected STM32 device detected.

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

  • [SOLVED] [J-Link Commander] STM32 - default behavior when active read protected STM32 device detected.

    Hello,

    On 2 different computer with 2 different j-link compact plus, we got 2 different behavior when we connect to a STM32 and the STM32 has the active read protection activated.

    Behavior 1: J-Link Commander automatically disable read protection

    Source Code

    1. SEGGER J-Link Commander V7.52b (Compiled Aug 3 2021 16:59:02)
    2. DLL version V7.52b, compiled Aug 3 2021 16:57:43
    3. J-Link Command File read successfully.
    4. Processing script file...
    5. J-Link connection not established yet but required for command.
    6. Connecting to J-Link via USB...O.K.
    7. Firmware: J-Link V10 compiled Jul 28 2021 10:07:03
    8. Hardware version: V10.10
    9. S/N: 850100385
    10. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    11. VTref=1.786V
    12. Target connection not established yet but required for command.
    13. Device "STM32L443RC" selected.
    14. Connecting to target via SWD
    15. Found SW-DP with ID 0x2BA01477
    16. Active read protected STM32 device detected.
    17. This could cause problems during flash download.
    18. Note: Unsecuring will trigger a mass erase of the internal flash.
    19. Executing default behavior previously saved in the registry.
    20. Device will be unsecured now.
    Display All
    Behavior 2: unsecure step is skipped

    Source Code

    1. SEGGER J-Link Commander V6.86f (Compiled Oct 23 2020 18:01:48)
    2. DLL version V6.86f, compiled Oct 23 2020 18:00:13
    3. J-Link Command File read successfully.
    4. Processing script file...
    5. J-Link connection not established yet but required for command.
    6. Connecting to J-Link via USB...O.K.
    7. Firmware: J-Link V10 compiled Nov 12 2020 10:06:35
    8. Hardware version: V10.10
    9. S/N: 850100261
    10. License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    11. VTref=1.791V
    12. Target connection not established yet but required for command.
    13. Device STM32L443RC selected.
    14. Connecting to target via SWD
    15. Found SW-DP with ID 0x2BA01477
    16. Active read protected STM32 device detected.
    17. This could cause problems during flash download.
    18. Note: Unsecuring will trigger a mass erase of the internal flash.
    19. Executing default behavior previously saved in the registry.
    20. Skipping unsecure.
    Display All

    We would like to have the same behavior on all our PC: skip unsecure step.

    Log indicated that some default behavior is executed: "Executing default behavior previously saved in the registry"
    Is it possible to update the default behavior?

    Thanks
  • We found out how to change the behavior... It is stored in registry (Computer\HKEY_CURRENT_USER\Software\SEGGER\J-Link\DontShowAgainUnlockSTM)

    The first time user has a pop up to select the behavior, if he ticks the "remember" box, the entry is saved in registry.

    To change the behavior later on, entry can be deleted, then the pop up will show again.

    Regards,
  • Hi,
    Good to hear that you are up and running again.

    Link to the official documentation:
    wiki.segger.com/UM08001_J-Link…#Reset_unlock_message_box

    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.