cancel
Showing results for 
Search instead for 
Did you mean: 

How to deal wirh : Could not verify ST device! ?

PZwar
Associate II

Dear all,

Could not verify ST device!

This error popped up suddenly and blocks any progress. I took an older computer and had the same error again.

Therefore, I suspected a hardware failure and ordered new adapters and processor boards, but I kept having the same error again.

I have upgraded the STM32CubeIDE, the st-link drivers (dpinst_amd64.exe) and st-stlink-server(st-stlink-server.1.1.1-3.msi).

The st_link v2 adapter have been upgraded with the latest firmware.

Using STM32 Link Utility, I was able to program, verify and run blink applications.

I am using BluePills (STM32F103C8) with chinese adapters on a 64 bit Windows 10 machine.

Please find below the output produced when starting debugging in STM2CubeIDE using the GDB server in SWD mode.

I also selected the OPENOCD debugger, but it also failed, though in a different way.(see below)

Does anyone have a suggestion how to proceed on this?

Cheers, Paul

..........................ST-LINK GDB server.....................

STMicroelectronics ST-LINK GDB server. Version 5.2.3

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

Starting server with the following options:

    Persistent Mode      : Disabled

    LogFile Name        : C:\Users\Paul_2\Documents\STM32\Workspace\test\Debug\st-link_gdbserver_log.txt

    Logging Level       : 31

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Enabled

    SWD Debug         : Enabled

Hardware watchpoint supported by the target 

SWD frequency = 4000 kHz

ST-LINK Firmware version : V2J31S7

Device ID: 0x410

PC: 0xc6640804

ST-LINK device status: HALT_MODE

ST-LINK detects target voltage = 3.17 V

Vendor = 0x55 

Error in initializing ST-LINK device.

Reason: ST-LINK: Could not verify ST device! Abort connection.

......................OPENOCD.........................................

Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-23-20:37)

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

adapter speed: 8000 kHz

adapter_nsrst_delay: 100

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : clock speed 8000 kHz

Info : STLINK v2 JTAG v31 API v2 SWIM v7 VID 0x0483 PID 0x3748

Info : using stlink api v2

Info : Target voltage: 3.166882

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

Info : Stlink adapter speed set to 4000 kHz

Warn : UNEXPECTED idcode: 0x2ba01477

Error: expected 1 of 1: 0x1ba01477

in procedure 'init' 

in procedure 'ocd_bouncer'

16 REPLIES 16

Hi SWadi.1,

Good idea. I would like to know if it works for the original.

Not easy to find a blue pill with genuine STM32 these days. Where did you buy yours?

Fyi, Another way to do the same thing. (If you prefer not to tamper with the aforementioned command line) >>

  • Leave the command line as it was
  • Instead, add the following near the top of stm32f1x.cfg (before the first If – statement):
  • set CPUTAPID 0
PGroe.2
Associate III

So you tweaked the config files for the openocd server, but what if I want to use the ST-Link GDB Server and not Openocd?

PZwar
Associate II

I'm sorry, I do not have a solution for that.

Might want to consider using authentic ST parts rather than GigaDevices clones.

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

Luckily I also ordered some replacement STM32F103 MCU's and soldered them onto the blue pill. They seem to have a correct vendor id and work with CubeIDE... 😉.

Thanks for your answer PZwar, I was able to fix this problem 🙂

Douglas MILLER
ST Employee

This forum thread was marked by the moderator as needing a little more investigation, so a Support case was created in your name and will be handled off-line.