cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK/V2 unable to program a custom board with STM32F446RCT7TR

fabocode
Associate II

Hello people,

The problem:

Is my first time working with a custom board and I have:

  • ST-LINK/V2 programmer
  • JTAG 20 PIN 0.1" TO 10 PIN 0.05" ADAPTER
  • Custom board with an STM32F446RCT7TR

I use the adapter to connect the ST-LINK/V2 to the programming port in the custom board.

What I do:

  • Connect the ST-LINK/V2 to the board
  • Connect the ST-LINK/V2 to the PC
  • Power on the custom board
  • Go to the STM32CubeProgrammer
  • Finally connect to the board

All I get is an error: No STM32 target found.

Attached is the configuration I'm using (I tried almost all of them)

12:47:06 : ST-LINK SN : 36FF6A064246363828481057
12:47:06 : ST-LINK FW : V2J37S7
12:47:06 : Voltage : 0.74V
12:47:06 : Error: No STM32 target found!
12:47:09 : ST-LINK SN : 36FF6A064246363828481057
12:47:09 : ST-LINK FW : V2J37S7
12:47:09 : Voltage : 0.83V
12:47:09 : Error: No STM32 target found!
12:47:13 : ST-LINK SN : 36FF6A064246363828481057
12:47:13 : ST-LINK FW : V2J37S7
12:47:13 : Voltage : 0.83V
12:47:13 : Error: No STM32 target found!

I had the feelling that the problem was my ST-LINK, but I used to test other STM32 development boards that I have (which do not have a port like the ST-LINK or the adapter) and it works perfectly if I connect the cables in SWD mode

VCC

SWDIO

SWCLK

GND

Do you know what exactly is the issue? I already ordered another ST-LINK/V2 to see if this could solve the issue.

I tested just only the 3v3 volts in the programming port from the custom board and it looks ok (it gives 3v3 for the programmer) so I am open to suggestions.

Thanks!!

8 REPLIES 8
TDK
Guru

> Voltage : 0.74V

You sure the power is okay? Looks like your board only has 0.74V, which of course is not enough.

Also note that "under reset" won't work unless you have NRST hooked up as well. But you don't necessarily need that.

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

Check voltage on Pin 1 or 2 of the 20-pin header. The external ST-LINK/V2 expects you to power its buffers.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
prain
Senior III

Also check VDDA pin voltage in your custom board. The VDD and VDDA should both be powered.​

fabocode
Associate II

Hi and thanks for your suggestions.

I could check that the custom board is getting an output of 3.3V when the ST-Link/v2 is disconnected, however, when I connect the ST-LINK/v2 with the adapter, the voltage drops to 0.3v - 0.6 (more or less the values that the STM32CubeProgrammer is showing in the log messages).

I also measure voltage in the ST-LINK/v2 while it was disconnected from the custom board, output was 1.57V, then it drops to the 0.3-0.6v when I connected to the custom board. Always checking pin 1 or pin 2 of the 20-pin header.

I have an STM32-Discovery board (32F429IDISCOVERY) which also have an ST-LINK/v2 embedded to the board so I detached the CN4 jumpers and connect the JTAG 20 PIN 0.1" TO 10 PIN 0.05" ADAPTER to it, then to the custom board, I measured voltage but here it was also low voltage values in the pins 1 and 2 from the 20-pin header. Here I only connected to VCC, SWDIO, SWCLK and GND. However, in the STM32CubeProgrammer, states that the voltage measured by the logs was of 2.90V...

At this moment it feels like the custom board is causing the problems. I have ordered another ST-LINK/V2 and if that tests fails, I will decide that the custom board is causing the issue...

At this moment, what do you think?

fabocode
Associate II

After flipping the SWD connector in the custom board, I was able to detect the board in the STM32CubeProgrammer (FINALLY!) but I have problems programming and erasing the chip.

And this is the setup in the CubeProgrammer:

Port: SWD

Frequency (kHz): 4000

Mode: Hot plug

Access Port: 0

Reset mode: Software Reset

Shared: Disabled

Firmware version: V2J29S7

Every time I try to erase the chip I get the following

16:30:10 : ST-LINK SN : 36FF6A064246363828481057
16:30:10 : ST-LINK FW : V2J29S7
16:30:10 : Voltage : 3.21V
16:30:10 : SWD freq : 4000 KHz
16:30:10 : Connect mode: Hot Plug
16:30:10 : Reset mode : Software reset
16:30:10 : Device ID : 0x421
16:30:11 : UPLOADING OPTION BYTES DATA ...
16:30:11 : Bank : 0x00
16:30:11 : Address : 0x40023c14
16:30:11 : Size : 4 Bytes
16:30:11 : UPLOADING ...
16:30:11 : Size : 1024 Bytes
16:30:11 : Address : 0x8000000
16:30:11 : Read progress:
16:30:11 : Data read successfully
16:30:11 : Time elapsed during the read operation is: 00:00:00.006
16:30:18 : MASS ERASE ...
16:30:18 : Error: Mass erase operation failed.Please verify flash protection
16:30:18 : Warning: Connection to device 0x421 is lost
16:30:19 : Warning: Connection to device 0x421 is lost
16:30:19 : Disconnected from device.
16:30:19 : Disconnected from device.

Do you know what could be the issue?

Flashing fails, I'd probably double check the supplies, and voltage / capacitors present on the VCAP pins.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
fabocode
Associate II

I tested the supplies, my custom board receives 12VDC and then is converted to 3.3V for the STM32. This is expected

Checked the supplies and I'm getting 3.3VDC in the SWD lines.

in VCAP_1 pin I measured 1.32 VDC.

Reviewed the STM32F446 datasheet but I am not actually understanding it well, but I guess the VCAP values are good.

However, I've found in the schematics that the VCAP uses a capacitor in my custom board:

GRM31CR61E476ME44L which looks like it is 47uF and it should be of 4.7uF . Not sure if this should be something interesting to look and if there is a way to solve the issue. 0693W000003PC47QAG.png

0693W000003PC42QAG.png

Is it possible damaged? I'm honestly getting without options.:sad_but_relieved_face:

>>Not sure if this should be something interesting to look and if there is a way to solve the issue.

Replace the capacitor(s) with appropriate value

>>Is it possible damaged? I'm honestly getting without options.

I don't think the wrong VCAP here will cause permanent damage.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..