> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Combine hardware observations

> Use logs, registers, and instrument captures together to test one specific cause.

Combine observations when one instrument can't tell the likely causes apart. Keep the firmware, workload, and target state the same across measurements, and note any reset or halt between them.

| Question | Pair |
| - | - |
| Which firmware state draws the current? | [Power capture and firmware markers](#pair-a-log-with-power) |
| Is it a protocol error or a signal-quality problem? | [Logic capture and oscilloscope](#separate-protocol-and-electrical-problems) |
| Why did the board reset? | [Supply capture and the reset-cause register](#investigate-a-reset) |
| What ran before the fault? | [Debugger state, then instruction trace](#move-from-gdb-to-trace) |

## Pair a log with power

```text theme={"theme":"css-variables"}
Measure current and voltage on the JS220 for five seconds while decoding
the sleep and wake markers on gpi1 at 115200 baud. Report which markers
arrived, the overall current statistics, and save the trace.
```

A Joulescope JS220 can decode UART (8N1) on one of its GPI pins, `gpi0` to `gpi3`, while it measures current and voltage. The decoded bytes have no timestamps that line up with the current samples. They show which markers arrived during the capture, but not where each state begins in the power trace.

To measure current in each state, use one of these approaches:

* Hold the target in a known state, let it settle, and capture each state separately.
* Have the firmware drive a GPIO during the state, wire it to a Joulescope GPI, and ask Inlay to capture between the marker's edges. Edges are polled in software, so the capture boundaries can lag the marker by up to about 50 ms. Keep each state longer than that.

A separate serial log and a power capture don't share a clock. When transition timing matters, use a marker that the measuring instrument samples itself, with a suitable timebase.

## Separate protocol and electrical problems

```text theme={"theme":"css-variables"}
Capture I2C with SDA on logic channel 0 and SCL on channel 1. Save raw and
decoded results. Then measure SDA rise time on scope channel 1 at the same
bus speed and compare it with the interface requirement.
```

The logic capture checks the frames, and the scope checks the signal. Use a common marker or trigger if your conclusion depends on matching one exact event across instruments.

## Investigate a reset

```text theme={"theme":"css-variables"}
Capture VDD and a firmware marker during motor startup. After the reset,
attach without programming and read the target's reset-cause register.
Compare the register result with the voltage capture before identifying a cause.
```

Check the register's access rules and the [debugger attachment precautions](/docs/debug-mode/gdb.md#attach-to-a-running-target) first. Don't clear a status register that still holds useful evidence.

## Move from GDB to trace

Save stack and register observations before you start J-Trace coverage or a bounded instruction capture. Those captures take the probe from any GDB or RTT session, then reset and run the target.

Treat the paused debugger observation and the later trace as separate runs.

## Make the test repeatable

Ask Inlay for one [hardware script](/docs/debug-mode/hardware-scripts.md) that contains the setup, ordered actions, pass condition, and cleanup. Keep a longer investigation in a [hardware case](/docs/debug-mode/hardware-scripts.md#keep-a-hardware-case) with the raw captures and findings.

Record:

* The firmware artifact and board revision.
* Wiring, supply, channels, trigger, and the sample rate actually achieved.
* Any reset, halt, or other action that changed target behavior.
* The observed result, and what it does or doesn't establish.

Stop active captures when you finish so the next hardware task can run. Check `/hardware-queue` if a task is waiting for the board.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.