Error: Flash Download failed - "Cortex-M3" after FLASH_EnableWriteProtection

Hi.

I was trying to protect my custom bootloader pages but the call

FLASH_EnableWriteProtection

always returned with error, so I followed the advice at

www.st.com/.../forums-cat-8438-23.html

and found that

FLASH_EnableWriteProtection

returned SUCCESS if called after

FLASH_EraseOptionBytes

Sice then however, I'm not able to re-program the board (MCBSTM32) and i always get the message:

Error: Flash Download failed - "Cortex-M3"

I tried the suggestion at

http://www.keil.com/support/docs/3342.htm

but it didn't works (not much related to my problem because if I try to program a different board - another MCBSTM32 - I have no problems).

Maybe I should have restored the content of the option register after the call to

FLASH_EnableWriteProtection

??

Is the micro lost forever ??

Thaks in advance

Parents
  • You should be able to remove the Flash protection with uVision and ULINK.

    - open project Keil\ARM\Boards\Keil\MCBSTM32\Blinky in your MDK installation
    - change target to "MCBSTM32 + OPT" (programs also option bytes)
    - optionally edit the STM32F10xOPT.s file using the Configuration Wizard (default values will already remove Flash Write Protection)
    - program flash (Blinky application together with option keys) or just execute Flash\Erase

Reply
  • You should be able to remove the Flash protection with uVision and ULINK.

    - open project Keil\ARM\Boards\Keil\MCBSTM32\Blinky in your MDK installation
    - change target to "MCBSTM32 + OPT" (programs also option bytes)
    - optionally edit the STM32F10xOPT.s file using the Configuration Wizard (default values will already remove Flash Write Protection)
    - program flash (Blinky application together with option keys) or just execute Flash\Erase

Children
More questions in this forum