0
\$\begingroup\$

I have a custom STM32 CM0 board I spun, and have been programming it using a $2 ST-LINK "clone" programmer.

I needed to test a chip with more memory, so I pulled out an unopened brand new STM32F0-Discovery board.

I connected my clone programmer via SWD (connections are correct, I removed the two jumpers). AND NOTHING.

The Discovery board is working with a USB connection, just not with the SWD. So, the SWD pins are working and didn't get reset.

There's nothing to reset, I just see nothing from this clone programmer connected to this Discovery board.

Does STM have some kind of protection in place in their development boards, that they only work with an official ST-LINK?

I don't care about how the connection is made... Is their a vendor lock with the official tool.

Sounds like some tinfoil hat theory, but I'm sitting here with a clone tool that works on my custom board but not on this development board.

\$\endgroup\$

closed as off-topic by Chris Stratton, RoyC, Voltage Spike, PeterJ, Sparky256 Jan 28 '18 at 22:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – RoyC, Voltage Spike
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ lemme guess USD 2 from ebay, aliexpress, banggood, amazon marketplace? You got ripped off by someone who's selling untested equipment. (Other than that, make sure you've disconnected the on-board SWD programmer – there's usually jumpers that allow you to do that) \$\endgroup\$ – Marcus Müller Jan 21 '18 at 21:54
  • \$\begingroup\$ Yeah. But it works on another CM0, no problem. It even has the most up-to-date firmware from the ST-LINK utility. I thought they might brick it there. STM seems pretty nice about their dev tools, I kind of figure they wouldn't lock anything out in any case. They want to sell MCUs not dev tools... \$\endgroup\$ – Leroy105 Jan 21 '18 at 21:55
  • 1
    \$\begingroup\$ You should document the exact connections of the programmer and jumper changes which you tried in your question. \$\endgroup\$ – Chris Stratton Jan 21 '18 at 22:09
  • 1
    \$\begingroup\$ Possible duplicate of How to Use an External ST-Link/V2 with the STM32F4 Discovery Board - the SWD connections are actually the same for all STM32's so it does not matter which board you have. \$\endgroup\$ – Chris Stratton Jan 21 '18 at 22:12
  • 1
    \$\begingroup\$ Not a solution, but as an aside only, I have never used clone programmers for any professional work. Especially when they are so cheap to buy. For example, with Microchip I will buy and pay for not just one, but two, copies of their MPLAB REAL-ICE as well as their hobbyist PicKit 2 and 3 devices. I may also buy clones, but only for fun. Never for work. (I have had to design and build and program my own programmers. But only when nothing commercial was available at the time.) This way I know I have someone to call if there is a problem, too. \$\endgroup\$ – jonk Jan 21 '18 at 22:13
3
\$\begingroup\$

If the programmer works with other boards, the most likely explanation definitely is that you've got some connections missing (is the board powered?) or duplicate (external clone AND on-board programmer both connected at the same time) connections.

SWD is so simple and well-documented that there's no way you can actually include a lockout mechanism. The MCUs are designed to be programmed by any tool that speaks SWD and sends the commands given in the programming manual – STLink v2 actually refers to the protocol you talk between programmer and PC to make the programmer do the right SWD things.

\$\endgroup\$
  • \$\begingroup\$ Yes, but it may not be immediately obvious how to correctly connect an external programmer. The usual pattern is instead to use the on-board programmer with an external target. As a guess, the external programmer needs to be connected to some of the pins were headers were removed, and also some other pins. Or perhaps it can be connected to the appropriate pins on the target edge headers. \$\endgroup\$ – Chris Stratton Jan 21 '18 at 22:11

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