cancel
Showing results for 
Search instead for 
Did you mean: 

how to resolve the error of wrong device detected in sw4stm32 using JTAG communication.

Namita
Associate II

I wanted to program custom stm32l496retg MCU Board from stm32l496zg nucleo board .i used sw4stm32 IDE to program the MCU custom Board.Removed two jumpers of CN4.But  getting Wrong device detected

0693W00000Nq5Z2QAJ.png Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48)

 Licensed under GNU GPL v2

 For bug reports, read

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

 srst_only separate srst_nogate srst_open_drain connect_assert_srst

 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

 padded zone erase set to 1

 adapter speed: 480 kHz

 adapter_nsrst_delay: 100

 Info : clock speed 480 kHz

 Info : STLINK v2.1 JTAG v39 API v2 M27 VID 0x0483 PID 0x374B

 Info : using stlink api v2

 Info : Target voltage: 3.227207

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

 in procedure 'program' 

 in procedure 'init' called at file "embedded:startup.tcl", line 495

 in procedure 'ocd_bouncer'

 ** OpenOCD init failed **

 shutdown command invoked

1 ACCEPTED SOLUTION

Accepted Solutions

OP said "Wrong device detected".

If it's detecting nothing at all, check connections.

Is the Target properly powered?

You said "custom stm32l496retg MCU Board" - is the board known to be working?

Have you tried with a standalone ST-Link (or other debug probe)?

View solution in original post

7 REPLIES 7
Namita
Associate II

We also tried to program custom board by ST-Link-Utility tool.but wrong device detected message occurs and failed to program the custom board.

Always good to mention full information in the opening post!

So what device is it detecting?

Perhaps it's still detecting the stm32l496zg on the nucleo board ... ?

Namita
Associate II

0693W00000Nq5rkQAB.pngNo device is detecting .Ref attached image .We also removed the jumpers cn4 on nucleo board to program custom board and as per shown image also change the connect under reset mode and make swd frequency to 480 KHz

OP said "Wrong device detected".

If it's detecting nothing at all, check connections.

Is the Target properly powered?

You said "custom stm32l496retg MCU Board" - is the board known to be working?

Have you tried with a standalone ST-Link (or other debug probe)?

Namita
Associate II

Its working Now.It was Hardware problem

Good to hear - please mark the solution:

0693W000008y9fZQAQ.png 

(I got a Notification saying a 'Best Answer' had been given, but it doesn't seem to be showing on the forum?)

EDIT: Done now. :thumbs_up: