cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link Can't Read Memory

ESchu.2
Associate II

Hi everybody, I recently bought a STM32F103RBTx and it worked perfectly at the first run.

Today I tried to use it again and I meet a lot of problems.

When I launch the ST-Link Utility, I have a message saying " Can not read memory! Disable Read Out Protection and retry."

Then I go to Target > Option Bytes and I set "Read Out Protection" to "Disabled". When I press apply I have this error again: "Could not set Option bytes! Please reset the target and retry." I close the message and the following one appears: "Can not connect the device".

I really don't understand... I'm a beginner with STM32, I did a lot of researches but nothing helped me...

I would be grateful if you could help me...

Edgar

7 REPLIES 7
Imen.D
ST Employee

Hello @ESchu.2​ and welcome to the STM32 Community =)

Check the USB cable and try to upgrade the ST-Link firwmare through ST-Link utility (go to ST-LINK>firmware update) or this Link STSW-LINK009.

Maybe you can try with the STM32CubeProgrammer and check if that recognizes it.

Please tell me if that solve the issue.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

I already changed my cable et upgraded the firmware. The CubeIDE say this when I try to debug:

"Error in final launch sequence:

Failed to execute MI command:

target remote localhost:61234

Error message from debugger back end:

Remote failure reply: E31

Failed to execute MI command:

target remote localhost:61234

Error message from debugger back end:

Remote failure reply: E31

Remote failure reply: E31"

Some custom board? NRST connected to debugger?

Can you try with BOOT0 pulled high?​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

STM32 Cube Programmer, not CubeMX or CubeIDE

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

CubeProgrammer displays this:

 13:29:01 : STM32CubeProgrammer API v 2.6.0

 13:29:01 : ST-LINK error (DEV_CONNECT_ERR)

 13:29:11 : ST-LINK SN : 066BFF555751836687031330

 13:29:11 : ST-LINK FW : V2J37M26

 13:29:11 : Board    : NUCLEO-F103RB

 13:29:11 : Voltage   : 2.07V

 13:29:11 : SWD freq  : 4000 KHz

 13:29:11 : Connect mode: Normal

 13:29:11 : Reset mode : Software reset

 13:29:11 : Device ID  : 0x410

 13:29:11 : Revision ID : Rev X

 13:29:11 : UPLOADING OPTION BYTES DATA ...

 13:29:11 :  Bank     : 0x00

 13:29:11 :  Address    : 0x4002201c

 13:29:11 :  Size     : 8 Bytes

 13:29:11 :  Bank     : 0x01

 13:29:11 :  Address    : 0x1ffff800

 13:29:11 :  Size     : 16 Bytes

 13:29:11 : UPLOADING ...

 13:29:11 :  Size     : 1024 Bytes

 13:29:11 :  Address    : 0x8000000

 13:29:11 : Read progress:

 13:29:11 : Error: Data read failed

Not a custom board and I don't know if NRST is connected to debugger...

I saw that a lot, what is BOOT0 pulled high and how do I do that ?

Hi @ESchu.2​ ,

Do you have still this problem to solve?

Are you able to manipulate the option bytes from the ST-Link utility ? uncheck read protection byte ?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen