cancel
Showing results for 
Search instead for 
Did you mean: 

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

arnold_w
Senior

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?

8 REPLIES 8
arnold_w
Senior

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
Senior

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
Senior

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
Senior

The microcontroller is powered with 1.9 Volts, if that matters

arnold_w
Senior

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
Senior

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 II

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
Chief II

Set the debugger in "Connect Under Reset" mode.