Skip to main content
arnold_w
Senior II
March 24, 2020
Question

ST-Link Utility can't connect to STM32F405 after enabled write protection on 2 sectors

  • March 24, 2020
  • 8 replies
  • 1759 views

I am working with the STM32F405 microcontroller and I used ST-Link Utility to enable write protection on sectors 10 and 11 and after that I can no longer connect to it. Does anybody have any advice on how I can solve this?

This topic has been closed for replies.

8 replies

arnold_w
arnold_wAuthor
Senior II
March 24, 2020

I just tried with STM32CubeProgrammer and when I try to connect I get the following error message: Error: ST-LINK error (DEV_TARGET_HELD_UNDER_RESET).

arnold_w
arnold_wAuthor
Senior II
March 24, 2020

If I use STM32CubeProgrammer and select "Hot plug" then I can connect, but as soon as I try to change option bytes then it hangs and if I try to download firmware then it complains that it can't erase the memory.

arnold_w
arnold_wAuthor
Senior II
March 24, 2020

If I select "Hot Plug", then I can connect with ST-Link Utility as well and it detects the Device ID and the revision ID, but it says the flash size is unknown. If I try to download firmware into my microcontroller, then it says it's read protected and asks if I want to disable read protection. I click ok and then it says "Could not disable Read Out Protection!". If I read the Option Bytes, then they all seem to be zero.

arnold_w
arnold_wAuthor
Senior II
March 24, 2020

The microcontroller is powered with 1.9 Volts, if that matters

arnold_w
arnold_wAuthor
Senior II
March 25, 2020

So, after further investigations it turned out that I also changed the BOR-level when I write protected the sectors. Now the supply voltage is 1.9 Volts, but the BOR-level is set higher so the BOR will keep resetting the microcontroller. Is there a way to solve this? Also, does STM guarantee that the option bytes are certain default values after production? I can't find anything about option bytes default values in the reference manual or datasheet.

arnold_w
arnold_wAuthor
Senior II
March 25, 2020

Also, is it possible to change the title of this thread? The problem has nothing to do with write protection, it's related to BOR-level being higher than supply voltage.

JRF.1
Associate
January 26, 2021

I've got the same message for my STM32F103C8T6 board, when I try to connect with STM utility it shows "core is held in reset" ... I really can't find any solution for this, guess I'm changing my dev board

Piranha
Principal III
January 27, 2021

Set the debugger in "Connect Under Reset" mode.