raspberrypi / debugprobe

754 stars 202 forks source link

What's happening when Pico Probe is SWD connected to a Pico, circuit is behaving differently... #76

Closed kolbma closed 1 year ago

kolbma commented 1 year ago

I've connected an analog circuit which depends on differences in small microampere area to some Pins of the Pico.
Without any connection on the SWD pins it works.
As soon as I connect the Pico Debug Probe with the running Pico, there is some heavy difference happening on the circuit. So I can not use it at the moment to debug in the productive environment. Something similar I've seen in my development environment when attaching/removing stuff to/from VBUS and mixing different potentials with same ground, that the debug connection crashed repeatably with reporting a not specified ARM error, but the Debugged Pico itself has no problem and continues. I can also restart the Debug session and it works until there is the next change on bus, like touching ground with a voltmeter.

bjonnh commented 1 year ago

Do they both share the same ground? How is your Pico powered? If it is not powered by the same computer that drives your picoprobe you may simply have ground loops.

kolbma commented 1 year ago

And the Debug Probe isn't designed to handle this?

Debug Probe is USB powered by battery powered laptop. The rest is self contained device grounded to house earth.

P33M commented 1 year ago

And the Debug Probe isn't designed to handle this?

It's not a fault of the Debug Probe. When RP2040 is driving SWDIO, which is usually connected to a long wire, VDDIO will bounce which will couple into other parts of the circuit. SWD is actively polled while a debug session is active.

If you're measuring microampere differences, you need to employ very strong noise filtering in the analogue sections of your circuit.