cancel
Showing results for 
Search instead for 
Did you mean: 

J-Link Connection Issues with STM32H747 MCU on Custom PCBs

JonConesa
Associate III

 

Hello!

I just received some custom PCBs with the STM32H747BIT6 MCU, but I’m having trouble connecting to it. I’m using a J-Link V12 and initially tried to establish the connection with jlinkexe. It correctly detects the voltage, but when attempting to connect, I always get the following error:

 

 jlinkexe
SEGGER J-Link Commander V8.46 (Compiled Jun 26 2025 07:49:05)
DLL version V8.46, compiled Jun 26 2025 07:48:31

Connecting to J-Link via USB...O.K.
Firmware: J-Link V12 compiled Apr  1 2025 10:02:39
Hardware version: V12.00
J-Link uptime (since boot): 0d 00h 00m 44s
S/N: xxxxxxxxx
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
USB speed mode: High speed (480 MBit/s)
VTref=3.335V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: STM32H747BG_M7
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "STM32H747BG_M7" selected.


Connecting to target via SWD
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 190us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
Error: Failed to initialized DAP.
Can not attach to CPU. Trying connect under reset.
SWD selected. Executing JTAG -> SWD switching sequence.
Error: Failed to initialized DAP.
Connecting to CPU via connect under reset failed.
InitTarget() end - Took 309ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 34us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
Error: Failed to initialized DAP.
Can not attach to CPU. Trying connect under reset.
SWD selected. Executing JTAG -> SWD switching sequence.
Error: Failed to initialized DAP.
Connecting to CPU via connect under reset failed.
InitTarget() end - Took 311ms
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: https://kb.segger.com/J-Link_Troubleshooting

 

I also tried using STM32CubeProgrammer, but I couldn’t connect to the MCU either. However, this tool displays the following errors:

18:39:25 : STM32CubeProgrammer API v2.19.0 | MacOS-64Bits 
18:40:14 : UR connection mode is defined with the HWrst reset mode
18:40:40 : xxxxxxxxx
18:40:40 : Error: J-Link - Connection to target failed
18:40:40 : Error: Unable to get Access port number
18:40:40 : Voltage     : 3.34V
18:40:40 : Error: Database cannot be found. DatabasePath = /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/../Data_Base/STM32_Prog_DB_0xFFF.xml
18:40:41 : Error: flash loader cannot be loaded. FlashLoaderPath = /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/FlashLoader/0xFFF.stldr
18:40:41 : Error: Database cannot be found. DatabasePath = /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/../Data_Base/STM32_Prog_DB_0xFFF.xml

 

Do you know what might be causing this issue?

 

Find attached the schematics:

JonConesa_0-1751302063499.png

JonConesa_1-1751302101635.png

JonConesa_2-1751302121300.png

 

 

6 REPLIES 6
MHoll.2
Senior III

Please show all the MCU pin's (for example were are SWDIO / SWDCLK or the SMPS pins connected?).

The Power connecton is not what I'm expecting from a device with SMPS Power supply on chip. Please refer to the Reference Manual (RM0399) Capter 7.4 for Power connection possibilities.

p.s.: R17..R21 are 0R only two of them can be mounted, can you please tell us the mounted Resistors.

Andrew Neil
Super User

@JonConesa wrote:

using a J-Link V12 and initially tried to establish the connection with jlinkexe.


For specific help with Segger tools & software, ask Segger:

https://forum.segger.com/

https://www.segger.com/support/technical-support/

They have this on resolving connection issues:

https://kb.segger.com/J-Link_cannot_connect_to_the_CPU

 

And from ST:

https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

 

As @MHoll.2 suggests, it does also depend upon working hardware; see also Application note AN4938
 Getting started with STM32H74xI/G and STM32H75xI/G MCU hardware development

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hi,

Apologies for the earlier incomplete information. Please find the updated connections to the MCU attached for your reference.

JonConesa_0-1751353120619.png 

JonConesa_1-1751353137953.png

JonConesa_2-1751353159307.png

Regarding R17, R18, R19, and R21, only R18 and R19 are currently mounted.

 

OK, I have the following notes to Your schematic:

1) VDDLDO_1.. VDDLDO_3 should be connected together and supplied with a Voltage between 3.6V and 1.62V.

2) All three VCAP pins should be connected together (2 x 2.2uF is OK).

If the schematic is complete the main problem is the missing power on VDDLDO.

Hi @MHoll.2,

That seems to work! However, when I try to flash the MCU, specifically the M7 core, I’m no longer able to flash or connect to the device.

Do you know if there’s anything specific I need to do in order to perform the flashing correctly?

I’ve attached the flash configuration I’m currently using. For now, I’m only flashing the M7 core and ignoring the M4.

device STM32H747BG_M7
SelectInterface SWD
Speed 4000
erase

; Load application
loadfile Build/M7/STM32H747BIT6_CM7.hex

r
g
q

 

Unfortunatly I don't use / know the J-LINK Pod.

If You can connect to the Chip (read the CHIP ID etc) but can not write the flash, then this could be a power supply problem (the Chip will consume more power when programming the Flash).