Connecting to a STM32G431K8 works well with the Pitaya Link (lpc11u35) board, but fails inconsistently when using STM32F103 boards (BluePill style boards - with confirmed genuine STM32F103 parts). Some connect successfully and some do not. Typical failure (with OpenOCD) shown below.
Connecting to other MCUs works fine (e.g. STM32F042, SAMD21G18A).
% ~/tools/openocd/bin/openocd -f interface/cmsis-dap.cfg -f target/stm32g4x.cfg
Open On-Chip Debugger 0.11.0+dev-00433-g97db87c22 (2021-10-27-08:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,disable}
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x0d28:0x0204, serial=00000080066bff495052868367203660a5a5a5a597969908
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: UART via USB COM port supported
Info : CMSIS-DAP: FW Version = 2.1.0
Info : CMSIS-DAP: Serial# = 00000080066bff495052868367203660a5a5a5a597969908
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 2000 kHz
Error: Error connecting DP: cannot read IDR