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

# Nordic PPK2

> Power a target or measure its current with the Nordic Power Profiler Kit II, and view the results in the Monitor's Power tab.

Use a PPK2 to measure the target's current during boot, radio activity, or a settled low-power state. Results appear in the Monitor's **Power** tab.

Choose the mode that matches how the target is powered:

| Mode | Use when | What you get |
| - | - | - |
| **Source meter** | The PPK2 is the target's only supply, at 800–5000 mV. | Current. Voltage, power, and energy come from the source-voltage setting. |
| **Ampere meter** | An external supply powers the target through the PPK2's current path. | Current only. The PPK2 doesn't measure voltage in this mode. |

The PPK2 samples current at 100 kS/s in both modes.

## Prepare

1. Connect the PPK2 by USB and close any other software that uses it.
2. Open a **Power** tab for the PPK2 and select **Set up & connect**, as described in [Stream live power in the Monitor](/docs/debug-mode/power-analyzer.md#stream-live-power-in-the-monitor). The PPK2 is listed as **Nordic PPK2**. The toolbar shows each step: **Checking Python…**, **Creating the Python environment…**, **Installing ppk2-api…**, and **Downloading the PPK2 bridge…** (Inlay's PPK2 support files).

If you ask Inlay to check the PPK2 instead, approve **Install Python 3?** if Python is missing, **Create Inlay Python environment?**, and the `ppk2-api` package install.

The first setup needs internet access to download Inlay's PPK2 support files. Later setups reuse the saved copy when you're offline.

If several PPK2s are attached, the device chip lists each one with its USB port. Choose **Rename device** from the **⋯** (**Device actions**) menu to give each unit a name you recognize.

Before you connect the target's power path, note its required voltage, expected current, workload, and measurement duration. Then follow the PPK2 and board wiring instructions for your setup.

## Supply the target

Use source-meter mode when the PPK2 is the target's only supply.

1. Connect the PPK2 output to the target's VDD and connect the grounds.
2. Disconnect any other source that powers the target, such as USB or a debugger supply.
3. Choose a supply voltage from 800 to 5000 mV.
4. Say whether the target should stay powered after the measurement.

```text theme={"theme":"css-variables"}
The PPK2 is the board's only supply. Use source-meter mode at 3300 mV,
wait 100 ms for startup, measure for five seconds, and report average,
minimum, and maximum current. Turn the target supply off afterward.
```

The target has no power until the PPK2 turns its output on.

## Measure an external supply

Use ampere-meter mode when another supply powers the target.

1. Place the PPK2's current path between the external supply and the target.
2. Check for other power paths through USB and debugger connections.
3. For a live stream in the Monitor, enter the actual supply voltage in **Input voltage**. The stream uses it to calibrate current.

Don't ask for a PPK2 source voltage or DUT power control in this mode. The external supply controls the target's power.

```text theme={"theme":"css-variables"}
The board uses an external 3.3 V supply through the PPK2 current path.
Use ampere-meter mode and capture five seconds of the idle workload.
Show the trace in Power and report the current statistics.
```

If your development board has a current-measurement jumper, follow the board's measurement setup. On a Nordic DK, remove the nRF current measurement jumper, typically labeled "nRF CURRENT", for ampere-meter wiring. Put the jumper back before you use serial, RTT, or GDB again. Without it, the target can lose power or debug access.

## Capture and compare

Choose how to measure:

* **Bounded measurement:** ask for a current trace and summary after a defined settling period, as in the examples above.
* **Live view:** stream in the Monitor's **Power** tab, run the workload, then select **Stop** to save a capture. See [Configure a live stream](#configure-a-live-stream).

Save the firmware revision, measurement mode, supply voltage, workload, and settling period with the result. Compare the same interval and workload on later runs. See [Compare runs](/docs/debug-mode/power-analyzer.md#compare-runs) for where captures are saved and a prompt that compares two of them.

## Configure a live stream

Open a **Power** tab and start the stream as described in [Stream live power in the Monitor](/docs/debug-mode/power-analyzer.md#stream-live-power-in-the-monitor). Before you select **Start**, set these in the **Setup** panel:

1. If the tab isn't bound to a device, choose **PPK2** under **Instrument**, and choose the unit under **Device**.
2. Under **Mode**, choose **Ampere meter** or **Source meter** to match your wiring.
3. Enter the voltage and choose a **Sample rate**.
4. In source-meter mode, turn on the **DUT power** switch to power the target.

| Setting | Values | Notes |
| - | - | - |
| **Mode** | **Ampere meter** (default), **Source meter** | Ampere meter: an external supply powers the DUT. Source meter: the PPK2 powers the DUT. |
| **Input voltage** | 800–5000 mV, default 3300 | Ampere-meter mode. Enter the actual supply voltage, for calibration. |
| **Source voltage** | 800–5000 mV, default 3300 | Source-meter mode. The PPK2's output voltage. |
| **Sample rate** | 1, 2 (default), 5, 10, 20, 50, or 100 Hz | Statistics windows per second. Each window carries the mean, minimum, and maximum current. |

**Start** stays unavailable until the voltage is a whole number from 800 to 5000 mV. The **Current range** and **Voltage range** settings apply only to Joulescope and don't appear for a PPK2.

In ampere-meter mode, voltage, power, and energy stay empty, and saved captures leave those columns out. In source-meter mode, they're calculated from the source voltage.

DUT power turns off when a source-meter stream stops. Turn DUT power off before you change the mode or voltage.

See [live power controls](/docs/debug-mode/power-analyzer.md#stream-live-power-in-the-monitor) for pausing and stopping the stream, [reading the chart](/docs/debug-mode/power-analyzer.md#read-the-chart), and what happens when Inlay needs the PPK2.

## Record a longer test

| Method | Use it for | Result |
| - | - | - |
| Live view at a low sample rate | Watching current while a long workload runs | **Stop** saves the most recent 4,000 windows: about 66 minutes at 1 Hz, 33 minutes at 2 Hz, or 40 seconds at 100 Hz. Each window keeps the mean, minimum, and maximum current, so a short peak still shows in the maximum. |
| Background hardware script | A soak test, or a run longer than the chart keeps | The statistics the script reports when it exits |

A live stream ends on its own after 24 hours.

For a scripted run, ask for a background run. It isn't limited by the script timeout and stops after 24 hours. See [Run longer checks](/docs/debug-mode/hardware-scripts.md#run-longer-checks). Have the script use the manual helpers, `ppk2_start_measuring()`, repeated `ppk2_read_samples()` calls, and `ppk2_stop_measuring()`, which are meant for repeated reads.

```text theme={"theme":"css-variables"}
Run a background hardware script with the PPK2 in ampere-meter mode. Measure
current for two hours and report the average, minimum, and maximum for each
ten-minute interval. Disconnect the PPK2 when the run ends.
```

A chat that measures with the PPK2 pauses a live stream on the same unit. See [Share the instrument with Inlay](/docs/debug-mode/power-analyzer.md#share-the-instrument-with-inlay).

## Use the PPK2 in a hardware script

In a [hardware script](/docs/debug-mode/hardware-scripts.md), use these helpers. Current values are in microamps.

| Helper | Use |
| - | - |
| `ppk2_measure(duration_ms=5000, source_voltage_mv=3300)` | One-shot measurement. Connects, sets the mode, powers the target in source-meter mode, samples, reports average, minimum, and maximum current, and cleans up. `duration_ms` defaults to 1000. Omit `source_voltage_mv` for ampere-meter mode. `settle_ms` sets the delay after power-on, 100 ms by default. |
| `ppk2_use_source_meter()`, `ppk2_set_source_voltage(mv)`, `ppk2_power_on_dut()`, `ppk2_power_off_dut()` | Manual source-meter control. Select source-meter mode before setting the voltage or switching power. |
| `ppk2_use_ampere_meter()` | Manual ampere-meter mode. |
| `ppk2_start_measuring()`, `ppk2_read_samples()`, `ppk2_stop_measuring()` | Manual measurement for repeated reads. |
| `ppk2_list_devices()`, `ppk2_connect(port=...)`, `ppk2_disconnect()` | List units, choose one, and release it. Disconnect in cleanup when you use manual helpers. |

Use `ppk2_measure()` on its own, or the manual helpers on their own. Inlay checks the script before it runs. It rejects voltage or DUT power calls without source-meter mode, and warns when ampere-meter mode is combined with them. Include the intended final supply state in cleanup.

## Troubleshoot

* **"No PPK2 device detected via USB":** check the USB cable and port, then choose **Rescan devices** from the **⋯** (**Device actions**) menu.
* **"Failed to download PPK2 bridge files and no cached version exists":** connect to the internet and set up again. After one successful setup, Inlay reuses the saved copy.
* **"The cached PPK2 bridge lacks streaming support":** the saved support files predate live streaming. Reconnect to the internet and start the stream again so Inlay can update them.
* **Start is unavailable:** enter a voltage from 800 to 5000 mV.
* **Current reads zero:** check the current path, the selected mode, and the supply. In source-meter mode, check that DUT power is on.
* **Current is higher than expected:** check USB, debugger, and other paths that may power the board.
* **Voltage, power, and energy are empty:** this is expected in ampere-meter mode.
* **Voltage or power call rejected:** use source-meter mode when the PPK2 supplies the board, or remove those calls in ampere-meter mode.
* **Device unavailable:** check USB, close other applications that use the PPK2, and complete setup.
* **Board stops after measurement:** check the requested final supply state, and put back any measurement jumper before ordinary debugging.


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