2021-08-24 12:59 AM
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?
Solved! Go to Solution.
2021-08-24 04:29 AM
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
2021-08-24 01:18 AM
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
2021-08-24 01:27 AM
> 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.
2021-08-24 04:24 AM
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+'".
2021-08-24 04:29 AM
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
2021-08-24 04:41 AM
Now it works fine. Thank you!
This topic can be closed.
2021-08-24 04:53 AM
Really glad to know you overcame this problem. :)
I closed this thread by marking Select as Best button.
Imen