cancel
Showing results for 
Search instead for 
Did you mean: 

Programming when on external power (basic schematic ideas)

Mecanix
Senior

Hey folks

Just got on populating the passives and ICs on what would appear to be my first ever STM32 based controller (custom PCB). Quite successful and rather impressed with the end result although, perhaps, with the exception of being able to program (ST-Link) while external power is applied (learning harder than I thought lol).

Can someone please share a "basic" schematic that would allow for this be achieved. I understand that there are several Discovery board schematics however those shows rather complex circuits with jumpers all over & al. I'm just hoping to see if we have a far better, and "simple/r", approach to that.

Any brilliant ideas welcome, that would be kind and helpful. Thanks guys

15 REPLIES 15
TDK
Guru

The ST-Link programmer you have is not an official programmer. It's an even lower cost knock-off. But it probably works fine. I don't know if the 3V3 on your programmer is intended to power the board. I suspect it is. Whereas in the official programmers, the board needs to be self-powered. This is an important difference.

Try to only connect GND, SWDIO, and SWCLK. Official programmers also connect NRST but it is not strictly needed.

Here is a link with programmer schematic info:

http://www.keil.com/support/man/docs/ulinkplus/ulinkplus_jtagswd_interface.htm

If you feel a post has answered your question, please click "Accept as Solution".

Cheers Tim.

Fair enough. Should have posted that '3rd party' programmer I was using initially, my bad. I'll see if I can get my hands on a ULINKplus locally or if not I'll crack on and get that official ST-Link V3 bundle on order. ps. that little programmer's 3V3 output is indeed to power-on the board, my understanding anyway. They do emit a rather fancy strobe effect when powered + eternally! hrr:/

Thanks for linking me up to the right stuff Tim, appreciate it.

TDK
Guru

You're welcome.

If you want to transition to a real programmer, if you're putting a programming port on the board, the ST-Link V3 Mini is nice and cheap ($10). Seems to be out of stock a lot now, but that will change. It provides a VCP interface as well as the SWD programming interface which is useful for debugging.

https://www.st.com/en/development-tools/stlink-v3mini.html

Good luck.

If you feel a post has answered your question, please click "Accept as Solution".

Here's its other side. It is supposedly The Best In The World programmer a fully loaded $3.49 can buy today. While at the supplier's shop and when asked; "Tool Me Up for STM32", I was given this only choice, quoting "you will never need more than that, it does it all" (lol) aka the SWO option the supplier referenced, I believe.

Lesson learnt; let me get this fixed up right away, I'll order the right kit for the job(s). Thanks for pointing me in the right direction.

0693W000000WnqjQAC.jpg

Piranha
Chief II

> that little programmer's 3V3 output is indeed to power-on the board

I highly doubt that, as it's only voltage regulator is U2, which is not be able to provide any decent amount of spare current for an additional board.

SEGGER J-Link EDU Mini is another great debugger. But ST's Nucleo boards also have a header for programming other boards and can be reflashed to (and back) J-Link firmware to use SEGGER's software.

Ah those micro SOT-23 LDOs! Good for up to 250mA, the Chinese claims they are good for up to 5A if you buy 50,000 reels, ofc (jjk).

Served quite well at the breadboard stage to power up that prototype MCU, a debug LED and to start-up crystals type thing. It will also power up a 240X320 with 4x 20mA backlight LED without any significant temp change or anything major. Go figure. If only it could coexist an external supply it would be great but sadly that lil F1 poly stobes pretty quick when you do :\

Anyway, already ordered both kits; one of those V3mini and that V3Set. Thanks for the SEGGER recommendation, I'll have a look for sure :thumbs_up: