ARMmbed / ARMmbed/DAPLink

Inconsistent behavior connecting to STM32G431K8 with STM32F103 HIC

Open
#897 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.8k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

Research direction

Reproduce the inconsistent connection using the provided OpenOCD command with the CMSIS-DAP interface and STM32G4 target configuration. Compare successful and failing STM32F103 BluePill boards against the working Pitaya Link setup; done means identifying the cause of the DP IDR connection failure and documenting or validating a fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.