esp32_register_inspect
Reads raw device registers, decodes them into named bitfields when a component profile is supplied, and performs explicit register writes with recorded before/after state for hardware verification.
Instructions
Register inspection and controlled register writing. Reads are the default and need NO component profile: name numeric registers and get raw values back. Supply a component and the same values are decoded into named bitfields with reset-value comparison — a profile is a decoder, not a permission. Registers a profile does not describe are still read, raw. WRITES: supply writes to perform explicit register writes as experiments — entering a mode, selecting a bank, triggering a measurement, clearing status, or testing undocumented behaviour. Each write records the bytes sent, the bus acknowledgement, the value read immediately before, and (unless disabled) the state read back afterwards. A bus ACK confirms the device accepted the bytes; it does NOT establish that the device did what you intended — read back and compare.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "esp32_register_inspect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cs | No | Chip-select GPIO (SPI, required for SPI) | |
| scl | No | SCL GPIO (I2C) | |
| sda | No | SDA GPIO (I2C) | |
| miso | No | MISO GPIO (SPI) | |
| mode | No | SPI mode 0-3 | |
| mosi | No | MOSI GPIO (SPI) | |
| port | No | Serial port (optional) | |
| sclk | No | SCLK GPIO (SPI) | |
| writes | No | Explicit register writes to perform. Each is executed as requested and recorded with before/after state. | |
| address | No | I2C address (optional, uses the profile default) | |
| clockHz | No | SPI clock in Hz | |
| component | No | Component profile id, part number or alias | |
| interface | No | Interface to read over (default: I2C) | I2C |
| registers | No | Register names (needs a profile) or numeric addresses (needs nothing). Omit to read every register the profile declares. | |
| timeoutMs | No | Request timeout in ms (optional) | |
| frequencyHz | No | I2C frequency in Hz | |
| readBackAfterWrite | No | Re-read the written registers afterwards (default: true) |