cancel
Showing results for 
Search instead for 
Did you mean: 

When "ST-LINK: Could not verify ST device!" error appears and what the mentioned verification process consists of? Can I influence verification process in STM32CubeIDE and how?

MSZ1
Associate II

I have STM32 MCU, which gives me "ST-LINK: Could not verify ST device!" in STM32CubeIDE whatever i do (trust me, i did a lot). ST-LINK Utility can connect to this MCU without any problem, so I wanted to ask for more information about the famous verification, which doesn't let me to debug the MCU. Thank you.

8 REPLIES 8

What STM32 part, specifically, are you trying to connect too?

OpenOCD has typically used the CPUTAPID to gate access to ST chips

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

STM32F103C8T6, BluePill. Tried change CPUTAPID in "STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.debug.openocd_1.3.0.202002181050\resources\openocd\st_scripts\target\stm32f1x.cfg" from 0x1ba01477 to 0x2ba01477, but it doesn't work this time. Tried also switch to OCD debug and comment "reset_config srst_only srst_nogate connect_assert_srst" statement without success. So, verification must be more complex process.. probably. Chip has ST logo and correct name (no CS32F1...).

Uwe Bonnes
Principal III

Does Stm32CubeProgrammer attach to the CPU. Try also connect under reset.

> Chip has ST logo and correct name (no CS32F1...).

Unfortunately, bluepills these days come often with counterfeited mcu, i.e. with one which has ST marking but the chip inside is not STM32.

https://www.eevblog.com/forum/microcontrollers/cheap-bluepill-very-likely-it-has-fake-stm32-right/

https://richis-lab.de/STM32.htm

Connecting under reset stalls the process for a while and fails as usual. Tried holding the reset for various periods, didn't help. I used connecting under reset to program other mcus many times, so I don't think I did something wrong.

MSZ1
Associate II

Is there any way to read CPUTAPID from MCU with st-link v2? I know it's possible with J-Link, but st-link? Where is this value stored?

Uwe Bonnes
Principal III

For the STM32 clone I have seen, the RomTable PIDR does not contain the designer 0x20 (STM) and Partno 0x410 but a generic arm 0x403 idicator for a M3 rom table.

Otherwise the core revision in AP IDR register is 2 while genuine parts only use revision 1. The Bl*ckm*g*c debugger in get gead now tell users about a possible non-genuine part.

MSZ1
Associate II

I was searching for chips looking similar to mine and I'm pretty sure it's not genuine.

My problem was not about any different cputapid than this changed to 0x2ba01477, but generally debug process, when using ST-LINK (OpenOCD).

It throws an error:

"embedded:startup.tcl:24: Error: target requires -dap parameter instead of -chain-position!",

no matter if st-link is connected to pc. Tried it also on STM32F030K6T6, which works great with ST-LINK (ST-LINK GDB server) option and the result is the same, but it's for another topic I think.

This is short explanation of, "why I had problems even with changed cputapid?", but I think this value is all verification process and it's causing "Could not verify ST device" error.

I'm still curious if I can change CPUTAPID if I use Run -> Debug conf. -> Debugger -> Debug probe set for ST-LINK (ST-LINK GDB server).