Comments (8)
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.
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.
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.
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.
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.
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.
@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.
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)
- Not able to flash picoW using picoprobe HOT 13
- Replace UART with another SWD
- Request 2 cancelled on connection close HOT 4
- UART enable define doesn't actually disable UART code
- probe.c only includes probe.pio.h, doesn't include define for _oen version HOT 2
- Feature suggestion: add ability to unlock flash sectors HOT 4
- Probe can no longer connect to Pico after rename HOT 6
- How to use target reset functionality? HOT 6
- Fatal error: bsp/board.h: No such file or directory HOT 3
- OpenOCD Unable to Connect to debugprobe HOT 1
- Unable to use debugprobe HOT 3
- Version info in USB descriptor struct not updated during 1.1 release
- OpenOCD Unable to Connect to debugprobe HOT 2
- UART doesn't support transmitting a break signal HOT 4
- Incorrect macro used in ifdef can cause a build failure HOT 2
- Add version number to picotool output HOT 3
- YD-RP2040 HOT 3
- debugprobe not resonsive shortly after starting debug HOT 9
- Document pinout in README HOT 5
- Open source license is not documented HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debugprobe.