3
\$\begingroup\$

I am currently cloning the STM32F103C8T6 (blue pill) into a new board. The the bill of material of my new board is exactly same (because I just simply cloned it), only the shape of the board is different.

My first thought, because I cloned the board, I might easily program the board using ST-Link v2 like I have done with the blue pill. however, when I was trying to program it (with simple blinky LED program) using ST-Link v2, the code (seems like) failed to upload from my PC to the new board and somehow the new board also was not detected by my PC.

I checked the electrical wiring and I found no error. Do you have any idea where my mistake is? Is there any initial procedure that I missed?

this is my schematic. in this schematic, i add two sensor and microSD slot. enter image description here

and this is my pcb layout enter image description here

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Nope. I have no idea what could have gone wrong. You've told us an issue but no details. For instance, what does your compiler say when the code upload failed? Also, to eliminate confirmation bias, do you have some sort of schematic of how you wired everything up? Perhaps we can confirm whether or not everything was hooked up properly. I would utilize this question to help you troubleshoot a little. \$\endgroup\$
    – user103380
    Commented May 14, 2019 at 16:11
  • \$\begingroup\$ Upload the code and then do a readback. You will know if programming went fine. \$\endgroup\$
    – filo
    Commented May 14, 2019 at 16:33
  • 1
    \$\begingroup\$ The overwhelming likelihood is that you have either a board design error or an assembly error - but you are going to have to do your own inspection to figure out which. \$\endgroup\$ Commented May 14, 2019 at 16:42

2 Answers 2

0
\$\begingroup\$

If you look at the STM Blue Pill pinout diagram you will se that the SWDIO and SWCLK pins are connected to PA13 and PA14. Those are the "Serial Wire" programming pins. enter image description here

My recomendation is that next time you will design a board with STM32 you first try it in the STM32 CubeMX. There you can see which pins you need for programming, supply, ADC, GPIO etc. enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ thank you for your comment and advise. i'll fix it while makes it in CubeMX as well \$\endgroup\$
    – Edu Edwar
    Commented May 15, 2019 at 15:31
4
\$\begingroup\$

SWDIO and SWCLK lines from the ST-Link adapter should be connected to PA13 (pin 34) and PA14 (pin 37) respectively. They are connected to PB13 and PB14 on your schematic. Neither is the 32768 Hz crystal right, it should be connected to PC13 and PC14.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ thank you very much. i just realized after read your comment. i'll fix it sooner and update the result here \$\endgroup\$
    – Edu Edwar
    Commented May 15, 2019 at 15:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.