cancel
Showing results for 
Search instead for 
Did you mean: 

Upload works well, code isn´t running on custom STM32f103

zlomennypez
Associate II

Hi I have a program, which works normally on standalone STM32f103c8t6. I made a custom board and now I can upload the program, but its not running. Even simple Blink sketch. STM Cube programmer shows this error:

Memory Programming ...

 07:53:02 : Opening and parsing file: Blink.ino.BLUEPILL_F103C8.bin

 07:53:02 :  File     : Blink.ino.BLUEPILL_F103C8.bin

 07:53:02 :  Size     : 12.20 KB 

 07:53:02 :  Address    : 0x08000000 

 07:53:02 : Erasing memory corresponding to segment 0:

 07:53:02 : Erasing internal memory sectors [0 12]

 07:53:02 : Download in Progress:

 07:53:04 : File download complete

 07:53:04 : Time elapsed during download operation: 00:00:02.271

 07:53:04 : RUNNING Program ... 

 07:53:04 :  Address:   : 0x08000000

 07:53:04 : Start operation achieved successfully

 07:53:06 : Timeout error occured while waiting for acknowledgement.

 07:53:06 : Error: GETID command not acknowledged!

 07:53:06 : Reemission of GetID command

 07:53:07 : Timeout error occured while waiting for acknowledgement.

 07:53:07 : Error: GETID command not acknowledged!

 07:53:07 : Reemission of GetID command

 07:53:08 : Timeout error occured while waiting for acknowledgement.

 07:53:08 : Error: GETID command not acknowledged!

 07:53:09 : Timeout error occured while waiting for acknowledgement.

 07:53:09 : Error: GETID command not acknowledged!

 07:53:09 : Reemission of GetID command

 07:53:10 : Timeout error occured while waiting for acknowledgement.

 07:53:10 : Error: GETID command not acknowledged!

 07:53:10 : Reemission of GetID command

 07:53:11 : Timeout error occured while waiting for acknowledgement.

 07:53:11 : Error: GETID command not acknowledged!

 07:53:11 : Warning: Connection to device 0x410 is lost

 07:53:11 : Disconnected from device.

Can you help me please?

0693W00000WHyJjQAL.jpg0693W00000WHyJZQA1.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

How are you determining that the code isn't running, as opposed to the code being stuck somewhere during startup? Do you have the source code to be able to debug and step through?

The non-crystal side of C13/C15 needs to be grounded, not floating.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

8 REPLIES 8
Peter BENSCH
ST Employee

Welcome, @Pavel Novák​, to the community!

Are you 100% sure that it is an original STM32F103 and not a clone or counterfeit?

Please check websites like e.g. hackaday.io or eevblog.com.

Have you set the jumpers on the BOOTx settings correctly?

BTW: you should not copy circuits from Bluepills, Blackpills, etc., as many details are not implemented correctly. For example, no pull-up to /NRST (R2 in your case) is necessary or even counterproductive.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello @Peter BENSCH​ , thank you for the answer. The source of the chip is https://jlcpcb.com/partdetail/Stmicroelectronics-STM32F103C8T6/C8734, so I hope, it´s original. You´re true that I copied a part of bluepill schema and probably with a mistake. If I bypass the R2 resistor, nothing change. :( Appreciate any help.

gbm
Lead II

The placement of 100n capacitors as well as of oscillators and their capacitors on the PCB is very, very wrong. The microcontroller may be unable to run at anything > 8 MHz from its internal HSI because of effectively missing power decoupling. Try to start testing with HSI used as clock sorce (no PLL). The firware may be stuck in HSE/PLL init routine.

zlomennypez
Associate II

Here are data from programmer, I don´t know if it is original:0693W00000WI0C6QAL.jpg

TDK
Guru

How are you determining that the code isn't running, as opposed to the code being stuck somewhere during startup? Do you have the source code to be able to debug and step through?

The non-crystal side of C13/C15 needs to be grounded, not floating.

If you feel a post has answered your question, please click "Accept as Solution".

Hi @TDK​  Thank you very much, the missing ground was the reason!!!!!

Piranha
Chief II

Remove the R23 and R2, replace the C12 with 100 nF. Also R3 and R6 are recommended to be 10k, but that should not be an issue. And read the AN2586.

Thank you @Piranha​ you are right.