[SOLVED] Readout protection doesn't actually protect from readout?

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

  • [SOLVED] Readout protection doesn't actually protect from readout?

    This may be an STM32-specific thing, and not related to Segger BUT:

    I enabled read protection on a STM32L496AG part.

    When I connect with:

    Source Code

    1. JLinkExe -device STM32L496ag -if swd -speed auto

    And then do "halt",
    sure enough, I am presented with the dialog about "Active read protected STM32 device detected."

    But if I select "no", and DON'T trigger a mass erase, it drops to the "J-Link>" prompt,
    and I can then do:

    Source Code

    1. mem32 0x08000000,32


    and it reads out the flash memory. SP, vector table, etc.

    Which is ... surprising? ?(
  • Okey dokey, apparently the problem is the JLink has to be disconnected and then reconnected, too, otherwise it (apparently) can keep the TAP open and bypass RDP, even through the device doing a Flash Option Bytes programming sequence.

    Resolved now.
  • Hi,

    it is generally recommended to power cycle a MCU when protection is enabled.
    This ensures on (most) chips, that the settings get active.
    Additionally this also ensures that the J-Link connection is reset as well ;)

    Best regards,
    Nino
    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.