2022-11-09 11:36 PM
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?
Solved! Go to Solution.
2022-11-10 07:33 AM
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.
2022-11-10 03:18 AM
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
2022-11-10 03:54 AM
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.
2022-11-10 04:08 AM
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.
2022-11-10 04:09 AM
Here are data from programmer, I don´t know if it is original:
2022-11-10 07:33 AM
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.
2022-11-10 08:27 AM
Hi @TDK Thank you very much, the missing ground was the reason!!!!!
2022-11-10 04:15 PM
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.
2022-11-10 11:17 PM
Thank you @Piranha you are right.