cancel
Showing results for 
Search instead for 
Did you mean: 

Error: init mode failed (unable to connect to the target)

Paulo1114
Associate

Hey I recently Got Into Programming An 

Nucleo-64, ARM Cortex M4, STM32 L476-Serie

 

And I sucessfully created My First Code In The STM32 IDE.

 

I get this annoying Error when Trying To Flash :

 

I tried so many Things Already Its Driving me crazy, Help Is Appreciated ...

 

The Things I tried : Connecting PIN7 on CN7 to + 3,3V and trying to get It run In Boot Mode (Was not Able To achieve this). When I do it I hold RESET and plug the USB in and release the button.

- STM32 Utility doesn't let me Erease.

-STM32 Programmer not running on my Computer I have to work with IDE / Cube

 

Tried Jumpers on the SWD (CN4) also didn't work.

 

It actuallys Detects the ST Link but still somehow Its struggeling to find a proper Connection.

 

Open On-Chip Debugger 0.12.0+dev-00608-gd8ed48fef (2025-02-06-11:17) [https://github.com/STMicroelectronics/OpenOCD]

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 V2J46M31 (API v2) VID:PID 0483:374B

Info : Target voltage: 3.252528

Error: init mode failed (unable to connect to the target)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

> Only CN7 And CN10 are connected With The Bread-Board.

This is the problem. Arbitrarily shorting pins to the one beside it is not good. Note that CN9 and CN10 share connections and that some 5V power pins are on there.

In particular, connecting AVDD and U5V is likely to kill the chip but maybe you'll get lucky.

TDK_0-1748795281253.png

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

View solution in original post

7 REPLIES 7
TDK
Super User

Should just work. CN2 jumpers need to be installed. CN4 should be empty. JP5 should be on U5V.

Did it ever work?

Is the only cable connected the USB?

Is it on a non-conductive surface?

 

Using STM32CubeProgrammer to connect is best. ST-Link Utility has been deprecated for many years.

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

https://drive.google.com/file/d/1fqB971wlAE_4BSs4LFAeM_aKSuGKnFA7/view?usp=sharing

 

Heres A Screenshot Of the Jumpers. The STM32 Is on Breadboard.

- It Did Never Work for Me.

- It's First Time Flashing A Code (That's what Not Working)

- The Only Connected Cable Is the USB (3,3V) .

- The Surface Which Everything Is on Should be Fine :)

- JP5 on U5V.

- CN4 Is now Empty.

- CN7 has NO i/o's.

 

---

 

Error Mesagge when I press "RUN" :

 

Error in final launch sequence:

 

Failed to execute MI command:

target extended-remote localhost:3333

 

Error message from debugger back end:

localhost:3333: Connection timed out.

Failed to execute MI command:

target extended-remote localhost:3333

 

Error message from debugger back end:

localhost:3333: Connection timed out.

localhost:3333: Connection timed out.

 

When Installing Cube Prorgrammer It Tells me Java Run Time Enviroment Error.

I updated The Jave Yeserday but Still I cant Install Cube Programmer

TDK_0-1748789269181.png

 

Like, plugged into the breadboard? Definitely don't want that. That can certainly damage things as rows of a breadboard are connected. Could have already killed it.

I'd place it on a nonconductive surface, by itself, only hooked up only to the USB cable.

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

Hi Dude hope you are doing Well :)

 

thanks for the fast Response.

 

 

 

CN9 And CN8 is Not connected With The Bread-Board.

 

Only CN7 And CN10 are connected With The Bread-Board.

 

So It will definetly Not Damage Anything !

 

 

 

Im Not Sure how placing it on a non Conductive surface is going To Help me With The Bug.

 

 

 

Looking Forward for your answer.

 

 

PS: I will place IT on my wooden table and Test It :)

Maybe you are right and some little Things are interfering With the STM32 resulting in being unable to flash.

> Only CN7 And CN10 are connected With The Bread-Board.

This is the problem. Arbitrarily shorting pins to the one beside it is not good. Note that CN9 and CN10 share connections and that some 5V power pins are on there.

In particular, connecting AVDD and U5V is likely to kill the chip but maybe you'll get lucky.

TDK_0-1748795281253.png

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

Lmfao I am ***ing retarted It's now doing something. It's still red text but One Step Further! Hell Yeah I think the Chip is still Alive Thank God phewwwww....

 

I understand your Point now. This Is my very first build :D

Im wanna use a few Encoder with RRPROM to control VCF and VCO on TL072 Op AMP oscillators.

Also Little Overdrive + Waveshaping Feature for some Gritty Sound Texture. (with Screen LMFAO)

 

The Oscillators were working at my project :D But Controlling and Programming a STM32 Is another Thing.

This New World seems very interesting.

 

I am very thankfully that this Community exists.

Thanks, You Made My Day Sir! I will mark thread as complete soon if this is possible.

Have a Lovely Day.