Skip to main content
ZKURT.1
Senior
December 13, 2021
Solved

Erasing memory corresponding to segment 0: Erasing internal memory sectors [0 150] Error: failed to erase memory

  • December 13, 2021
  • 10 replies
  • 12637 views

Hi

. I am using STM32L010C6tx processor. I drew the circuit myself. I did SYS-> debug serial wire. I was able to install without any problem. But sometimes "Memory Programming...

Opening and parsing file: ST-LINK_GDB_server_a14408.srec

 File : ST-LINK_GDB_server_a14408.srec

 Size: 19268 Bytes

 Address: 0x08000000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 150]

Error: failed to erase memory

Error: failed to erase memory

ST-LINK device status: UNKNOWN

CM3 Failed to print all registers

FAILED to REGISTER Values ​​from the target

Debugger connection lost.

Shutting down...

" I'm getting it. I can't fix it. Any ideas?

This topic has been closed for replies.
Best answer by ZKURT.1

hi, i solved this problem as follows: i cleaned the processor with a new one and cleaned the board. Then it stopped giving this error.

10 replies

ZKURT.1
ZKURT.1Author
Senior
December 13, 2021

0693W00000HoQ00QAF.png

ZKURT.1
ZKURT.1Author
Senior
December 13, 2021

0693W00000HoQ2BQAV.pngWhen I try to delete the flash using STM32CubeProgrammer it gives this error.

TDK
December 13, 2021

Verify that NRST isn't being held low on the target board.

You can try to connect under reset. If you reassigned the SWD pins, the connection may error out when the chip starts.

Attach your schematic if you can.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ZKURT.1
ZKURT.1Author
Senior
December 13, 2021

Hi. This is my circuit. When I measure the NRST lead, it comes out 3.3 volts

0693W00000HoQVrQAN.png

TDK
December 13, 2021

You should have decoupling caps close to each VDD pin as well as a bulk ceramic capacitor on that net somewhere. I only see one decoupling cap. Unsure what the cap on the left is. These issues may or may not be the problem.

As this is probably pigtailed a good distance from the programmer, you can also try using a lower SWD clock speed.

"If you feel a post has answered your question, please click ""Accept as Solution""."
TDK
December 14, 2021
"If you feel a post has answered your question, please click ""Accept as Solution""."
ZKURT.1
ZKURT.1Author
Senior
December 15, 2021

Thank you

ZKURT.1
ZKURT.1AuthorBest answer
Senior
December 27, 2021

hi, i solved this problem as follows: i cleaned the processor with a new one and cleaned the board. Then it stopped giving this error.

Senior
April 4, 2024

Hi, ZKURT.1

I am also facing same problem 

I tried with IDE 12.0, 15.0, 14.0 

CUBEMX  6.10

I tried Full chip Erase through Cube Programmer but it's not working.

 i cleaned the processor with a new one means what u did exactly?

Log output file: C:\Users\MQSTEC~1\AppData\Local\Temp\STM32CubeProgrammer_a13108.log
ST-LINK SN : 0673FF555551847167202052
ST-LINK FW : V2J44M29
Board : 32F769IDISCOVERY
Voltage : 3.22V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x451
Revision ID : Rev A
Device name : STM32F76x/STM32F77x
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : --

 

Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a13108.srec
File : ST-LINK_GDB_server_a13108.srec
Size : 10.25 KB
Address : 0x08000000


Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Error: failed to erase memory


Error: failed to erase memory
Shutting down...