Expand description
JTAG boundary scanning module.
WARNING: This tool may damage your hardware in EXTEST mode, especially when the target
is not a development board: to reduce the risk, do not enable the output of any pin with
unknown functionality for a long time (the duration should be as short as possible).
§Usage
§Building the PinScanner
- Check for compatible debug adapters, connect the adapter to the target, connect the adapter to the PC and power on the target;
- With the
backend-jtag-tapsfeature ofjtag-scannerenabled, construct and configure a Cable instance; - Create a
PinScannerBuilderwith theCableinstance, and (optionally) check the result of get_id_codes to make sure the TAP chain is working; - With the builder, call scan_tap_info with a directory path
for scanning BSDL files, then call build to build the
PinScanner.
§Using the PinScanner
- Enumerate in tap_infos to get the index of the TAP that you want to control.
- Get
PinIdvalues via get_pin_id, providing the port name as the argument; or iterate through pin_ids_for_tap. - Set the TAP to
SAMPLEorEXTESTmode by set_tap_state. - Call get_pin_state or set_pin_state, and then update or write_update.
- Check
PinScanner::batchif higher transmission efficiency is required.
§Creating bitbang IO interface adapters
Some adapters (e.g. I2C, NOR and NAND flash) may be added in the future. These adapters should
depend on PinGroup instead of using PinScanner directly; they are all under protocols
feature gate.
Modules§
- protocols
- IO interface adapters. All of them are under the
protocolfeature gate.
Structs§
- BsrEdit
- Write-only BSR buffer. Used in the batch operation API.
- BsrView
- Read-only BSR buffer. Used in the batch operation API.
- Error
- The error type used in this crate.
- PinGroup
- Groups pins and assign given names to each pin, restricting the usage of PinScanner within the group. Implements PinGroup.
- PinGroup
Item - Items required during construction of PinGroup.
- PinId
- Unique pin identifier associated with a PinScanner instance. This is not intended to be persistent or serializable.
- PinId
Iter - Iterates through all PinIds for a TAP in the chain handled by PinScanner.
- PinScanner
- Basic structure for doing boundary scanning. Expects a fixed chain of devices.
- PinScanner
Builder - The only way to build PinScanner; detects IDCODEs of devices on the chain, and scan for BSDL files.
- PinState
- Lastly captured states of scan cells of a pin.
Enums§
- Error
Kind - A list of general categories of errors produced in this crate.
- TapInfo
- Needed information for each TAP on the chain.
- TapState
- Supported TAP states for normal operations.
Traits§
- Backend
- Trait for supported JTAG adapter drivers (currently all of them are from
jtag-taps).