Skip to main content
Associate II
April 29, 2025
Solved

Can't connect STM32F103C8T6

  • April 29, 2025
  • 2 replies
  • 845 views

thequyen831_0-1745931497826.pngthequyen831_1-1745931784762.png

Yesterday, I have flashed faulty code to my STM32, and now I can't connect to it via ST-Link or the UART bootloader. I've tried using STM32 ST-Link Utility and STM32CubeProgrammer, but neither works. How can I erase the flash memory? Do I need to buy a new chip?
i using stm32f103c8t6

Best answer by TDK

Holding BOOT0 high during reset will let you connect and erase/recover the chip, if it's a genuine ST chip, which it's probably not.

2 replies

TDK
TDKBest answer
Super User
April 29, 2025

Holding BOOT0 high during reset will let you connect and erase/recover the chip, if it's a genuine ST chip, which it's probably not.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
April 29, 2025

By holding BOOT0 high during reset, will I be able to connect via ST-Link or UART?

Andrew Neil
Super User
April 29, 2025

Welcome to the forum.

Please see How to write your question to maximize your chances to find a solution for best results.

 

Note that the old ST-Link Utility is long obsolete - STM32CubeProgrammer is the current tool

Are you using a genuine STM32 ?

What board is it on ?

Are you using a genuine ST-Link ?

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/ta-p/49471

 

How are you connecting the ST-Link ?

https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
April 29, 2025

I think I'm using a clone STM32 board and a clone ST-Link, but in the past it worked normally. It was only after I uploaded code yesterday that divided a number by zero, and since then the board hasn’t been able to connect. Is there any way to completely erase the code from the chip?

Andrew Neil
Super User
April 29, 2025

@thequyen831 wrote:

I think I'm using a clone STM32 board and a clone ST-Link


You need to check that for sure!

I gave you a link on how to check the ST-Link; in particular, see this part:

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/tac-p/703663/highlight/true#M965

 

Post a link to where you bought the board.

Photos of the board & ST-Link would also help.

Again, please see: How to write your question to maximize your chances to find a solution

 


@thequyen831 wrote:

but in the past it worked normally. 


That's the trouble with using clones/fakes: they could have been just barely working before - and have now just gone over the edge.

There are many posts here where many people have wasted many hours on these fakes/clones.

Avoid the hassle - just get a genuine ST board!

eg, NUCLEO-F103RB - which comes complete with a genuine ST-Link. 

https://www.st.com/en/evaluation-tools/nucleo-f103rb.html 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.