cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] ST-LINK V2 Connection Issue with Custom Boards

USolar
Associate III

Hi,

I designed and tried to use my custom board based on STM32F030R8T6 MCU. But the problem started from beginning.

For MCU Flashing I used STM32CubeProgrammer and ST-LINK V2 (STM8 & STM32) dongle. 

First of all I was trying to connect the board and I've got "No STM32 target found!" Error.

0693W00000Uo4RzQAJ.pngSecond, after NRST Reset button was pressed (this option I considered on my board) and STM32CubeProgrammer Connect pressing, releasing NRST Reset button I succeeded to connect the MCU.

0693W00000Uo4S9QAJ.pngAfter that, I've erased the chip completely and tried to flash my bin file. But I've got errors reg., Connection to device is lost.

There are two errors in the log list: "Unable to read device id from ROM table" and "Unable to get core ID".

0693W00000Uo4SJQAZ.pngI thought it was problem with board soldering and used another board. But the same issue was with second board as well.

Is there any solution how to rectify the above problem? Did anybody has such issue on custom boards?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Ok then from your first image i see coe is flashed ok and connection is dropped after run app. This is normal if your code use power down modes as STOP or STANDBY, here too NRST line is required.

View solution in original post

8 REPLIES 8
KDJEM.1
ST Employee

Hi @USolar​,

I advise you to refer to this FAQ: How to solve debugger connection issues.

Try "Connect under reset" mode.

Maybe that issue is linked to the ST-Link firmware version.

So, try to upgrade the ST-Link firmware version, then disconnect and connect your board.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

USolar
Associate III

KDJEM.1 (ST Employee), thank you for reply.

I passed through offered above FAQ Section in the beginning of my issue.

I can connect only when Reset button on board (MCU's NRST pin to GND) is pressed.

After such connection It is able to make Mass Chip erase as well.

But, during flashing, the flash proceess has interrupted and connection to the MCU was lost.

Iwan

ONadr.1
Senior III

Send your PCB design or picture. Problem can be in power supply too. Try to measure noise in power suply lines by osciloscope.

MM..1
Chief II

Seems your code use pins for SWD interface. No problem, but for reprogram this situatio code, STLink need control NRST pn with wire 4. Normal SWD need GND DATA and CLOCK only.

Dongle from china dont have connected NRST need customize ...

Below is the Schematic of the Power module for my PCB.

0693W00000Uo7LfQAJ.pngAlso, I measured the Power lines with an Oscilloscope, which showed 3.14VDC.

0693W00000Uo7LkQAJ.pngThe board has a supply from the dongle during flashing.

MM..1 (Community Member) thank you for your reply.

I don't use the pins for SWD Interface.

Below, is the MCU Pinout view for the Test flashing.

0693W00000Uo7MJQAZ.png

Ok then from your first image i see coe is flashed ok and connection is dropped after run app. This is normal if your code use power down modes as STOP or STANDBY, here too NRST line is required.

USolar
Associate III

I found the issue's reason.

As I said, this is my first Custom board.

I did a mistake in the design of the PCB, didn't connect the BOOOT0 pin to the GND via a 10k resistor.

So, I solder a 10k resistor to the BOOT0 pin and gnd and the problem disappeared.

Now, I can flash, and read the MCU without the Reset button pressing.

Thanks to everyone for your help.