cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 - connect ST-Link without RESET

Posted on October 14, 2016 at 04:55

I have an issue with a custom board using an STM32F427 that only shows up when I run outside the debugger.  I've done some searching without any luck - is there a way to get TrueSTUDIO (or any other debug environment) to connect to a running board without issuing a RESET?

I'm running TrueSTUDIO v6 connecting to the target using the ST-Link v2 in SWD mode.

I've tried pre-starting the GDB_server in ''presistant mode'' and connecting to the ''remote'' GDB server from TrueSTUDIO ..  but, when starting gdb_server, I get see:

C:\Program Files (x86)\Atollic\TrueSTUDIO for ARM 6.0.0\Servers\ST-LINK_gdbserver>ST-LINK_gdbserver.bat

Atollic TrueSTUDIO gdbserver for ST-Link.  Version 2.4.3 Pro

 

Copyright 2010-2016, Atollic AB.

Starting server with the following options:

 

        Persistant Mode            : Enabled

 

        LogFile Name               : debug.log

 

        Logging Level              : 31

 

        Listen Port Number         : 61234

 

        Status Refresh Delay       : 15s

 

        Verbose Mode               : Enabled

 

        SWD Debug                  : Enabled

Connecting to the ST-Link Debugger...Enter STM32_AppReset() function

 

NVIC_DFSR_REG   = 0x00000009

 

NVIC_CFGFSR_REG = 0x00000000

 

XPSR = 0x01000000

 

ST_LINK Major version =2 Jtag version =25

 

ST_LINK VID=1155 PID=14152

 

ST_LINK device status: HALT_MODE

 

ST_LINK detects target voltage =3.21 Volt

 

Hardware watchpoint supported by the target

 

FuncEntry

 

STM32 device: id =20016419

 

STM32 device: Flash size =2048

 

FuncExit

 

FuncEntry

 

FuncExit

 

 OK

 

Start Logging

 

Waiting for debugger connection...Waiting for TrueSTUDIO client to connect on port 61234 ...

I'm guessing that the ''Enter STM32_AppReset() function'' is probably what's doing it.

3 REPLIES 3
Walid FTITI_O
Senior II
Posted on October 14, 2016 at 18:49

Hi kelly.andrew.001, 

Try to update the ST-Link firmware to version V2-1 from the ST-Link utility (firmware update) or from this

http://www.st.com/en/embedded-software/stsw-link009.html

.

-Hannibal-

Posted on October 17, 2016 at 00:16

Thanks Hannibal.

When I checked from ST-Link, there was  a firmware update available .. so I updated.

No change though unfortunately, I'm still unable to connect without the target being RESET :(

Posted on October 17, 2016 at 02:05

Ok, well issues and setting with Atollic's ST-LINK GDB driver really need to be dealt with by Atollic and their support/settings. Disconnect the reset pin, try a J-LINK.

There might be a way to post-mortem a SWD connection, but there are better ways to pin these issues down.

Have a USART connection, output telemetry, and have an effective Hard Fault Handler. Understand where you code is failing, the flow that got it there and where it might be crashing.

The debugger configures the hardware it needs, make sure you enable the clocks you need.

Describe the failure as currently seen.

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