Skip to main content
Visitor II
December 13, 2021
Solved

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

  • December 13, 2021
  • 5 replies
  • 12545 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.

    5 replies

    ZKURT.1Author
    Visitor II
    December 13, 2021

    0693W00000HoQ00QAF.png

    ZKURT.1Author
    Visitor II
    December 13, 2021

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

    Super User
    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.

    ZKURT.1Author
    Visitor II
    December 13, 2021

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

    0693W00000HoQVrQAN.png

    Super User
    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.

    Super User
    December 14, 2021
    ZKURT.1Author
    Visitor II
    December 15, 2021

    Thank you

    ZKURT.1AuthorAnswer
    Visitor II
    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.

    Graduate II
    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...