pyOCD icon indicating copy to clipboard operation
pyOCD copied to clipboard

Error when trying to use the STLINK-V3PWR probe

Open INemesisI opened this issue 7 months ago • 2 comments

I get the following error when trying to list probes with a connected STLINK-V3PWR

> pyocd list -L 'pyocd.probe.*=debug' 
0000900 D   USB CMD> (16) f5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [usb]
0000900 D   USB IN < (req 2 bytes) [usb]
0000900 D   USB IN < (2) 01 04 [usb]
0000900 D   USB CMD> (16) f1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [usb]
0000900 D   USB IN < (req 6 bytes) [usb]
0000900 D   USB IN < (6) 40 00 83 04 57 37 [usb]
0000900 D   USB CMD> (16) fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [usb]
0000900 D   USB IN < (req 12 bytes) [usb]
0000900 D   USB IN < (12) 04 00 06 00 02 06 00 00 83 04 57 37 [usb]
0000900 D STLink probe 002C00243133511439303434 firmware version: V4J6M0 [stlink]
0000900 D   USB CMD> (16) f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [usb]
0000900 D   USB IN < (req 8 bytes) [usb]
0000900 D   USB IN < (8) 55 05 00 00 40 00 00 00 [usb]
0000900 D   USB CMD> (16) f5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [usb]
0000900 D   USB IN < (req 2 bytes) [usb]
0000900 D   USB IN < (2) 01 04 [usb]
0000900 C Error: 4 [__main__]

The same error message is also printed when trying to flash a target. Also, when I disconnect the probe from USB, the error message disappears.

I flashed the latest software version of the STLINKV3-PWR (V4J6B2P6) with the same result. However, interestingly enough, when I set the probe to update mode through the STLinkUpgrade tool, the probe is detected without errors:

> pyocd list -L 'pyocd.probe.*=debug' 
  #   Probe/Board    Unique ID                  Target
--------------------------------------------------------
  0   STLINK-V3PWR   002C00243133511439303434   n/a

It is not possible to flash any device in this state since the resource is busy, but maybe this gives some kind of hint as to what the source of the error is.

INemesisI avatar May 23 '25 18:05 INemesisI

@INemesisI, Thank you for reporting this issue. Could you please try using version v0.41.0 of pyOCD.

DavidLesnjak avatar Nov 12 '25 08:11 DavidLesnjak

Also note that all STLINKV3 have no implemented USB 2.0 enumeration. So if you use it over USB HUB or USB Isolator it may not work (red LED blinks slowly). I reported that, there is a community forum thread, they may fix is one day.

cederom avatar Nov 12 '25 14:11 cederom