Skip to main content
Associate
Dec 17, 2024 9:55 AM UTC
Solved

I can't burn my STM32F103 CPU

Hi all,

I have the CPU STM32F103 on board. I am using STM32CubeIDE for SW development and STM32CubeProgrammer for burning.

On some point during development, I couldn't burn the CPU anymore - I get various types of error messages, like 'Can't erase the memory', 'Core is halted' or the green bar (which indicates burning process) runs goes and back endlessly.

Yet sometimes I succeeded to bun it by using tricks, such setting port BOOT0 to VCC and using option  OB --> Readout Protection to erase the memory and only then to program. Or alternatively pressing the on-board reset button and starting the programming immediately after releasing the button.

Unfortunately these trick are not always working, and off course are not acceptable as solution.

I wonder what happened to my design. Is there any solution?

Any help will be very appreciated.  

This topic has been closed for replies.
ShonyBest answer
Associate
Dec 25, 2024 1:34 PM UTC

Hi Tesla,

I checked in the Programmer and found the 'Connect under reset' option. I tried the use it with the option 'Software reset' and it worked.

Thank you for your help.

12 replies

Andrew Neil
Super User
Dec 17, 2024 10:19 AM UTC

Welcome to the forum.

 


@Shony wrote:

I have the CPU STM32F103 on board.  


What board?

How to write your question to maximize your chances to find a solution

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.
ShonyAuthor
Associate
Dec 17, 2024 10:27 AM UTC

My own design board.

Andrew Neil
Super User
Dec 17, 2024 10:46 AM UTC

Then, as noted in the Posting Tips, please provide the schematic.

Also tool versions, what programming hardware you're using, etc

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.
gbm
Super User
Dec 17, 2024 11:41 AM UTC

Not enough information for any reasoning.

The first guess: make sure that PA13 and PA14 pins are configured as SWD.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
ShonyAuthor
Associate
Dec 17, 2024 3:33 PM UTC

Hi gbm,

See the attached schematic of my CPU connectivity design. as you can see the SW signals are connected correctly.

More information:

I am using the ST-LINK-V2 as programmer.

CubeIDE version - 1.16.1

CubeProgrammer version - 2.18.0

Attached my CPU schematic.

 

Thanks,

 

MM..1
Super User
Dec 17, 2024 4:02 PM UTC

Schematics seems OK , SWD dont require pull ups, and STlink V2 preffered mode is SWD not JTAG. 

Primary question : your loaded code use set MCU into low power STOP or STANDBY? When yes pregrammer cant connect it without use reset line and mode under reset... Same situation is if pins SWD is activated in code to other func.