ST-LINK/V2 showing wrong serial number in STM32CubeProgrammer
Hi,
I am using ST-LINK/V2 to flash my boards. My issue is that when I tried to flash the boards using OpenOCD, I am getting the error "No device matches the serial string". So I checked ST-Link/V2 serial number using STM32CubeProgrammer, it showed me a 12 byte value. If I used that serial number I am getting the same error.
OpenOCD version: Open On-Chip Debugger 0.10.0
STM32CubeProgrammer Version: 2.14.0
ST-LINK/V2 Firmware: V2J42S7
I also found a work around for this issue by replacing the serial number byte1, byte5 and byte11 with 3F values. I tried with multiple ST-Links and this work around is working.
| Serial Number from STM32CubeProgrammer |
| byte 0 | byte 1 | byte 2 | byte 3 | byte 4 | byte 5 | byte 6 | byte 7 | byte 8 | byte 9 | byte 10 | byte 11 |
| 49 | FF | 68 | 6 | 66 | 84 | 56 | 57 | 31 | 36 | 13 | 87 |
The Red Highlighted bytes need to be changed to 3F
| Fixed Serial Number |
| byte 0 | byte 1 | byte 2 | byte 3 | byte 4 | byte 5 | byte 6 | byte 7 | byte 8 | byte 9 | byte 10 | byte 11 |
| 49 | 3F | 68 | 6 | 66 | 3F | 56 | 57 | 31 | 36 | 13 | 3F |
