1
\$\begingroup\$

Hi i am designing my stm32f401rbt6 board i have stlink v2 which is common and cheap : enter image description here

I used blue pill (stm32f103),programming is done with 3.3v,gnd,swclk and swdio.So can i do same process with stm32f401

edit: enter image description here

enter image description here

i tied the swclk swdio 3.3v GND to programmer`s pins but i cant detect my MCU by st-link v2.i am not sure where is my mistake

edit: enter image description here

enter image description here

power line is under the board and it is so complicated but i checked every pin multiple times.

\$\endgroup\$
  • \$\begingroup\$ what does the stm32f401 datasheet say? \$\endgroup\$ – jsotola Apr 3 at 0:42
  • 1
    \$\begingroup\$ That device in the picture is not an official ST-LINK/V2 but a clone. But since you bought it, it must have come with manual or other instructions how to use it. A real ST-LINK does not give out 3.3V, it requires that MCU is supplied with power externally and it must also be given to ST-LINK as IO voltage reference. It seems your reset is faulty, it most certainly not have a pull-down resistor! \$\endgroup\$ – Justme Apr 3 at 20:49
  • \$\begingroup\$ So, you are powering it up and you still cannot connect to the ST LINK? Is the NRST button normally open? Could you add a picture of the PCB with a (well focused) close-up picture of the microcontroller? \$\endgroup\$ – jDAQ Apr 4 at 16:43
1
\$\begingroup\$

Both stm32f103 and stm32f401 have the SWD, so you should be able to use the ST-Link V2 to program them, just make sure to follow the datasheet regarding the programming pins (like keeping them dedicated to programming or avoiding low impedance things connected it).

From the ST Link V2 ST website

The ST-LINK/V2 is an in-circuit debugger and programmer for the STM8 and STM32 microcontroller families. The single wire interface module (SWIM) and JTAG/serial wire debugging (SWD) interfaces are used to communicate with any STM8 or STM32 microcontroller located on an application board

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Except that thing in the picture is not a ST-LINK made by ST but a clone so referring to info about real ST-LINK may not apply. \$\endgroup\$ – Justme Apr 3 at 20:51
  • \$\begingroup\$ From my experience, both ST's ST-LINKs and the clones work fine. In fact, if I had to guess, those clones probably are just copies of the ST-LINKs that are embedded in the Discovery Eval Boards, which are open source and have their schematics and gerber online, being pretty much a "real' ST-LINK with support to SWD only. \$\endgroup\$ – jDAQ Apr 3 at 21:01
  • \$\begingroup\$ They definitely use ST software, and probably just copied their hardware, firmware and circuitry (as they work exactly like a real one). If it looks like a duck and walks like a duck... \$\endgroup\$ – jDAQ Apr 3 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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