Giter Site home page Giter Site logo

Comments (8)

dpryan avatar dpryan commented on May 27, 2024 1

It would be also be good to use another pin to output SWDIO_DIR which is used to control the level-shifter direction to Vtarget. This is what the Black Magic Probe does.
I imagine it is pretty easy to add that to the PIO state machine if someone knew what they were doing.

from debugprobe.

lurch avatar lurch commented on May 27, 2024

I've never used an ST-Link, but my guess would be that it does that so that it can detect whether it's connected to a 5V or a 3.3V device? Which wouldn't really work with Pico, as its maximum ADC input voltage is 3.3V.
Also, picoprobe was only developed to be a debug probe for Pico / RP2040, we don't (officially) support using at as a debug probe for other devices.

from debugprobe.

sourcebox avatar sourcebox commented on May 27, 2024

The ST-Link was just mentioned as an example of a debug probe with that functionality. What it effectively does is detecting if a target is connected at all and powered up with a suitable voltage. The ST-Link as an example is not 5V tolerant on ADC lines, so no switching between different voltages.

If no target voltage is detected, the probe should keep the SWCLK and SWDIO pins in high-impedance state to prevent any leakage current flow into an eventually unpowered target. For that reason, most debug probes also use serial resistors in the signal lines to limit potential current flow.

from debugprobe.

lurch avatar lurch commented on May 27, 2024

Ahhh. If it's just a "is the target powered-on or unpowered" test, then I guess a digital IO pin could be used for that (assuming that both target and debug-probe are 3.3V devices), rather than an ADC pin?
I dunno much about low-level electronics, but would putting serial resistors in the signal lines reduce the maximum speed of the signalling?

ping @liamfraser for his thoughts (as he developed picoprobe originally).

from debugprobe.

sourcebox avatar sourcebox commented on May 27, 2024

Yes, a digital pin would be sufficient for just on/off checking. But since ADC pins are unused anyway, you could use one for a more exact readout. With ST-Link e.g., the reading is printed on the OpenOCD console on startup. Not that this is essential, but can give some hint in case of malfunction.

The serial resistors reduce maximum speed, that's true. But they're typically around 100 ohms in this application and that will not have any serious impact at the speed the probe is operating on. There's also the possibility to use other protection mechanisms for real high speed, but that's up to hardware designers.

from debugprobe.

P33M avatar P33M commented on May 27, 2024

As picoprobe now uses CMSIS-DAP as the interface driver, there's no command that will return this data to the host, or configure the target IO voltage. Any debug adapter variant that had level shifters and (divided-down) voltage sense would have to set this up in the call to DAP_Connect and do so automatically. Setting SWD output drive to be on a separate GPIO is basically trivial.

from debugprobe.

CZEMacLeod avatar CZEMacLeod commented on May 27, 2024

@sourcebox Serial resistors at 22 to 100ohms actually can prevent echo/ringing on long lines (like the debug cables) and can increase the maximum speed in some scenarios. It is best to put them as close to the chip as possible for best effect.

from debugprobe.

lurch avatar lurch commented on May 27, 2024

It would be also be good to use another pin to output SWDIO_DIR

See #57 (if I've not misunderstood things!)

from debugprobe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.