I am programming a stm32 (2 wire SWD: SWDIO and SWCLK) series MCU with a st-link V2 i cut off a nucleo board. I usually just connect the 3V3 supply off of my arduino, but atm i am trying to make a box with the j link in it, and the 3V3 supply coming out of a SMPS. to be clear, rathen than powering the PCB up using its power ports, I just connect the Vcc net and Gnd net of the MCU on the pcb to my supply.

The error message mentions that the firmware could not restart the target MCU. However, when I connect my arduino back again, it works fine. This happens as soon as I connect my ST link to my PC, when it usually opens the device as a storage, but only this time with the mentioned error message.

This worked perfect with my arduino, but not with my SMPS. Is there a reason? might it be a current surge damaging the st-link?

  • 1
    \$\begingroup\$ I guess you mean "ST-Link" and not "J-Link". What does "not working" mean? Is it recognized as a USB device? Does the communication with the ST-Link fail? Does the communication with the MCU to be programmed failed? What's the error message? \$\endgroup\$
    – Codo
    Aug 3, 2020 at 13:10
  • \$\begingroup\$ @Codo Hi, thanks for the correction. it says the firmware could not restart the target MCU successfully and the PC does recognise it as a USB connection. when i disconnect my SMPS and connect my arduino, it continues to fucntion accordingly. \$\endgroup\$
    – NeuroEng
    Aug 3, 2020 at 13:17
  • \$\begingroup\$ Please better describe how you try to program the MCU (what software and/or commands you use) and post the exact error message. What do you mean with "Arduino"? The STM32 board? And is the firmware just unable to restart but the flash was programmed, or what is the state of the flash memory? \$\endgroup\$
    – Codo
    Aug 3, 2020 at 13:21
  • \$\begingroup\$ And if it is a "ST-Link" and not a "J-Link", please change the title and the tags. \$\endgroup\$
    – Codo
    Aug 3, 2020 at 13:22
  • \$\begingroup\$ @Codo, By arduino I meant the dev board for ATMega328p MCU (PDIP), it has a 3V3 regulator on there and I am using that. flash stays untouched. \$\endgroup\$
    – NeuroEng
    Aug 3, 2020 at 13:28


Your Answer

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