When two or more of these modules have their 5v pins hooked up to a common 5v rail (power off) and I connect an 4-pin SWD st-link to the programming pins of one, I'm finding that all modules (and peripherals attached to them) power up. In other words, the 3v3 from the st-link is powering everything. The voltage on the rail is 2v6. Would it be better to have a diode between the 5v pin of each module and the 5v rail? Thanks for your thoughts.

This shows both the mcu board and the swd st-link board:


  • \$\begingroup\$ Perhaps, but that is likely only part of the issue. You should not be connecting a programmer to a powered off board to begin with. And you should take time to realize that this is a rule that goes for all I/O signals in general unless specific measures are taken - if you have any signals between the boards, then you should not attempt to power only one of them. Most IC specifications prohibit having a voltage on any signal pin when the IC itself is not powered - there are exceptions, but you have to assume this rule applies until you know it does not. \$\endgroup\$ Nov 26, 2018 at 15:54

1 Answer 1


3V3 on SWD is intended as a target supply sense. Probably it has some current-sourcing capability, but it's rather limited (hence you see the voltage drop to 2.6V).

As Chris suggested, you shouldn't connect programmer to powered-off board. You could try to add diode there, but I'm not entirely sure, how programmer will deal with the diode voltage drop - it could assume, that voltage rail is at level insufficient for reliable operation and refuse to program.

As for putting a diode on power supply lines of each of boards, an LDO probably wouldn't hurt much and prevent current flow back into power rail.

  • \$\begingroup\$ The board has a 3v3 regulator. The 3v3 from the SWD seems to be going backwards through the regulator to the power rail. The voltage drop looks like a diode drop. Thanks everybody, I think this is answered. \$\endgroup\$
    – Colin C
    Dec 1, 2018 at 11:54
  • \$\begingroup\$ It is common practice to have an accepted answer to questions, which are actually resolved (for filtering and future finding of correct answer). If any of the answers provided satisfy you, pleas mark as accepted answer. Otherwise please write your own answer and accept that. \$\endgroup\$
    – stiebrs
    Dec 1, 2018 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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