2024-01-30 09:07 AM
Hi everyone,
I've been programming with various ST-LINK V2s for over a year now and have almost never had any problems.
A few days ago I started to encounter problems: that is, the various compilers and two STM32 programs to see the memory of the MCUs give me different errors, but with the STM32 compiler I received a new one "No ST-LINK with the specified serial number detected! Please connect ST-LINK and restart the debug session".
I tried restarting the computer, changing the serial port to which the ST-LINK was connected, changing ST_LINK, changing the cable but nothing, I'm always getting the same error.
What should I do?
Thanks for your availability and have a good time
Solved! Go to Solution.
2024-01-30 09:24 AM - edited 2024-01-30 09:30 AM
@FranzCreva wrote:with the STM32 compiler I received a new one "No ST-LINK with the specified serial number detected!
That's not the compiler - that's the debugger.
Sounds like you've set your Debug Configuration to require a specific ST-Link with a particular serial number:
That means that it will refuse to connect using any other ST-Link.
If that's not the behaviour you want, then uncheck the 'ST-LINK S/N' box.
Addendum:
If you do want to keep it so that it will only ever connect to one specific ST-Link, but want to use a different ST-Link (ie, different serial number), then use the 'Scan' button and select the serial number of the ST-Link you wish to use.
2024-01-30 09:16 AM
Check with STM32 Cube Programmer, show screen there.
The ST-LINK's won't share well, so if open in another context or application they might not be available to other applications. Disconnect from Cube Programmer to release.
On Keil systems I often have to navigate into the Options and debugger settings to re-associate with the correct ST-LINK to the active project, as I often have multiple attached, and change boards around, change computers or have multiple instances open.
ST has also cracked down on counterfeit and bootleg ST-LINK devices, so watch that for being an issue
2024-01-30 09:24 AM - edited 2024-01-30 09:30 AM
@FranzCreva wrote:with the STM32 compiler I received a new one "No ST-LINK with the specified serial number detected!
That's not the compiler - that's the debugger.
Sounds like you've set your Debug Configuration to require a specific ST-Link with a particular serial number:
That means that it will refuse to connect using any other ST-Link.
If that's not the behaviour you want, then uncheck the 'ST-LINK S/N' box.
Addendum:
If you do want to keep it so that it will only ever connect to one specific ST-Link, but want to use a different ST-Link (ie, different serial number), then use the 'Scan' button and select the serial number of the ST-Link you wish to use.
2024-02-04 11:27 PM
Hi DeLorean,
The error I receive via STM32CubeProgrammer is the following: DEV_USB_COM_ERR.
I opened the program, I saw that ST-LINK was already selected and I tried to Connect to the device, but I received the first error.
I then disconnected the ST-LINK to the MCU and tried to refresh the ST-LINK list and it detected that there was no ST-LINK connected. Tried unplugging the USB and plugging it back in but nothing worked. This a couple of times.
After a while it detected the ST-LINK, I tried to connect to the MCU and it gave me the same error.
The ST-LINK is not seen by any program, not even the old STM32 ST-LINK Utility.
They always worked before
2024-02-04 11:39 PM
You're totally right @Andrew Neil, I was hoping that the error that the STM32 Cube IDE was giving me was consistent with the errors that the other programs were giving me.
I unchecked the 'ST-LINK Y/N' item and the ST-LINk was seen.
I tried to upgrade the ST-LINK and it was seen by all programs.
How come @Tesla DeLorean? If I hadn't updated it would never have been seen properly again?
2024-02-05 12:34 AM
One thing I have now noticed is the fact that on STM32 Cube Programmer I get the Data Read Failed error when the MCU has active protection, while the STM32 ST-LINK Utility gives me the correct message.
It is incorrect for the STM32 Cube Programmer to indicate an error, correct?
2024-02-05 01:04 AM
Try setting verbosity : 3
2024-02-05 01:46 AM - edited 2024-02-05 01:48 AM
This is what I get:
10:47:40:990 : STLinkUSBDriver.dll loaded
10:47:40:992 : STLinkUSBDriver.dll loaded
10:47:40:992 : ST-LINK SN : 38FF6F06304E4B3042112543
10:47:40:992 : ST-LINK FW : V2J38S7
10:47:40:993 : Board : --
10:47:40:996 : Voltage : 3.20V
10:47:41:010 : SWD freq : 1800 KHz
10:47:41:010 : Connect mode: Under Reset
10:47:41:011 : Reset mode : Hardware reset
10:47:41:012 : Device ID : 0x447
10:47:41:019 : Revision ID : Rev Z
10:47:41:036 : Reading data...
10:47:41:036 : r ap 0 @0x4002201C 0x00000004 bytes Data 0x803B0000
10:47:41:036 : Reading data...
10:47:41:036 : r ap 0 @0x1FF8007C 0x00000004 bytes Data 0x038800C0
10:47:41:037 : Reading data...
10:47:41:042 : r ap 0 @0x4002201C 0x00000004 bytes Data 0x803B0000
10:47:41:042 : Reading data...
10:47:41:045 : r ap 0 @0x4002201C 0x00000004 bytes Data 0x803B0000
10:47:41:045 : Database: Config 2 is active.
10:47:41:055 : flash loader C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/FlashLoader/0x447.stldr is loaded
10:47:41:058 : Reading data...
10:47:41:061 : r ap 0 @0x1FF8007C 0x00000004 bytes Data 0x038800C0
10:47:41:325 : UPLOADING OPTION BYTES DATA ...
10:47:41:325 : Bank : 0x00
10:47:41:325 : Address : 0x4002201c
10:47:41:325 : Size : 104 Bytes
10:47:41:325 : Reading data...
10:47:41:326 : r ap 0 @0x4002201C 0x00000068 bytes Data 0x803B0000
10:47:41:326 : Bank : 0x01
10:47:41:326 : Address : 0x1ff80000
10:47:41:327 : Size : 20 Bytes
10:47:41:327 : Reading data...
10:47:41:327 : r ap 0 @0x1FF80000 0x00000014 bytes Data 0xFFFF0000
10:47:41:328 : UPLOADING OPTION BYTES DATA ...
10:47:41:328 : Bank : 0x00
10:47:41:328 : Address : 0x4002201c
10:47:41:328 : Size : 104 Bytes
10:47:41:329 : Reading data...
10:47:41:329 : r ap 0 @0x4002201C 0x00000068 bytes Data 0x803B0000
10:47:41:329 : Bank : 0x01
10:47:41:329 : Address : 0x1ff80000
10:47:41:329 : Size : 20 Bytes
10:47:41:330 : Reading data...
10:47:41:330 : r ap 0 @0x1FF80000 0x00000014 bytes Data 0xFFFF0000
10:47:41:330 : UPLOADING ...
10:47:41:330 : Size : 1024 Bytes
10:47:41:330 : Address : 0x8000000
10:47:41:330 : Read progress:
10:47:41:332 : Reading data...
10:47:41:332 : r ap 0 @0x08000000 0x00000400 bytes Data 0x20086447
10:47:41:332 : Error: Data read failed