cancel
Showing results for 
Search instead for 
Did you mean: 

Using ST-LINK_gdbserver with STM32H7 without hardware reset

JojoS
Associate III

I'm using VSCode/Debug-Cortex with STLink V3Mini. The target is a board with STM32H743VI and SWD. The board has only basic swd with GND, 3V3, SWDIO, SWCLK. There is no reset line, unfortunately also not on other headers.

When I start debugging, the debug probe connects and loads some stub to flash. After that, it tries to reset again, but this fails. It works only when I solder connect a reset line and cube programmer can perform a connect under reset.

STMicroelectronics ST-LINK GDB server. Version 5.8.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 31
        Listen Port Number         : 50000
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
 
Target connection mode: Default
Reading ROM table for AP 0 @0xe00fefd0
Hardware watchpoint supported by the target 
COM frequency = 24000 kHz
ST-LINK Firmware version : V3J7M2
Device ID: 0x450
PC: 0x80037fc
ST-LINK device status: HALT_MODE
ST-LINK detects target voltage = 3.29 V
ST-LINK device status: HALT_MODE
ST-LINK device initialization OK
Waiting for debugger connection...
Waiting for connection on port 50000...
Accepted connection on port 50000...
Debugger connected
Enter STM32_AppReset() function 
NVIC_DFSR_REG = 0x0000000B
NVIC_CFGFSR_REG = 0x00000000
 ------ Switching to STM32CubeProgrammer ----- 
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.8.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 004900313137510B33333639
ST-LINK FW  : V3J7M2
Board       : STLINK-V3MINI
Voltage     : 3.29V
SWD freq    : 24000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size  : 2 MBytes
Device type : MCU
Device CPU  : Cortex-M7
BL Version  : 0x90
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a16228.srec
  File          : ST-LINK_GDB_server_a16228.srec
  Size          : 40704 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:00.988
 ------ Switching context ----- 
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
Target no device found

is it possible to connect also in normal mode, without reset line?

This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Uwe Bonnes
Principal III

For an off board connection, try to lower "COM frequency = 24000 kHz" or provide substantial more ground connections.

JojoS
Associate III

thanks Uwe,

flashing and debugging works reliable, its only the reset line. When I tried the connection in the command line, I could see also that STM32CubeProgrammer tries to connect with lower speed by itself.

The problem is almost cosmetic, the extra wire is not looking nice. And its for my curiosity.