esp32_spi_discovery
Probe an SPI device using named read profiles or component-safe probes, with required chip-select control, to identify attached hardware and detect degenerate MISO responses.
Instructions
STAGE 3-5 for SPI. Probes an SPI device using explicit, named profiles only — IDLE_READ (clocks 0xFF), ZERO_READ (clocks 0x00), JEDEC_ID (standard read-only 0x9F identification) — or the safe probes of a named component profile. Arbitrary command sequences are not supported by design. Returns raw bytes, hex, repeated patterns, protocol signatures, timing and confidence. All-0x00/all-0xFF responses are flagged as degenerate (a floating MISO line), not reported as data. A chip-select pin is REQUIRED — this tool never asserts an unspecified CS.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cs": "<cs>"
},
"name": "esp32_spi_discovery"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cs | Yes | Chip-select GPIO (REQUIRED) | |
| tx | No | Arbitrary bytes to clock out. Any values are accepted — this is the general-purpose path and needs no preset and no component profile. Supplying this suppresses the default presets. | |
| miso | No | MISO GPIO | |
| mode | No | SPI mode 0-3 (default: 0) | |
| mosi | No | MOSI GPIO | |
| port | No | Serial port (optional) | |
| sclk | No | SCLK GPIO | |
| clockHz | No | Clock in Hz, 10000-40000000 (default: 1000000) | |
| padByte | No | Filler byte clocked out during the read phase (default: 0x00) | |
| bitOrder | No | Bit order (default: MSB_FIRST) | MSB_FIRST |
| profiles | No | Convenience presets for common opening moves (default: ["IDLE_READ","ZERO_READ"] when no `tx` is given). These are shortcuts, not a restriction — use `tx` for anything else. | |
| component | No | Component profile id whose SPI safe probes should also run (optional) | |
| timeoutMs | No | Request timeout in ms (optional) | |
| readLength | No | Extra bytes to clock in after `tx`, filled with `padByte` | |
| transactionSize | No | Bytes per transaction, 1-256 (default: 4) |