cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L031G6 + ST Link V2 - Target held under reset

GPufl.1
Associate II

Hi,

I have pretty simple design with STM32L031 MCU without external crystal, and when I try to program it I got "Target held under rese" error.

I use STM32CubeID V 1.5.1 Build: 9029_20201210_1234 (UTC) with STLink V2 debugger.

Schematic

Logs:

STLINK GDB

STMicroelectronics ST-LINK GDB server. Version 5.7.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    Logging Level       : 1

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Disabled

    SWD Debug         : Enabled

    InitWhile         : Enabled

Target Held under Reset

Error in initializing ST-LINK device.

Reason: Target held under reset.

OpenOCD log

Open On-Chip Debugger 0.10.0+dev-01288-g7491fb4 (2020-10-27-17:36)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748

Info : Target voltage: 3.215779

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : Unable to match requested speed 8000 kHz, using 4000 kHz

Info : clock speed 4000 kHz

Info : stlink_dap_op_connect(connect)

Info : SWD DPIDR 0x0bc11477

Info : STM32L031G6Ux.cpu: hardware has 4 breakpoints, 2 watchpoints

Info : STM32L031G6Ux.cpu: external reset detected

Info : starting gdb server for STM32L031G6Ux.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : accepting 'gdb' connection on tcp/3333

Error: timed out while waiting for target halted

Error executing event gdb-attach on target STM32L031G6Ux.cpu:

TARGET: STM32L031G6Ux.cpu - Not halted

Error: Cannot identify target as an STM32 L0 or L1 family device.

Error: auto_probe failed

Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.

Error: attempted 'gdb' connection rejected

Any suggestions?

I know that I made some mistake, but I could not find where :)

regards

Goran

1 ACCEPTED SOLUTION

Accepted Solutions

Don't pull NRST low.

Typically you pull High, or leave floating, with perhaps a capacitor to ground to keep it lower slightly long during reset.​

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

View solution in original post

5 REPLIES 5

Not seeing an schematic.

Check you power VDDA​

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

I forgot to attach it. Here it is.

Don't pull NRST low.

Typically you pull High, or leave floating, with perhaps a capacitor to ground to keep it lower slightly long during reset.​

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

OK, THX, I'll try it. I will remove res and leave it floated.

THX

Goran

GPufl.1
Associate II

this worked,

THX

Goran