pub struct Probe { /* private fields */ }
Expand description

The Probe struct is a generic wrapper over the different probes supported.

Examples

Open the first probe found

The list_all and from_probe_info functions can be used to create a new Probe:

use probe_rs::Probe;

let probe_list = Probe::list_all();
let probe = Probe::open(&probe_list[0]);

Implementations

Create a new probe from a more specific probe driver.

Same as Probe::new but without automatic boxing in case you already have a box.

Get a list of all debug probes found. This can be used to select the debug probe which should be used.

Create a Probe from DebugProbeInfo. Use the Probe::list_all() function to get the information about all probes available.

Get the human readable name for the probe.

Attach to the chip.

This runs all the necessary protocol init routines.

If this doesn’t work, you might want to try Probe::attach_under_reset

Attach to a target without knowing what target you have at hand. This can be used for automatic device discovery or performing operations on an unspecified target.

Attach to the chip under hard-reset.

This asserts the reset pin via the probe, plays the protocol init routines and deasserts the pin. This is necessary if the chip is not responding to the SWD reset sequence. For example this can happen if the chip has the SWDIO pin remapped.

Selects the transport protocol to be used by the debug probe.

Leave debug mode

Resets the target device.

Asserts the reset of the target. This is always the hard reset which means the reset wire has to be connected to work.

This is not supported on all probes.

Deasserts the reset of the target. This is always the hard reset which means the reset wire has to be connected to work.

This is not supported on all probes.

Configure protocol speed to use in kHz

Get the currently used maximum speed for the debug protocol in kHz.

Not all probes report which speed is used, meaning this value is not always the actual speed used. However, the speed should not be any higher than this value.

Check if the probe has an interface to debug ARM chips.

Try to get a trait object implementing UninitializedArmProbe, which can can be used to communicate with chips using the ARM architecture.

If an error occurs while trying to connect, the probe is returned.

Check if the probe has an interface to debug RISCV chips.

Try to get a RiscvCommunicationInterface, which can can be used to communicate with chips using the RISCV architecture.

If an error occurs while trying to connect, the probe is returned.

Gets a SWO interface from the debug probe.

This does not work on all probes.

Gets a mutable SWO interface from the debug probe.

This does not work on all probes.

Gets a DAP interface from the debug probe.

This does not work on all probes.

Try reading the target voltage of via the connected volgate pin.

This does not work on all probes.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.