Skip to content

Probe speed stuck at very low frequency #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
snaiperskaya96 opened this issue Jan 22, 2025 · 5 comments
Open

Probe speed stuck at very low frequency #161

snaiperskaya96 opened this issue Jan 22, 2025 · 5 comments

Comments

@snaiperskaya96
Copy link

snaiperskaya96 commented Jan 22, 2025

Hi,
Those few past days i've been trying a combination of rp2040 and rp2350 as both host and guest (debugger & target).
I've got myself a mix of 4+ different 2040s, in both the official dev board and some other custom formats, spanning different revision.

No matter what software im using (openocd, pyOCD, probe-rs), i'm stuck with a speed that ranges between 10khz and 30khz, with 10 being the one that consistently works and 30 being somewhat unreliable where it could fail at some point during the flashing process.

Unfortunately i dont have any other debugger available to confirm that it is in fact an issue with debugprobe, but i dont know what else to look for so i'm opening this issue in the hope that its something known and workaround-able.

I've also tried with older revisions, going back to 1.0 but no difference at all.

That being said i've only tried interfacing with debugprobe on Windows, not sure if this could be the issue.

This is when i run it at 10khz
openocd -f interface/cmsis-dap.cfg -c "set USE_CORE 0" -f target/rp2040.cfg -c "adapter speed 10"

Open On-Chip Debugger 0.12.0 (2024-09-16) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 d52e355daa09f17ce64819122cb067b8a2ee0d4b
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
0
adapter speed: 10 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=CCA25CB821B83DBE
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 10 kHz
Info : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001
Info : [rp2040.core0] Cortex-M0+ r0p1 processor detected
Info : [rp2040.core0] target has 4 breakpoints, 2 watchpoints
Info : [rp2040.core0] Examination succeed
Info : [rp2040.core0] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections

And this is when running at the classic 5000khz
openocd -f interface/cmsis-dap.cfg -c "set USE_CORE 0" -f target/rp2040.cfg -c "adapter speed 5000"

Open On-Chip Debugger 0.12.0 (2024-09-16) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 d52e355daa09f17ce64819122cb067b8a2ee0d4b
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
0
adapter speed: 5000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=CCA25CB821B83DBE
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 5000 kHz
Error: Failed to connect multidrop rp2040.dap0
@P33M
Copy link
Contributor

P33M commented Jan 22, 2025

How are you connecting the probe to the target (electrically)?

@snaiperskaya96
Copy link
Author

How are you connecting the probe to the target (electrically)?

I felt dumb for a moment thinking i did not try to solder wires directly from the probe to the target, as i only connected them via jumpers beforehand. But, then i tried to solder them and unfortunately im running into the exact same issue.

@P33M
Copy link
Contributor

P33M commented Jan 23, 2025

Sketch your connections.

@snaiperskaya96
Copy link
Author

Sorry for the delay. I'm following the documentation and double checking it with the pin definitions in board_pico_config.h.

Probe Target
GPIO 2 SWCLK
GPIO 3 SWDIO
VSYS VSYS
GND GND

Image

Image

@P33M
Copy link
Contributor

P33M commented Feb 5, 2025

5MHz definitely isn't going to work with that sort of setup. 30kHz is a bit low but not unsurprising.
You have a large loop between SWD/SWCLK and the GND wire because the connections are separated. What's really dumb is that the RP2040-zero has a single ground pad and that has to be used as the return for both Pico W power and SWD line current.

Connect the centre GND pin on the SWD/SCLK header on the Pico W to the GND on the RP2040-zero. Twist the SWD/SWCLK wires together with the GND wire. It should go a bit faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants