Skip to main content
Visitor II
February 28, 2025
Question

flash programming disable

  • February 28, 2025
  • 2 replies
  • 469 views

hello everyone..

I am using the STM32F429 Discovery board and want to prevent reprogramming of the internal flash after initially flashing the firmware. Once the code is programmed, it should continue to run normally, but no further programming access should be allowed. How can I achieve this? Please suggest an implementation method.

    This topic has been closed for replies.

    2 replies

    Super User
    February 28, 2025

    See Read Protection (RDP) and/or Proprietary code readout protection (PCROP) in the Reference Manual.

    Despite the names, they do also restrict writing to (ie, programming) the Flash ...

    Super User
    February 28, 2025

    Write 1 to the relevant write protection bits in the option bytes. This can be done in code or in STM32CubeProgrammer.

    TDK_0-1740751016626.png

     

    You can undo this to write code again.

    If you want to permanently prevent access, set RDP level 2, which is quite restrictive and is irreversible.