cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SWD Interface

TKlei.5
Associate III

Hello,

i want to program my STM32G031F4P6 chip over ST Link, but i get the error message

"Can not read memory! Disable Read Out Protection and retry".

Disable the Read Out Protection over the Option Bytes doesn't work.

Erasing the chip also doesn't help.

Can anybody help me to solve this problem?

1 ACCEPTED SOLUTION

Accepted Solutions

Add the flash programming related to your device.

For that, open your MDK-ARM, go to: Project > Options for Target >Utilities>Settings>Flash Download>Add Flash programming related to your device.

Imen

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

View solution in original post

6 REPLIES 6
Imen.D
ST Employee

Hello @TKlei.5​ ,

Firstly, make sure to upgrade the ST-Link firwmare/drivers.

Did you use the latest version of STM32CubeProgrammer tool? 

Try select "connect under reset" option in Target->Settings.

Is NRST connected to debugger?

Maybe you can try with BOOT0 pulled high?​

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

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

> Disable the Read Out Protection over the Option Bytes doesn't work.

What does doesn't work mean? Does it succeed? Error messages?

 

> Erasing the chip also doesn't help.

Does it erase the chip?

Are you using 3.3V or 1.8V? Note that most programmers will not be compatible with a 1.8V target.

If you feel a post has answered your question, please click "Accept as Solution".
TKlei.5
Associate III

Thank you for your answers.

I can connect the chip with the latest version of the STM32CubeProgrammer tool now.

But i want to flash and debug the chip with the KEIL MDK V5 IDE.

I get the error message: "Cannot load Flash Device Descriotion! Flash Download failed- 'Cortex-M0+'".

Add the flash programming related to your device.

For that, open your MDK-ARM, go to: Project > Options for Target >Utilities>Settings>Flash Download>Add Flash programming related to your device.

Imen

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

Now it works fine. Thank you!

This topic can be closed.

Really glad to know you overcame this problem. :)

I closed this thread by marking Select as Best button.

Imen

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