Decode or compare register dumps
decode_registersDecodes a register dump of a microcontroller into registers and bit fields, with the named value of each field, from the vendor's own file for the part. With a second dump it returns only what differs between the two. Use it to see what a peripheral is really set to, and to compare a setup that works with one that does not: a vendor example against your code, or a good board against a bad one. A dump is a read: on some status and data registers a read clears flags or takes a byte. Covers 935 devices from ST, Nordic, Raspberry Pi, Espressif, Microchip, NXP and TI, and says so when it has no data for a part.
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": {
"device": "<device>",
"dump": "<dump>"
},
"name": "decode_registers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dump | Yes | The dump, in 32-bit words: lines as GDB prints them for `x/16xw 0x40011000`, as OpenOCD prints them for `mdw`, or lines of the form `USART1->CR1 = 0x200C`. | |
| device | Yes | The part, for example STM32F407VGT6, stm32g431, nrf52840 or esp32c3. | |
| compare | No | A second dump of the same registers, for example from the setup that fails. The answer then holds only the differences, as first -> second. |