2025-05-11 11:32 PM
Hi,
I have been trying to flash a program into my stm32f103c8t6. but I'm not able to flash neither through stm32cube ide or stm32cubeprogrammer. when i try to flash through cube ide , im getting the following error:
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.17.0
-------------------------------------------------------------------
ST-LINK SN : E
ST-LINK FW : V2J45S7
Board : --
Voltage : 3.19V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size : 128 KBytes (default)
Device type : MCU
Device CPU : Cortex-M3
BL Version : --
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a14700.srec
File : ST-LINK_GDB_server_a14700.srec
Size : 29.53 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 29]
Error: failed to erase memory
Error: failed to erase memory
Encountered Error when opening C:\ST\STM32CubeIDE_1.16.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.
similarly when i try to flash through cubeprogrammer, its not getting connected. im getting error message:
UR connection mode is defined with the HWrst reset mode
I tried using STM32_Programmer_CLI.
there I found out RDP is enabled.
I did mass erase and write RDP =0xAA.
both commands were successful but still when I give the command to display, it's still showing rdp enabled.
I have attached screenshots of cli messages
how to solve this?
Solved! Go to Solution.
2025-05-12 2:35 AM
Your ST-LINK7v2 is a clone with a fake STM32F103C8T6. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.
This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.
Regards
/Peter
2025-05-11 11:54 PM
Did you notice this ?
Try to get your board into system mode (ROM bootloader), and perform a mass erase.
And remove/disable any code enabling this Flash protection for the time being.
2025-05-12 12:17 AM
Please show a photo of your ST-LINK/V2.
Regards
/Peter
2025-05-12 2:27 AM
2025-05-12 2:35 AM
Welcome to the forum.
What board is your chip on?
Please see: How to write your question to maximize your chances to find a solution
2025-05-12 2:35 AM
Your ST-LINK7v2 is a clone with a fake STM32F103C8T6. ST resources are only dedicated to supporting genuine ST products. We are not committed to ensuring that clones/fakes products work properly with the firmware we provide.
This thread will now be locked. However, if you face difficulties while using genuine ST products, we’re here to assist you. Please feel free to start a new thread, and our team, along with community members, will be ready to help you with any issues/questions you encounter.
Regards
/Peter