Skip to main content
Visitor II
June 8, 2022
Question

Error: failed to erase memory

  • June 8, 2022
  • 1 reply
  • 1054 views

Hello there

I was trying to debug my stm32h750 with an stlink-v3 mini. I'm currently working with an external flash as my code area. The bootloader and external loader worked before, but suddenly I can't load code on my external flash. Does anyone know why this happens?

This is the error I receive when trying to debug:

STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled
 
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.9.0-RC01 
 -------------------------------------------------------------------
 
ST-LINK SN : 002F00225632500820313236
ST-LINK FW : V3J9M3
Board : STLINK-V3MINI
Voltage : 3.28V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev Y
Device name : STM32H7xx
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0xd2
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a30988.srec
 File : ST-LINK_GDB_server_a30988.srec
 Size : 312284 Bytes
 Address : 0x90000000 
 
 
Erasing memory corresponding to segment 0:
Erasing external memory sectors [0 4]
Error: failed to erase memory
 
 
Error: failed to erase memory
Shutting down...

Thanks

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 17, 2022

    Hi @SRebe.1​ ,

    is erasing of the external memory working using other means such as the MCU code or a compatible programmer?

    BR,

    J