Skip to main content
Visitor II
March 14, 2025
Question

Nucleo-64 ST-LINK Fails with External PCB (But Works with ST-LINK V2)

  • March 14, 2025
  • 2 replies
  • 722 views

Hello,

I previously used ST-LINK V2, which worked fine, but due to its lack of a Virtual COM Port (VCP), I recently purchased a NUCLEO-64 (STM32F030R8 EVAL BRD) to program my own PCB using its ST-LINK.

The Nucleo board itself works fine, but when I try to use its ST-LINK to program my own PCB (using STM32G030F6P6TR), I encounter issues despite following the manual:

What I Have Done:

  • Removed CN2 jumpers to enable external debugging.
  • Wired ST-LINK (CN4) to my PCB:
    • VDD_TARGET → My PCB’s 3.3V
    • GND → Shared with Nucleo
    • SWCLK → My PCB's SWCLK
    • SWDIO → My PCB's SWDIO
  • Powered my PCB with an external 3.3V source.

What Happens:

  • Without external power: STM32CubeProgrammer does not connect.
  • With external power: CubeProgrammer connects but disconnects after ~10 seconds, then crashes.

I have been troubleshooting this for days but found very few resources on using a Nucleo board's ST-LINK for external programming.

As mentioned, the Nucleo board itself works fine, and my PCB works with ST-LINK V2, but not with this Nucleo ST-LINK.

Do you have any insights on why this might be happening?

    This topic has been closed for replies.

    2 replies

    Super User
    March 15, 2025

    > Without external power: STM32CubeProgrammer does not connect.

    This is expected as CN4 does not provide power.

    > With external power: CubeProgrammer connects but disconnects after ~10 seconds, then crashes.

    Any error messages? Does lowering the speed help? Updated ST-Link firmware?

    Ground loops could always cause an issue. Can you power it from the nucleo board and see if that changes things?

    Manowi25Author
    Visitor II
    March 15, 2025

    Hello,

    Thank you for your comment.

    Yeah, I tried all kinds of things, including updating the firmware...

    Strangely, I connected the Nucleo board to another STM32 dev board, and it worked. Then, I reconnected the Nucleo back to my custom PCB, and it worked halfway—it stopped crashing but still couldn't be programmed. After that, I connected my second custom PCB (which is exactly the same as the original one I was working on), and it worked. Then, when I reconnected my original PCB, it started working as well...

    I really don’t know what’s happening, but now I can program. However, USART still doesn’t work. Maybe I need to snap the ST-Link part to use USART on my custom PCB, perhaps...

    Super User
    March 15, 2025

    Probably a bad solder joint somewhere or other manufacturing issue. Could also be a design issue.

    Technical Moderator
    March 16, 2025

    Dear @Manowi25 ,

    Can you share your target MCU part and good resolution photo  soldered on the PCB ? 
    Ciao

    STOne-32