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

# Power analyzer

> Choose a power instrument, stream live current in the Monitor, and record power measurements you can compare.

Measure the target's current, voltage, and energy while it runs a known workload, such as boot, a radio burst, or sleep. Use this page to choose an instrument and to work with the Monitor's **Power** tab, which the PPK2 and Joulescope share. Setup, wiring, and limits for each instrument are on its own page.

Before you start, decide on the instrument, wiring, supply, workload, and measurement duration.

## Choose the instrument

> [card] [Nordic PPK2](/docs/debug-mode/ppk2.md)
>
> Power the target at 800–5000 mV in source-meter mode, or measure current from an external supply in ampere-meter mode.

> [card] [Joulescope](/docs/debug-mode/joulescope.md)
>
> Measure current and voltage inline with an external supply, with statistics, streaming, and JLS recordings.

> [card] [Digilent WaveForms](/docs/debug-mode/digilent.md)
>
> Power a small target from the device's supplies and record their voltage and current in the **Power** tab. Analog input recordings open in **Oscilloscope**.

| | Nordic PPK2 | Joulescope | Digilent WaveForms |
| - | - | - | - |
| Powers the target | Yes, in source-meter mode | No. Use an external supply. | Yes, on devices with adjustable supplies |
| Measures | Current. In source-meter mode, voltage, power, and energy are calculated from the source voltage. | Current, voltage, power, and energy | The voltage and current of its own supplies. Analog inputs are recorded separately, in **Oscilloscope**. |
| Live stream in the Monitor | Yes | Yes | No |
| You install | Nothing. The first setup needs internet access. | Nothing. A JS320 needs Python 3.12 or newer and firmware 1.1.3 or newer. On Linux, it may need Joulescope's udev rules. | Nothing; Inlay can install the WaveForms runtime |

Follow the wiring and limits for your exact model and front panel. Before you measure, check for other power paths into the target, such as USB or a debugger, because they change the reading. If you remove a board's current-measurement jumper, put it back before you return to ordinary debugging.

## Stream live power in the Monitor

Use the Monitor's **Power** tab to watch a PPK2 or Joulescope in real time without writing a script.

**1. Open a Power tab for the instrument**

In the Monitor, select **+**. Under **On the bench**, select your PPK2 or Joulescope. A **Power** tab opens, bound to that device. You can also open **Power** from **Views** and choose the instrument from the device chip at the start of the toolbar.

**2. Approve setup**

