‎2019-10-14 07:09 AM
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'
‎2020-05-17 02:01 PM
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) >>
‎2020-09-30 04:47 AM
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?
‎2020-09-30 05:01 AM
I'm sorry, I do not have a solution for that.
‎2020-09-30 05:14 AM
Might want to consider using authentic ST parts rather than GigaDevices clones.
‎2020-09-30 06:14 AM
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... ;).
‎2021-05-04 01:06 PM
Thanks for your answer PZwar, I was able to fix this problem :)
‎2023-12-19 03:06 PM
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.
‎2024-05-23 10:06 PM
Info : STLINK V2J44M29 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.189084
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x2ba01477
Info : [STM32F103C8Tx.cpu] Cortex-M3 r2p0 processor detected
Info : [STM32F103C8Tx.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for STM32F103C8Tx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
[STM32F103C8Tx.cpu] halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xfffffffe msp: 0xffffffd8
Info : device id = 0x20030410
Info : flash size = 128 KiB
shutdown command invoked
Info : dropped 'gdb' connection
[STM32F103C8Tx.cpu] halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xfffffffe msp: 0xffffffd8
facing this error in
could not verify the st device