If the toolbar shows **Set up & connect**, select it. Selecting it approves the installs the instrument needs, and the toolbar shows each step. See [Connect a bench instrument](/docs/debug-mode/overview.md#connect-a-bench-instrument) for the device states.

**3. Choose the settings**

In the **Setup** panel, choose the sample rate and the instrument's options. To show or hide the panel, select the **Power setup** chip, the settings summary next to the device chip in the toolbar. See [PPK2](/docs/debug-mode/ppk2.md#configure-a-live-stream) or [Joulescope](/docs/debug-mode/joulescope.md#configure-a-live-stream).

**4. Start the stream**

Select **Start**. The status changes from **Connecting** to **Live**, and readouts appear on the chart.

Inlay saves the **Setup** values for each device when you select **Start**. DUT power is never restored automatically.

### Control the stream

| Control | What it does |
| - | - |
| **Start** | Opens the instrument and starts streaming. |
| **Pause** / **Resume** | **Pause** keeps the instrument open. Readings taken while paused are discarded, and the chart's timeline leaves out the paused time. **Resume** continues without reconnecting. |
| **Stop** | Ends the stream and saves the chart's most recent 4,000 windows as a power capture. |
| **DUT power** | A switch that turns the target's current path on or off. See [Control DUT power](#control-dut-power). |
| **Capture history** | Opens the list of saved power captures. Select one to view it. |

While the stream runs, the **Power setup** chip is locked and the **Setup** panel closes. Stop the stream to change the settings. The device chip is also locked while the stream runs or DUT power is on.

When Inlay or a hardware script measures power, the **Power** tab shows that measurement's live preview in place of the stream controls. Select **New capture** to leave the preview.

### Share the instrument with Inlay

A live stream uses only its instrument, so Inlay can build, flash, or debug the board from chat while the stream runs.

When a chat needs the same PPK2 or Joulescope, Inlay stops the stream, saves the chart window as a power capture, and shows **Paused:** with the chat's name and the instrument it needs. The stream starts again about 10 seconds after the chat finishes with the instrument.

A Joulescope stream, or a PPK2 stream in source-meter mode, doesn't restart if a chat still holds the board at that moment, and the tab stays on **Paused:**. When the chat has finished, select **Stop**, then **Start**. Check the **DUT power** switch before you start, because a stream started with it off keeps the target's current path off.

While a chat holds the board, the toolbar shows **In use by** and the chat's name. **Start** and **Resume** are unavailable, and you can't turn **DUT power** on. A stream that is already running keeps its **Pause** and **Stop** controls.

Inlay refuses anything that would switch the target's power off while the chat holds the board:

* Turning **DUT power** off reports "Hardware is in use by another workflow".
* Stopping a PPK2 stream in source-meter mode reports "An agent is using the board this PPK2 powers".

Try again when the chat finishes. Run `/hardware-queue` to see what holds the board.

### Control DUT power

The **DUT power** switch starts off, and a stream started with it off keeps the target's current path off. Turn DUT power on before or during a stream.

* **Joulescope:** the switch connects or disconnects the current path from your external supply to the target. It doesn't set a supply voltage. If a JS320 fuse has tripped, turning DUT power on shows an error instead of streaming a flat 0 A trace. Fix the overcurrent cause, then ask Inlay to clear the fuse.
* **PPK2 in source-meter mode:** the switch turns the PPK2's output to the target on or off. DUT power turns off when the stream stops. Turn DUT power off before you change the mode or voltage.
* **PPK2 in ampere-meter mode:** there is no **DUT power** switch, because the external supply powers the target.

### Read the chart

The chart shows a rolling window of the most recent samples.

* The readouts on the chart show the latest current, voltage, and power, each with its average and peak. The **Total** row shows the charge and energy for the samples in the chart.
* The readouts also show the sample rate. If the instrument applies a different rate than you requested, the rate is marked **actual**. Elapsed time appears beside the **Live** status in the toolbar.
* When the chart has more than one series, select a readout to hide or show its series.
* Drag across a region to zoom both axes. Select **Reset zoom**, or double-click the chart, to return to the full window.

## Record a longer test

Define the workload and its settling period, measure for the required interval, and save the trace or statistics.

* For long Joulescope tests, use [statistics, streaming, or a JLS recording](/docs/debug-mode/joulescope.md#record-a-longer-test). Keep a one-shot Joulescope capture to 60 seconds or less.
* For long PPK2 tests, use a slow live stream or a background script. See [PPK2](/docs/debug-mode/ppk2.md#record-a-longer-test).
* For a long live view, choose a sample rate where 4,000 windows cover the interval, because **Stop** saves only the most recent 4,000 windows. At 2 Hz, they cover about 33 minutes. At 100 Hz, they cover 40 seconds. A live stream ends on its own after 24 hours.

Keep the firmware revision, supply voltage, duration, and any jumper changes with the result. Restore the board's normal connections before ordinary debugging.

## Compare runs

Inlay saves each power capture in its own folder under `.inlay/captures/` in your project, grouped by chat session. This covers the capture a live stream saves when you select **Stop** and the Joulescope captures Inlay takes from chat. Each folder holds:

| File | Contents |
| - | - |
| `analog.csv` | One row per point, with `time_s` in seconds and `current_a`, `voltage_v`, and `power_w` in amps, volts, and watts. A PPK2 stream in ampere-meter mode has only the current column. |
| `manifest.json` | The capture's name, creation time, sample rate, duration, and sample count. |

To reopen a capture, select **Capture history** in the **Power** tab. When a live stream stops, Inlay also adds the saved capture's path to the open chat, so you can ask about that run without looking up the folder.

To compare two runs, measure the same workload over the same interval, then name the captures or their folders:

```text theme={"theme":"css-variables"}
Compare the two newest power captures under .inlay/captures. Report the
change in average and peak current, and the time ranges where the traces differ.
```

## Correlate activity

Hold the target in a known firmware state, or use [Joulescope digital markers](/docs/debug-mode/joulescope.md#correlate-digital-activity). When marker results don't have timestamps aligned to current samples, measure each settled state separately and compare them. See [Combined workflows](/docs/debug-mode/combined-workflows.md) for relating power to firmware behavior.

## Troubleshoot

* **Current reads zero:** check the current path, the supply, and DUT power.
* **Readings are unexpected:** check for other power sources and the voltage-sense wiring.
* **"A run started outside chat cannot approve installs":** select **Set up & connect** in the toolbar, or ask Inlay in chat to start the measurement so you can approve the install.
* **"Hardware is in use by another workflow":** a chat holds the board. Wait for it to finish, or run `/hardware-queue` to see what holds it.
* **"The PPK2 is in use by an agent"** or **"The Joulescope is in use by an agent":** a chat is using the instrument. Start the stream after the chat finishes with it.
* **Stream shows "Paused:"**: a chat needed the instrument. The stream restarts on its own about 10 seconds after the chat finishes. If it's still paused after that, select **Stop**, then **Start**.

For device-specific problems, see the troubleshooting for [PPK2](/docs/debug-mode/ppk2.md#troubleshoot), [Joulescope](/docs/debug-mode/joulescope.md#troubleshoot), or [Digilent](/docs/debug-mode/digilent.md#troubleshoot).


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