EmbeddedCI BenchPod

v4.0.12
io.github.embeddedci-com/embeddedci-mcp Checked 19 hours ago Published 5 hours ago

Drive a BenchPod hardware-in-the-loop bench: power, flash, UART, I2C, CAN, analog and logic.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

connect

Open a BenchPod connection (closing any previous one and its sessions) and report status. Over the cloud the device is shared: this takes an exclusive lease, released by `disconnect` or after the server's idle timeout (the next tool call then reconnects).

ParameterTypeDescription
connectionhost[:port] (TCP: TLS on 8443 by default, with the pod's certificate pinned on first use; plaintext only with an explicit :8080 or on the USB network adapter), a serial device path (the USB console, s…
la_voltageSelect the LA I/O-bank voltage right after connecting (the DUT's I/O voltage; 5.0 needs the digital board v4).
lease_wait_snumberSeconds to wait when someone else holds the pod's lease (the cloud device's, or the pod's own on the LAN and USB network).
wiring_profileA wiring profile stored on the pod to use (the `wiring` tool lists them); omit for the pod's default profile.

disconnect

Close UART/CAN sessions and the connection, releasing a cloud lease. Safe when not connected.

status

Connection, firmware, capabilities, selected LA voltage and open sessions — with warnings for anything that will block the next steps (e.g. no LA voltage). Works when not connected.

set_la_voltage

Select the LA I/O-bank voltage to match the DUT's I/O (1.8 V needs a rev3 pod, 5.0 a BenchPod v4). Usually not needed: connect sets it from the wiring profile's la_mv, and firmware 3.10.10+ takes it from the profile on the first LA operation. Call it when the profile sets none (ask the user), or to override the profile for this session. At 5.0 outputs reach 5 V only through their pull-ups: switch on the pull-up (set_pull up) on outputs into 5 V CMOS-level inputs. Point the user to https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io for the details. On BenchPod…

ParameterTypeDescription
la_voltageThe DUT's I/O voltage. 5.0 needs a pod with BenchPod v4 (status capabilities vref_out). Omit it to read the current voltage and VREF OUT without changing anything.

wiring

Which DUT signal is on which LA channel — call this first, before any channel argument. Returns the profile this connection uses (normally a profile stored on the pod: profile_name, the pod's default unless connect named another): a 14-row pin table, the named signals, the power supply, the UART baud and the SWD target, warnings about risky wiring, the pod's stored profiles and unsaved_changes (what set_wiring changed that is not stored yet), and header_map: the profile on the pod's real I/O header as text, to show the user how to wire their board. Every tool whose c…

set_wiring

Replace the wiring profile this connection uses. It is NOT stored on the pod unless save is true (or the server autosaves): the result's unsaved_changes and hint say what is not stored. The profile is validated first: two roles or signals on one LA channel, an out-of-range pin or an unknown key are rejected with a message naming every problem. Autosave never stores a change of the I/O voltage, the power supply or the SWD target: call save_wiring for those.

ParameterTypeDescription
profile *objectThe profile as a JSON object (schema version 2): la_mv, supply (5v, external, 3v3 or 1v8), uart_rx/uart_tx/uart_baud, i2c_sda/i2c_scl/i2c_addr, swd_swclk/swd_swdio/swd_nreset/swd_target, jtag_tck/jtag…
savebooleanAlso store it on the pod (as save_wiring does). Default false: this connection only, unless the server runs with --wiring-autosave.

save_wiring

Store a wiring profile on the pod, where the web app, CI and every other connection see it. Ask the user first: saving changes what everyone uses. Saving the profile this connection loaded fails with BP0009 when someone else saved it meanwhile (load_wiring shows their version). Saving never changes the pod's default profile (set_default_wiring does).

ParameterTypeDescription
nameThe pod profile to store it as (1-40 characters: a-z, 0-9, -). Default: the profile this connection loaded, else the pod's default. Use a new name for a different board.
profileA full profile to store instead of this connection's (schema version 2).

load_wiring

Switch this connection to one of the pod's stored profiles (nothing on the pod changes). Use it when the user says the bench is wired for another board, or after a BP0009 conflict.

ParameterTypeDescription
nameThe pod profile to use; omit for the pod's default.

set_default_wiring

Make a stored profile the pod's default (ask the user: it changes what everyone gets).

ParameterTypeDescription
name *stringThe pod profile every connection uses when it names none.

delete_wiring

Delete one of the pod's stored profiles. Ask the user first. The default cannot be deleted (BP0013): make another one the default first.

ParameterTypeDescription
name *stringThe pod profile to delete (not the default).

power_on

Power the board on with its wiring profile applied first: the profile's I/O voltage is set (when the pod has none or another one), its pull resistors (pulls; at 1.8 V only on firmware newer than 3.10.12) are set, then the supply goes on, and the pod records the profile. The result names the supply, the profile and the I/O voltage. Never changes the I/O voltage under a board that is already powered.

ParameterTypeDescription
delay_sSeconds: schedule the power-on pod-side and return at once (e.g. to power on during a capture).
efuseDeprecated, use supply: eFuse 1 is 5v, eFuse 2 is external. Omit for the wiring profile's supply.
supplyThe power supply: 5v (the pod's 5 V through eFuse 1), external (your own supply through eFuse 2) or, on BenchPod v4, 3v3 (switched 3.3 V, J1 pin 17, about 1.45 A limit) or 1v8 (switched 1.8 V, J1 pin…
wiring_profileA stored wiring profile to power the board with (it becomes this connection's profile); omit to use the current one.

power_off

Switch the target's power supply off. The result says which supply was used.

ParameterTypeDescription
delay_sSeconds: schedule the power-off pod-side.
efuseDeprecated, use supply: eFuse 1 is 5v, eFuse 2 is external. Omit for the wiring profile's supply.
supplyThe power supply: 5v (the pod's 5 V through eFuse 1), external (your own supply through eFuse 2) or, on BenchPod v4, 3v3 (switched 3.3 V, J1 pin 17, about 1.45 A limit) or 1v8 (switched 1.8 V, J1 pin…

measure_power

Measure the DUT's supply current and voltage for a window: average, minimum and peak current, voltage, energy and charge (gap-free sampling, so energy is integrated, not estimated). Use this for a self-contained window (a boot, a sleep interval). To profile across other tool calls, bracket them with power_profile_start / power_profile_stop. With monitor, the profile comes from an external INA current monitor (attached with expansion) for uA currents; supply in the result is then null and monitor names it.

ParameterTypeDescription
duration_s *numberSeconds to sample (blocking).
efuseDeprecated, use supply: eFuse 1 is 5v, eFuse 2 is external. Omit for the wiring profile's supply.
monitorProfile an external INA current monitor (attached with expansion) instead of one of the pod's supplies, for uA currents: its name ('ina226@0x40', or the name it was given), or true when exactly one is…
pointsintegerPoints of current/voltage trace to return alongside the statistics; 0 = statistics only.
rate_hznumberSamples per second. Accurate to ~200 Hz; above that the pod delivers what its sampling loop allows, flattening near 365 Hz. rate_hz in the result is what you actually got, adc_rate_hz what the sensor…
supplyThe power supply: 5v (the pod's 5 V through eFuse 1), external (your own supply through eFuse 2) or, on BenchPod v4, 3v3 (switched 3.3 V, J1 pin 17, about 1.45 A limit) or 1v8 (switched 1.8 V, J1 pin…

power_profile_start

Start sampling a target-power supply in the background, then run the steps you want to profile and call power_profile_stop. Replaces any profile already running. With monitor, an external INA current monitor (attached with expansion) is sampled instead (monitor in the result).

ParameterTypeDescription
efuseDeprecated, use supply: eFuse 1 is 5v, eFuse 2 is external. Omit for the wiring profile's supply.
max_duration_snumberSeconds after which the pod stops sampling by itself (the result is then truncated).
monitorProfile an external INA current monitor (attached with expansion) instead of one of the pod's supplies, for uA currents: its name ('ina226@0x40', or the name it was given), or true when exactly one is…
rate_hznumberSamples per second; accurate to ~200 Hz, flattening near 365 Hz above that.
supplyThe power supply: 5v (the pod's 5 V through eFuse 1), external (your own supply through eFuse 2) or, on BenchPod v4, 3v3 (switched 3.3 V, J1 pin 17, about 1.45 A limit) or 1v8 (switched 1.8 V, J1 pin…

power_profile_stop

Stop the running power profile and return its statistics (and, with points, a trace).

ParameterTypeDescription
pointsintegerPoints of current/voltage trace to return alongside the statistics; 0 = statistics only.

power_status

The target-power supplies: 5v (the pod's 5 V, eFuse 1) and external (eFuse 2) with on/off, tripped state, bus voltage and current draw, and on BenchPod v4 also 3v3 and 1v8 (on or off, no current monitor). All in supplies, by name; internal and external are the deprecated copies of 5v and external. Also a live reading of each external INA current monitor attached with expansion or the wiring profile (monitors).

reset_target

Drive the DUT's reset line from the pod's reset pin (rev3 pods, DUT header J1 pin 22).

ParameterTypeDescription
actionstringpulse = reset once; hold = keep the target in reset; release = let it run; status = read only.
pulse_snumberPulse length in seconds (at most 1).

spi_flash_info

Read the JEDEC ID of the SPI NOR flash on the SPI pins (gateware v45+, capability spi_master). present=false means the ID read all 00 or all FF: nothing is answering (wiring, power, or /WP and /HOLD not tied high). The pins are released again afterwards. Gateware v65+: the emulation image (loaded by sensor_start) has no SPI master. With no I2C/SPI/UART sensor running the pod switches to the loop image by itself (~3 s); with sensors running this refuses (BP0059): sensor_stop first, or do it before sensor_start.

ParameterTypeDescription
csLA channel (or wiring name) for CS; omit for the profile's spi_cs.
hzintegerSCK rate; rounded down to what the pod can do.
misoLA channel (or wiring name) for MISO (the chip's DO); omit for the profile's spi_miso.
modeintegerSPI mode; 1 and 2 need gateware v55+.
mosiLA channel (or wiring name) for MOSI (the chip's DI); omit for the profile's spi_mosi.
sckLA channel (or wiring name) for SCK; omit for the profile's spi_sclk.

spi_flash_program

Erase, write and verify an image into the SPI NOR flash wired to the SPI pins. 25-series parts, first 16 MB. Throughput is roughly 30 KB/s over the LAN (erase is extra) and slower over the cloud. Fails with the pod's message when nothing answers, the part is write-protected, or a chunk does not verify. Gateware v65+: the emulation image (loaded by sensor_start) has no SPI master. With no I2C/SPI/UART sensor running the pod switches to the loop image by itself (~3 s); with sensors running this refuses (BP0059): sensor_stop first, or do it before sensor_start.

ParameterTypeDescription
file *stringImage path on the machine running this server (raw binary).
addrintegerFlash address to write the image at.
csLA channel (or wiring name) for CS; omit for the profile's spi_cs.
erasebooleanErase the 4 KB sectors the image covers first.
hold_resetbooleanHold the DUT in reset for the job (its controller then cannot drive the same bus); released after.
hzinteger
misoLA channel (or wiring name) for MISO (the chip's DO); omit for the profile's spi_miso.
modeintegerSPI mode; 1 and 2 need gateware v55+.
mosiLA channel (or wiring name) for MOSI (the chip's DI); omit for the profile's spi_mosi.
sckLA channel (or wiring name) for SCK; omit for the profile's spi_sclk.
verifybooleanThe pod reads every chunk back and fails on a difference.

spi_flash_read

Read bytes back from the SPI NOR flash, to a file or (up to 4096 bytes) as hex.

ParameterTypeDescription
addr *integer
length *integer
csLA channel (or wiring name) for CS; omit for the profile's spi_cs.
filestringWrite the bytes to this path on the server's machine; omit to get up to 4096 bytes back as hex.
hzinteger
misoLA channel (or wiring name) for MISO (the chip's DO); omit for the profile's spi_miso.
modeintegerSPI mode; 1 and 2 need gateware v55+.
mosiLA channel (or wiring name) for MOSI (the chip's DI); omit for the profile's spi_mosi.
sckLA channel (or wiring name) for SCK; omit for the profile's spi_sclk.

spi_transfer

One full-duplex SPI transaction (CS asserted for all of tx) with any SPI device on the SPI pins. Returns what came back on MISO. The SPI master is armed for the call and released after it. Gateware v65+: the emulation image (loaded by sensor_start) has no SPI master. With no I2C/SPI/UART sensor running the pod switches to the loop image by itself (~3 s); with sensors running this refuses (BP0059): sensor_stop first, or do it before sensor_start.

ParameterTypeDescription
tx_hex *stringBytes to send, as hex (e.g. 9f000000 reads a JEDEC ID). Up to 4096 bytes.
csLA channel (or wiring name) for CS; omit for the profile's spi_cs.
hzinteger
misoLA channel (or wiring name) for MISO; omit for the profile's spi_miso.
modeintegerSPI mode; 1 and 2 need gateware v55+.
mosiLA channel (or wiring name) for MOSI; omit for the profile's spi_mosi.
sckLA channel (or wiring name) for SCK; omit for the profile's spi_sclk.

i2c_open

Make the pod an I2C master on two LA pins (gateware v55+), replacing any open session. Then i2c_transfer, i2c_scan, or capture_la with send. SWD, SPI and I2C exclude each other. "i2c busy" means another connection (the desktop app, the web app, a script) holds the pod's I2C master: close it there. Gateware v65+: the emulation image (loaded by sensor_start) has no I2C master. With no I2C/SPI/UART sensor running the pod switches to the loop image by itself (~3 s); with sensors running this refuses (BP0059): sensor_stop first, or do it before sensor_start.

ParameterTypeDescription
hzintegerSCL rate.
pullupsstringpod: channels with the pod's pull-up on (set_pull(pull="up") first, LA1-LA6 today); external: the board has its own.
sclSCL channel; omit for the profile's i2c_scl.
sdaSDA channel; omit for the profile's i2c_sda.

i2c_transfer

Write, read, or write then read on the open I2C session. Neither = a probe. A NACK is not an error: ack is false and nack_at says which byte.

ParameterTypeDescription
addr *integer7-bit address.
readintegerBytes to read after a repeated START.
write_hexstringBytes to write, hex (up to 128), e.g. a register.

i2c_scan

Which addresses answer on the open I2C session.

ParameterTypeDescription
endinteger
startinteger

i2c_close

Release the I2C master's pins (safe when none is open).

flash

Program the DUT over SWD or JTAG through the pod's CMSIS-DAP probe. SWD or JTAG is chosen for you, there is no transport argument: JTAG when the four JTAG pins (`tck`, `tms`, `tdi`, `tdo`, from the arguments or the profile's jtag_*) are known and either no SWD pins are, or the target is JTAG only (esp32, esp32s2, gd32vf103, fe310, k210 and riscv* OpenOCD configs, e.g. target/esp32.cfg); otherwise SWD. JTAG pins passed in the call mean JTAG, SWD pins passed mean SWD, else the profile's debug_port (swd or jtag) decides. JTAG needs the pod's `jtag` feature (newer firmware…

detect

Find out which chip is wired to the pod, from the wiring profile. Needs target power on (power_on) and the LA voltage set; with the supply off nothing is probed (powered=false). `swd` and `jtag` read the debug port's IDs without halting, resetting or writing the chip (pod firmware with the `dap_id` feature; older firmware is reported in skipped) and name the chip from its ID register (an STM32's DEV_ID, a Nordic part) or JTAG IDCODE. `usb` reads the device already mounted on the pod's host port (usb_host first: detect never turns host mode on). With invasive=true the c…

ParameterTypeDescription
invasivebooleantrue (default): also run the probes that reset the chip (programming-mode ID read, ESP32 ROM loader). false: only swd, jtag and usb, which never reset or write the chip.
methodsOnly these probes: swd, jtag, updi, pic, c2, tpi, pdi, sbw, esp32, usb. Omit for every probe the wiring profile makes possible. A named probe the profile does not wire is reported in skipped.

capture_uart

Record the DUT's UART output for a fixed window (or until until_regex matches). The channels, baud, parity and stop bits come from the wiring profile when omitted (8N1 unless the profile says otherwise). half_duplex runs it on one wire, and entry runs a pod-timed boot-mode entry first (reset with TX low, release, first bytes). de: the pod switches an RS-485 transceiver's DE on that LA channel while it sends. port usb captures the hosted board's USB serial port instead (baud default 115200, dtr, rts).

ParameterTypeDescription
duration_s *numberCapture window in seconds.
baudUART baud rate; omit for the wiring profile's uart_baud.
deLA channel (or wiring name) wired to an RS-485 transceiver's DE + /RE. The pod drives it high while it sends and low otherwise, so the transceiver listens whenever the pod is not sending and a fast de…
de_active_lowbooleanDrive DE low while sending (an active-low enable).
dtrport usb only: the DTR line (default true). Many boards reset or enter their loader on DTR and RTS: set them to what the board expects.
entryRun a boot-mode entry on the pod first: TX low, reset, release, then the first bytes, all timed on the pod. Needs gateware v57 and the pod's reset pin. Omit for a plain session.
half_duplexbooleanOne-wire UART: rx alone carries both directions (tx defaults to rx). The pod only pulls the line low and its pull-up (LA1-LA6) or the board's holds it high; the pod does not read back its own bytes. F…
parityParity bit after the 8 data bits; omit for the profile's uart_parity (none unless set). Anything but 8N1 needs firmware 3.10.8+ (gateware v56).
portusb: the serial port of the board the pod hosts over USB (usb_host; a CDC ACM port, or the FTDI, CP210x or CH34x chip of a dev kit) instead of LA pins: the boot log over the cable the board was flashe…
rtsport usb only: the RTS line (default true).
rxLA channel (or wiring name) wired to the DUT's TX; omit for the profile's uart_rx.
stop_bitsStop bits after the data (and parity) bits; omit for the profile's uart_stop_bits (1 unless set).
txLA channel (or wiring name) wired to the DUT's RX; omit for the profile's uart_tx.
until_regexPython regular expression; stop as soon as it matches.

power_cycle_and_capture

Power the target off, then capture UART while it powers back on — the boot banner lands in the window. The channels, baud, frame (parity, stop bits) and power supply come from the wiring profile when omitted.

ParameterTypeDescription
baudUART baud rate; omit for the wiring profile's uart_baud.
delay_snumberSeconds into the capture the power comes back.
duration_snumberCapture window in seconds; must exceed delay_s.
efuseDeprecated, use supply: eFuse 1 is 5v, eFuse 2 is external. Omit for the wiring profile's supply.
off_settle_snumber
parityParity bit after the 8 data bits; omit for the profile's uart_parity (none unless set). Anything but 8N1 needs firmware 3.10.8+ (gateware v56).
rxLA channel (or wiring name) wired to the DUT's TX; omit for the profile's uart_rx.
stop_bitsStop bits after the data (and parity) bits; omit for the profile's uart_stop_bits (1 unless set).
supplyThe power supply: 5v (the pod's 5 V through eFuse 1), external (your own supply through eFuse 2) or, on BenchPod v4, 3v3 (switched 3.3 V, J1 pin 17, about 1.45 A limit) or 1v8 (switched 1.8 V, J1 pin…
txLA channel (or wiring name) wired to the DUT's RX; omit for the profile's uart_tx.
until_regexPython regular expression; stop as soon as it matches.

uart_open

Start buffering the DUT's UART in the background (replacing any open session). Open it BEFORE an action whose output matters (power_on, reset_target), then uart_read; use uart_write to type into the DUT's console. The channels and baud come from the wiring profile when omitted; the result says which were used. So do parity and stop_bits (8N1 unless the profile says otherwise). The LA pins are 1.8/3.3 V only: a 5 V UART needs a level shifter and an RS-485 bus (Modbus RTU) an external RS-485 transceiver in between. A channel used as GPIO must be released first (gpio_rele…

ParameterTypeDescription
baudUART baud rate; omit for the wiring profile's uart_baud.
deLA channel (or wiring name) wired to an RS-485 transceiver's DE + /RE. The pod drives it high while it sends and low otherwise, so the transceiver listens whenever the pod is not sending and a fast de…
de_active_lowbooleanDrive DE low while sending (an active-low enable).
dtrport usb only: the DTR line (default true). Many boards reset or enter their loader on DTR and RTS: set them to what the board expects.
entryRun a boot-mode entry on the pod first: TX low, reset, release, then the first bytes, all timed on the pod. Needs gateware v57 and the pod's reset pin. Omit for a plain session.
half_duplexbooleanOne-wire UART: rx alone carries both directions (tx defaults to rx). The pod only pulls the line low and its pull-up (LA1-LA6) or the board's holds it high; the pod does not read back its own bytes. F…
parityParity bit after the 8 data bits; omit for the profile's uart_parity (none unless set). Anything but 8N1 needs firmware 3.10.8+ (gateware v56).
portusb: the serial port of the board the pod hosts over USB (usb_host; a CDC ACM port, or the FTDI, CP210x or CH34x chip of a dev kit) instead of LA pins: the boot log over the cable the board was flashe…
rtsport usb only: the RTS line (default true).
rxLA channel (or wiring name) wired to the DUT's TX; omit for the profile's uart_rx.
stop_bitsStop bits after the data (and parity) bits; omit for the profile's uart_stop_bits (1 unless set).
txLA channel (or wiring name) wired to the DUT's RX; omit for the profile's uart_tx.

uart_write

Send text to the DUT's RX through the open UART session.

ParameterTypeDescription
text *string
line_endingstringAppended after text.

uart_read

Return the UART output received since the previous uart_read, optionally waiting for a match.

ParameterTypeDescription
timeout_snumberSeconds to wait for until_regex (or, without one, for any new output).
until_regexPython regular expression; stop as soon as it matches.

uart_close

Stop the background UART session (safe when none is open).

sensor_library

The sensor library: ready definitions the pod can emulate (name, kind, label) and the version in use. Sensor flow: sensor_library -> sensor_show(name) for its params -> set_la_voltage and, for I2C, set_pull(pull="up") on SDA/SCL -> sensor_start(definition=name, pins) -> sensor_set / sensor_fault / sensor_stimulus_load + sensor_stimulus_start -> sensor_status, sensor_regs -> sensor_stop. No library entry for the part? Write a definition from its datasheet (sensor_format) and pass the YAML to sensor_validate, then sensor_start. Needs no pod.

ParameterTypeDescription
versionSensor library version: 'latest', a release such as '0.2.0', or 'default' (the version the SDK pins). Sets it for the other sensor tools too. Omit to keep the current one.

sensor_show

One library definition: its YAML (a starting point for your own part) and the params sensor_set takes. Needs no pod.

ParameterTypeDescription
name *stringLibrary entry name ('sht4x') or path.
versionSensor library version: 'latest', a release such as '0.2.0', or 'default' (the version the SDK pins). Sets it for the other sensor tools too. Omit to keep the current one.

sensor_format

The sensor definition and stimulus format (Markdown): read it before writing a definition from a datasheet. Needs no pod.

ParameterTypeDescription
versionSensor library version: 'latest', a release such as '0.2.0', or 'default' (the version the SDK pins). Sets it for the other sensor tools too. Omit to keep the current one.

sensor_validate

Check a definition: its header here, then a dry-run compile on the pod (nothing is kept). Without a connected pod only the header (format, kind, name, params, size) is checked. A compile error names the place, e.g. "registers[4].s16be: unknown name 'ax' at 17": fix it and validate again.

ParameterTypeDescription
definition *A library sensor name ('bme280', see sensor_library), a .yaml/.json path on the machine running this server, the definition itself as YAML or JSON text, or a JSON object. Write your own from a datashe…

sensor_start

Make the pod play a sensor for the DUT: upload the definition (library name or your own YAML/JSON) and start it on pins. Set the LA voltage first, and the pull-ups for I2C (set_pull(la=[sda, scl], pull="up"), LA1-LA6). Starting an instance name that runs replaces it. Up to 4 I2C sensors (several may share one bus at different addresses), 1 SPI, 1 UART and 2 analog sensors (one per output) run at once. I2C/SPI/UART sensors load the pod's emulation FPGA image if another runs (image_loaded in the result); it stays after sensor_stop, and control_loop / deep replays switch back…

ParameterTypeDescription
definition *A library sensor name ('bme280', see sensor_library), a .yaml/.json path on the machine running this server, the definition itself as YAML or JSON text, or a JSON object. Write your own from a datashe…
addressI2C: the definition's address or one of its alt_addresses (0x77 or "0x77"); omit for its address.
baudUART: override the definition's baud rate.
instance
pinsRole -> LA channel (1-14) or wiring name. I2C: sda, scl (default: the profile's i2c_sda/i2c_scl), optional drdy. SPI: sclk, mosi, miso, cs (default: the profile's spi_*; no data-ready pin). UART: tx (…
valuesInitial param values; omitted ones start at their defaults.

sensor_set

Change what a running sensor reports; the DUT sees it on its next read or message. Out-of-range values are refused with the range.

ParameterTypeDescription
instance *stringInstance name, 1 to 16 lowercase letters, digits or _; sensor_start defaults it to the definition's name (pass one when that name is longer).
values *objectParam key -> value, e.g. {"temperature_c": 31.5}; the keys, units and ranges are the definition's params (sensor_show, or the params sensor_start returns).

sensor_stimulus_load

Upload values over time (and timed faults) for the running sensors; replaces the loaded stimulus. sensor_stimulus_start plays it.

ParameterTypeDescription
stimulus *A stimulus (kind: stimulus): YAML or JSON text, a JSON object, or a path on the machine running this server. Signals are params ('temperature_c', or 'env.temperature_c' with several sensors); segments…

sensor_stimulus_start

Play the loaded stimulus; it ends after its last segment (signals hold their last value) unless it has repeat: true.

ParameterTypeDescription
at_sStart this many seconds into the stimulus; omit for t = 0.

sensor_stimulus_stop

Stop the stimulus; the values stay where it left them.

sensor_fault

Make a running sensor misbehave now, to test the DUT's error handling.

ParameterTypeDescription
instance *stringInstance name, 1 to 16 lowercase letters, digits or _; sensor_start defaults it to the definition's name (pass one when that name is longer).
type *stringstuck (readings freeze), offset/gain (param + value), no_response (I2C NACK, SPI MISO released, UART silent), corrupt (register at XOR mask), bus_stuck (I2C SDA low, at most 1 s), garbage/drop/baud_er…
atcorrupt: the register.
duration_sOmit to last until sensor_fault_clear.
maskcorrupt: the XOR mask.
paramThe param a stuck/offset/gain fault applies to.
rate_hzgarbage: bytes per second (default 100).
valueoffset/gain amount, drop probability, baud error percent, or a stuck/open/short value.

sensor_fault_clear

End a sensor's faults (injected with sensor_fault or by the stimulus).

ParameterTypeDescription
instance *stringInstance name, 1 to 16 lowercase letters, digits or _; sensor_start defaults it to the definition's name (pass one when that name is longer).

sensor_stop

Stop a sensor (or all): the pod releases its pins and forgets the definition. The emulation FPGA image stays loaded.

ParameterTypeDescription
instanceThe instance to stop; omit to stop every sensor.

sensor_status

Running sensors (slot, pins, values, faults with left_s, bus counters: writes and last_write say the DUT talked to it; transfers is always null), the stimulus and the FPGA image.

sensor_regs

The bytes an I2C/SPI sensor answers now (the DUT's own writes included).

ParameterTypeDescription
instance *stringInstance name, 1 to 16 lowercase letters, digits or _; sensor_start defaults it to the definition's name (pass one when that name is longer).
lengthBytes to read; omit for the rest of the image.
startintegerOffset in the 256-byte register image (i2c.page is its window).

sensor_capture

Wait for the DUT's next transaction on an I2C sensor's bus (up to 2 s), capture it from its START and decode it into a transaction trace (S/Sr/P, addr, data, ACK). A quiet bus is a trigger timeout error. Firmware without the sensor_la_trigger capability captures at once instead. I2C only: capture an SPI or UART sensor's pins with capture_la.

ParameterTypeDescription
instance *stringInstance name, 1 to 16 lowercase letters, digits or _; sensor_start defaults it to the definition's name (pass one when that name is longer).
addressAlso report whether the DUT addressed this device.
registerWith address: the bytes the DUT read from this register.
samplesintegerPacked bytes to capture (4 samples each).

set_pull

Pull LA channels up or down, or switch their pull resistor off. For an I2C bus pull SDA and SCL up. The pull-ups pull to the LA voltage (1.8 V or 3.3 V).

ParameterTypeDescription
la *arrayLA channels (1-14).
pull *stringThe direction: up, down or off. The pod picks the resistor from the pin's function (ohms and strength in the result). A channel pulls only the ways its resistor allows (pull_status: supported): on the…

usb_network

Read the pod's USB network setting, or turn the adapter off. Only the device changes it: Ethernet, Wi-Fi and the cloud may only read it.

ParameterTypeDescription
enabledOmit to read the setting. false turns the pod's USB network adapter off (only over the pod's USB network link: connection 'usb'); the pod then re-enumerates as its USB console only and this connection…

usb_host

Make the pod a USB host for the board under test, or read what is on its host port. Needs pod firmware 4.0.3 or later and a LAN or cloud connection: while the pod hosts it is off the computer's USB (no console, no USB network), and over connection 'usb' it is refused (BP0076). The report names the device that enumerated (IDs, strings, interfaces). A board that draws power but shows connected=false has no D+/D- link to the pod; line_speed 'low' from a full-speed board means D+ and D- are swapped. usb_flash starts host mode itself when needed. Host mode ends by its timeo…

ParameterTypeDescription
enabledOmit to read the state. true starts host mode (or renews its timeout), false stops it.
pidWait for this product ID only (hex, "0478").
portusb_a: the USB-A host port (digital v4 and later). usb_c: the pod's own USB-C connector through a breakout, on any pod. Omit to let the server pick from the board revision.
timeout_sintegerSeconds until the pod goes back to being a USB device by itself.
vidWait for this vendor ID only (hex, "16c0").
wait_snumberWith enabled true, or with it omitted while hosting: wait up to this long for a board to mount. 0 does not wait.

usb_flash

Flash the board on the pod's USB host port, the way a computer would. Needs pod firmware 4.0.3 or later and a LAN or cloud connection. There is nothing to choose: the loader comes from the file and the board that mounted (a UF2 or drag-and-drop drive, DFU or STM32 ROM loader, Teensy, Arduino AVR or SAMD, ESP32, a Pico in BOOTSEL: a .uf2 goes to its drive, a .bin or .hex through PICOBOOT with every page read back), and `reason` says why. .hex and .dfu files are converted to a binary with their address. Starts host mode when it is off; the board must be in its bootloader…

ParameterTypeDescription
file *stringFirmware path on the machine running this server: .uf2, .bin, .hex or .dfu.
addressStart address for a .bin ("0x08000000" for an STM32, "0x2000" for a SAMD sketch, "0x10000" for an ESP32 app). Omit: from a .hex or .dfu file, else the loader's usual one.
leavebooleanfalse keeps a DFU, Teensy, AVR, SAMD or ESP board in its bootloader at the end.
modeOverride the loader. Omit: the server picks it from the file and the board (see reason in the result).
nameFor a board that shows a drive: the file name on it (8.3). Omit: the file's name.
portHost port when host mode is off and has to be started; omit for the board's own.
timeout_sAbort the flash after this long. Omit: a minute plus the file size at 2.5 KB/s.
verifybooleanRead the drive back after a drive flash: the loader's FAIL.TXT is reported as the failure (a DAPLink board says why it refused the file), and a UF2 file is compared with the loader's CURRENT.UF2 while…

usb_check

Check the USB firmware of the board on the pod's host port, with numbers a computer cannot get. Needs pod firmware 4.0.3 or later, a LAN or cloud connection, and the board's USB power (VBUS) wired to the 5v supply (eFuse 1) target power and switched on (power_on; every test but reset). Starts host mode when it is off. The check runs in the background of the pod and this call returns when it ends: passed is the verdict, result the numbers. A board that fails is a normal result (passed false). While it runs, usb_flash and the USB serial port are refused. A refusal says wh…

ParameterTypeDescription
test *stringenumerate: power-cycles the board through the 5v supply (eFuse 1) and times power-on to pull-up, descriptor and mounted. power: the board's current (5v supply, eFuse 1) against the configuration's bMa…
countenumerate (default 10) and reset (default 20): cycles. replug (default 10, up to 100): cycles per dropout length.
duration_mspower (default 3000) and suspend (default 1000): the measuring time.
off_msenumerate: how long the rail stays off, 50 to 10000 (default 500). replug: a dropout length or a list of up to 6, 1 to 5000 ms (default [5, 20, 100, 500]).
portHost port when host mode is off and has to be started; omit for the board's own.
settle_mssuspend: the wait after the bus is suspended before measuring (default 200).
timeout_msenumerate, reset, replug: how long to wait for the board after each cycle (default 5000).
timeout_sAbort the check after this long. Omit: its worst case plus a margin.

usb_hid

Read the HID interfaces of the board on the pod's USB host port and its input reports (a keyboard's keys, a mouse, a gamepad). Needs pod firmware 4.0.3 or later and usb_host on with the board mounted. Typical: usb_hid(list), usb_hid(start), press a key or drive the device, usb_hid(read, count, timeout_s), usb_hid(stop). A read without a start starts the capture and leaves it running. The capture ends by itself when the board detaches or host mode ends (capturing false in a read). While it runs, usb_flash and usb_check are refused. Reports are hex: with several report ID…

ParameterTypeDescription
actionstringlist: the HID interfaces of the board (the first two) with their report descriptors. start: begin catching input reports (keyboard keys, mouse, gamepad, custom HID) into a ring of 64 on the pod. read:…
countintegerread: at most this many reports.
instanceread: only the reports of this HID interface (the others stay in the ring).
timeout_snumberread: when the ring holds no report, wait up to this long for one. The result holds what is there, possibly none.

log_level

Read or set how much the pod prints on its USB console (firmware newer than 3.10.12). info is the default; debug also prints every command trace and the retry detail of the cloud, Wi-Fi and DHCP loops on the pod's console; warn and error print less. It changes only the console, never a tool's result.

ParameterTypeDescription
levelOmit to read the level. Set one to change it; the pod stores it across reboots and firmware updates.

reboot

Restart the pod and wait until it answers again (up to 60 s). Use it for a stuck pod, for example captures that answer busy, or an error that says to reboot the pod. The DAC, DUT power, pulls, sensors and open UART, CAN and I2C sessions are gone afterwards; the wiring profile's pin directions and I/O voltage are sent again. BP0093 (hard on a pod that cannot power-cycle): use soft, or ask the user to unplug the pod's power. Needs pod firmware with reboot.

ParameterTypeDescription
modestringsoft restarts the processor. hard power-cycles the pod itself and works only on a pod that can (status lists power_cycle in hw; none today): BP0093 otherwise.

lan_tls

The pod's LAN API over TLS: port 8443 (this server's default for a LAN address), HTTPS-only, and the certificate clients pin (sha256). Connections to a network address use TLS by default when the pod has it. Installing your own certificate: `benchpod lan-tls set-cert` or the SDK's set_lan_tls_cert.

ParameterTypeDescription
https_onlyOmit to read. True: the pod refuses plaintext port 8080 on Ethernet and Wi-Fi, so only TLS (8443) crosses the LAN; its USB link keeps 8080. False turns it back off, which the pod only takes over TLS,…
regeneratebooleanTrue: the pod makes a new key and self-signed certificate. Clients that pinned the old one must trust the new one (`benchpod lan-tls trust`); this server's pin follows.

sig_lock

Read the pod's signature policy and signing keys (no arguments), or lock it. require_pq and revoke CANNOT BE UNDONE over the network: only `sig-lock clear confirm` on the pod's USB serial console clears them (a DFU install does not). Ask the user before using either, say what it does, and pass the confirm word only after they agreed. Never use them on your own. Over LAN the computer must be paired; the cloud needs an organization owner or admin. Refusals read 'sig_lock: <why>'. Needs pod firmware with sig_lock.

ParameterTypeDescription
confirmThe word that confirms a lock: 'require-pq' for require_pq, 'revoke-key' for revoke. Only give it after the user said yes.
forcebooleanWith require_pq: set it even when the running firmware was not installed from a format 2 manifest, which can leave the pod unable to update. The reply has a warning.
kindWith revoke: the kind of key.
require_pqbooleanTrue: from now on the pod accepts only format 2 (post-quantum, .sig2) firmware manifests. CANNOT BE UNDONE over the network: only the pod's USB serial console clears it. Needs confirm='require-pq'. Th…
revokeA signing key id (16 hex digits) to revoke, from the keys this tool lists. CANNOT BE UNDONE over the network: only the pod's USB serial console clears it. Needs kind and confirm='revoke-key'.

loader_update

Check (no arguments) or write the boot loader of the running firmware release over the running loader, so a loader with new signing keys or fixes gets onto the pod without USB DFU. The write REPLACES THE BOOT LOADER: a power cut during it (about 0.1 s) leaves the pod with no working loader and it then needs BOOT0 + USB DFU to recover. Check first and read the result; ask the user before writing, say what it does, and pass confirm='update-loader' only after they agreed. Never write on your own. The loader runs from the next reset (reboot). Over LAN the computer must be p…

ParameterTypeDescription
confirmOmit to only check. 'update-loader' writes the loader. Only give it after the user said yes.

pull_status

Every LA channel's pull resistor: state (up, down or off), the directions it supports (empty without a resistor) and its value.

la_pins

What owns each of the 14 LA channels — none (free), gpio, uart_rx/uart_tx, swd_clk/swd_dio, i2c_sda/i2c_scl or step — plus each channel's GPIO mode, commanded level and bias resistor. Read this when a tool is refused with a pin conflict: it names the owner to stop. Live pin levels come along when the gateware can read them. Captures observe every channel whatever owns it.

la_dir

Tell the pod which way each pin's DUT signal goes, so it never drives against a DUT output. connect and set_wiring already send the wiring profile's directions (firmware 3.10.4+); use this for a pin the profile doesn't name. The pod forgets them on a reboot.

ParameterTypeDescription
dirWhich way the DUT signal goes. On dut_output the pod refuses push-pull drivers.
from_wiringbooleanSend the wiring profile's directions again (each role's and signal's default, or the profile's dut_dirs).
laChannels or wiring names, or 'all'. Omit with dir to list every pin.

gpio_mode

Claim LA channels as GPIO so the pod can drive or read them. A channel stays GPIO — across disconnects — until gpio_release, and while it is GPIO nothing else can use it: release it before uart_open, flash or sensor_start on that channel. A channel already owned by another function is refused with a PinConflictError naming the owner and the tool that frees it, and an engaged bias resistor that would fight the mode with a PullConflictError.

ParameterTypeDescription
la *arrayLA channels as numbers 1-14 or wiring-profile names, and expander pins 'EXT1'..'EXTn' (or their names) once an expander is attached (expansion).
levelStarting level of an output (default 0) or open-drain channel (default 1, released). Not allowed for input.
modestringoutput = push-pull; open_drain = 0 pulls low and 1 releases; input = high-Z, level readable.

gpio_write

Set the level of GPIO output / open-drain channels (LA channels in one pod command per level; EXT pins in one bus transaction per expander chip). The channels must already be in an output or open_drain mode (gpio_mode).

ParameterTypeDescription
la *arrayLA channels as numbers 1-14 or wiring-profile names, and expander pins 'EXT1'..'EXTn' (or their names) once an expander is attached (expansion).
level *0 = low; 1 = high (open_drain: released). One level for every channel, or a list with one level per channel.

gpio_read

The live level (0/1) of LA channels and expander pins — omit `la` for all 14 LA channels and every EXT pin. Works whatever owns a channel; a GPIO input is the usual way to watch a DUT output.

ParameterTypeDescription
laLA channels as numbers 1-14 or wiring-profile names, and expander pins 'EXT1'..'EXTn' (or their names) once an expander is attached (expansion).

gpio_wait

Wait until an LA channel or EXT pin reads `level` (reached=false when timeout_s passes first). Polled from this host, so it resolves to a few milliseconds plus the round trip — for precise timing use a triggered capture (capture_la trigger_la) and la_timing instead.

ParameterTypeDescription
la *LA channel 1-14, or a name from the wiring profile — a signal ('READY') or a role ('uart_rx', 'i2c_sda', 'swd_swclk'). Call `wiring` to see the names. The gpio_* tools also take expander pins ('EXT1…
levelinteger0 = low; 1 = high (open_drain: released).
timeout_snumberSeconds to wait.

gpio_pulse

Emit FPGA-timed pulses on an LA channel — a trigger for the DUT, or a step/dir motor train. The channel must be free or a GPIO output at level 0 (it returns to its GPIO level afterwards). The FPGA runs the train by itself, so this returns as soon as it starts.

ParameterTypeDescription
la *LA channel 1-14, or a name from the wiring profile — a signal ('READY') or a role ('uart_rx', 'i2c_sda', 'swd_swclk'). Call `wiring` to see the names. The gpio_* tools also take expander pins ('EXT1…
width_s *numberSeconds the pulse is high (and low between pulses), 4 us to 65.535 ms.
countintegerNumber of pulses (at most 65535).

gpio_release

Stop using channels as GPIO — they go back to high-Z, watched by captures (EXT pins: input). Omit `la` to release every GPIO channel and EXT pin (channels owned by other functions are left alone). Do this before starting a UART session, flashing or emulating a sensor on those channels.

ParameterTypeDescription
laLA channels as numbers 1-14 or wiring-profile names, and expander pins 'EXT1'..'EXTn' (or their names) once an expander is attached (expansion).

expansion

Attach an I2C/SPI GPIO expander board, report it, or detach it. Attaching checks the LA voltage, probes the chip, puts every pin in input and names the pins EXT1..EXTn. Then gpio_mode, gpio_write, gpio_read, gpio_wait and gpio_release take 'EXTn' (or the names) next to LA channels; a write to several EXT pins is one bus transaction per chip. EXT pins are not FPGA-timed: gpio_pulse, la_step, capture triggers and la_dir refuse them. The expander's bus closes on its own before flash, i2c_open and SPI tools; i2c_open on the same two pins shares the bus with it. INA cu…

ParameterTypeDescription
addrI2C chips: the 7-bit address (default the chip's first, 0x20 = 32), or a list for several chips on one bus (EXT pins in that order). INA current monitors: one address (default 0x40 = 64), one chip per…
averagingINA chips: conversions averaged per result: 1, 4, 16, 64, 128, 256, 512 or 1024 (ina219: 1-128 in powers of two). Default 16.
channelina3221 only: channel 1-3.
chipThe expander chip to attach: tca9555, pca9555, mcp23017, pcf8574, pcf8574a, pcf8575, tca6416a, tca6424a, mcp23s17, 74hc595, 74hc165, ina226, ina228, ina238, ina219, ina260, ina3221. Omit for the statu…
conversion_time_sINA chips: seconds per shunt and bus conversion (the nearest the chip has, 50 us to 8.2 ms). Default about 1.1 ms.
count74hc595 / 74hc165: chips in the chain (8 pins each).
detachbooleanDetach everything: every EXT pin back to input, the bus released, the INA monitors removed. With addr or name only that INA monitor is detached.
hzBus clock; default 400 kHz for I2C (100 kHz pcf8574), 1 MHz for SPI.
load74hc165 only: the LA channel on SH/LD, pulsed low before each read.
max_current_aINA chips: the largest current expected, amps: ina219, ina228 and ina238 pick their narrowest input range that covers it (finer steps).
nameINA current monitors: the monitor's name (default 'ina226@0x40'; not 'ext'). With detach: the monitor to detach.
namesNames for the pins, {'EXT1': 'LED1', ...}; usable wherever EXTn is.
pullupsI2C pull-ups: pod (LA1-LA6 only, pull to the LA voltage, switched on here) or external (the breakout's). Default pod on LA1-LA6 when the pod has pull-ups at this voltage (1.8 V: firmware newer than 3.…
sclI2C SCL; omit for the wiring's i2c_scl.
sdaI2C SDA; omit for the wiring's i2c_sda.
shunt_ohmINA current monitors: the shunt resistor in ohms (e.g. 10.0). Required, except for the ina260 (own 2 mohm).
spiSPI chips: [sck, mosi, miso, cs]; omit for the wiring's spi_* roles. All four are needed: a 74hc595's MISO and a 74hc165's MOSI are free pins.

analog_path

Set every analog mux and relay for a named path in one step. dac_3v3/dac_5v/dac_12v route the DAC to an output; adc_ext connects the ADC to the front SMA; cal1/cal2 loop the 5 V/12 V DAC output back into the ADC; current_in reads the 4-20 mA input (J8); current_out switches the DAC voltage outputs off for the 4-20 mA output (J9); off parks everything. range also sets the ADC input range (see adc_range); off and cal2 put it back to normal.

ParameterTypeDescription
path *string
rangeADC input range: normal (±32.8 V, ~1 mV/count) or low (±5.46 V, ~167 µV/count, 1.82 MΩ input: 1x leads only; analog module v3r4+). Omit to keep the range the pod is in.

adc_range

Read or switch the ADC input range (analog module v3r4 and later, firmware 3.9.5+). normal is the ÷12 divider: ±32.8 V, about 1 mV per count. low is ÷2: ±5.46 V, about 167 µV per count, 6x the resolution for signals up to ±5 V. The low range's input is 1.82 MΩ: tell the user to use 1x leads, not a 10x scope probe. It applies to ext, cal1 and current_in (not cal2), and stays until changed, analog_path off or cal2, or a pod restart. capture_adc and adc_read scale with the range in use. A board without the low range refuses low. Use low for small signals; switch back t…

ParameterTypeDescription
rangeADC input range: normal (±32.8 V, ~1 mV/count) or low (±5.46 V, ~167 µV/count, 1.82 MΩ input: 1x leads only; analog module v3r4+). Omit to keep the range the pod is in.
testbooleanRun the self-test instead: the 5 V output drives the cal1 loopback at 1 V and 3.5 V and both ranges read it. Nothing may be connected to the 5 V output.

dac_output

Route a DAC output (3v3, 5v, 12v = ±12 V, cal1, or off) and drive a calibrated DC voltage on it. cal1 sets the level on the 5 V DAC stage routed into the ADC loopback (the 5 V output is disconnected while it is on), so adc_read source cal1 reads it back with no relay switching in between. It needs firmware with feature dac_out_cal1 (the pod refuses older firmware with a clear error).

ParameterTypeDescription
path *string
voltsCalibrated DC volts to drive; omit to only route.

current_out

Hold a current on the 4-20 mA output (terminal J9), in amps, or read the range it can do. The output is loop powered: it needs an external floating supply on J9 (pin 1 plus to the supply plus, pin 2 through the receiver to the supply minus; 8 V plus 20 mA times the loop resistance, 30 V at most). Nothing in the loop may touch pod ground, also not through a target that shares a ground with the pod. Ask the user how J9 is wired before driving it. Never wire J9 straight into J8. The pod cannot see the loop: the call succeeds with the supply off. It cannot go below its liv…

ParameterTypeDescription
currentLoop current to hold, in AMPS: 0.004 to 0.020 (0.012 is 12 mA). Omit to only read the range.

adc_read

One calibrated voltage: ext = front SMA (true volts), cal1/cal2 = DAC loopbacks, current_in = 4-20 mA input (J8). current_in also returns current, the loop current in amps. range low reads small signals (up to ±5.46 V) at 6x the resolution on analog module v3r4+; overrange says the input clipped. From analog module v4 current_in reads in the low range unless range is given (the next other route gives normal back). Refused while the input is still moving (e.g. a DAC output left running).

ParameterTypeDescription
rangeADC input range: normal (±32.8 V, ~1 mV/count) or low (±5.46 V, ~167 µV/count, 1.82 MΩ input: 1x leads only; analog module v3r4+). Omit to keep the range the pod is in.
sourcestring

calibration

The calibration the pod has stored: the ADC offset (measured on current_in, terminal J8) and the fit it uses, and on firmware 3.9.4+ the DMM-guided parts (dac: a line per DAC output, adc_gain_ppm: a gain per ADC source). calibrated=false means the pod has no ADC offset: analog readings can be off by up to about 50 mV.

calibrate

Calibrate the pod's ADC offset on its 4-20 mA input (current_in, terminal J8) and store it on the pod. Nothing may be connected to J8: ask the user to disconnect it and confirm before calling. The pod reads its open input (0 V) and keeps that offset in flash. Every later adc_read on current_in has it taken out, and on firmware 3.9.3+ every other ADC source and capture too (they share the front end). Once per pod is enough: it survives reboots and firmware updates. The pod refuses, and keeps what it had, when something is driving J8 (more than 150 mV; 50 mV before 3.9.3).…

ParameterTypeDescription
clearbooleanTrue removes the stored calibration instead of measuring one.
clear_partWith clear=true, remove only this part: offset, dac (the DMM lines) or adc (the ADC gains). Firmware 3.9.4+.
sourcestringWhat to calibrate. Only current_in, the 4-20 mA input.

calibrate_dac

Store this pod's own line for a DAC output from two DMM readings (firmware 3.9.4+, cap cal_dmm). The flow, with the user holding a bench DMM: ask them to disconnect the DUT from the output and put the DMM (DC volts) on that output's SMA. Drive each set point with dac_output(path, volts) and keep its code16 (3v3: 0.5 and 3.0 V, 5v: 1.0 and 4.0 V, 12v: -5 and +5 V), ask the user what the DMM reads, then call this with both points and switch the output off (dac_output path off). From then on dac_output, generate and the DAC output limits use this line. The pod refuses, and ke…

ParameterTypeDescription
code1 *integerThe 16-bit code of the first set point: code16 from dac_output.
code2 *integerThe 16-bit code of the second set point.
path *stringThe DAC output: 3v3, 5v or 12v.
volts1 *numberWhat the DMM read at the first set point, in volts.
volts2 *numberWhat the DMM read at the second set point, in volts.

calibrate_adc_gain

Measure and store an ADC source's gain against a DMM-calibrated DAC output (firmware 3.9.4+). Needs the ADC offset (calibrate) and the driving output's DMM line (calibrate_dac on 5v for cal1, 12v for cal2 and ext). For ext, ask the user to connect the SMA cable first. The pod drives two set points itself and switches the outputs off afterwards; measured says what it saw. Nothing to read on a DMM.

ParameterTypeDescription
source *stringcal1 (and current_in) through the 5 V output, cal2 through the ±12 V output, ext (the front SMA, captures and the control loop) through an SMA cable from the ±12 V output to the ADC input.
rangestringlow measures the ADC low range's gain instead (analog module v3r4+, firmware 3.9.5+): source must be cal1, and the one gain serves every source in the low range.

capture_adc

Capture the ADC and summarise it: calibrated stats, dominant frequency and a min/max envelope. source current_in captures the 4-20 mA input (J8): the stats are then the loop current in amps (unit "A"), and replay(from_last_capture=true, dac_path="current_out") plays it back as a current. Above 32768 samples the capture streams from PSRAM (multi-second captures work). With trigger_la the capture waits for that edge or level, so t = 0 is the trigger moment. The capture is kept for replay and save_capture_as_recording. range low captures small signals (up to ±5.46 V) at…

ParameterTypeDescription
oversamplebooleanConvert at 400 kS/s and average down to sample_rate_hz: lower noise and a smaller step at 0 V, for short captures (about 5 s at most).
pointsintegerPoints in the returned min/max envelope.
rangeADC input range: normal (±32.8 V, ~1 mV/count) or low (±5.46 V, ~167 µV/count, 1.82 MΩ input: 1x leads only; analog module v3r4+). Omit to keep the range the pod is in.
sample_rate_hzSample rate in Hz; omit for the device maximum.
samplesinteger
sourceRoute this ADC source first; omit to keep routing.
trigger_edgestringWhat starts the capture on trigger_la.
trigger_laWait for an edge or level on this LA channel (a number, or a wiring-profile name) before sampling, so t = 0 is that moment. Omit for a free-running capture. Needs the capture_trigger capability.
trigger_timeout_snumberSeconds to wait for the trigger before the capture is abandoned with a TriggerTimeout.

capture_la

Capture all 14 LA channels and summarise each: levels, edge count, first edge, estimated frequency. With trigger_la the capture starts on that edge or level instead of immediately, so a short event can be caught at a high sample rate. The capture is kept for decode_la and la_timing. sample_rate_hz goes up to 12 MS/s, or 48 MS/s on gateware v50+ (48, 24 or 16 MS/s); above 12 MS/s a signal changing over ~6 million times per second for long stops early (truncated); retry at 12 MS/s. send i2c or spi needs the pod's bus master, which the emulation image (gateware v65+) lac…

ParameterTypeDescription
sample_rate_hzSample rate in Hz; omit for the device maximum.
samplesinteger
sendRun one transaction right after the capture arms (gateware v55+): i2c (the i2c_open session, else one from the wiring), spi (SPI pins from the wiring) or gpio (a GPIO output). Without trigger_la it tr…
stop_dac_after_sSeconds into the capture to cut a running DAC output (see the DUT react).
trigger_edgestringWhat starts the capture on trigger_la.
trigger_laWait for an edge or level on this LA channel (a number, or a wiring-profile name) before sampling, so t = 0 is that moment. Omit for a free-running capture. Needs the capture_trigger capability.
trigger_pre_samplesintegerWith trigger_la: also return up to this many samples from before the trigger (gateware v50+).
trigger_timeout_snumberSeconds to wait for the trigger before the capture is abandoned with a TriggerTimeout.

capture_correlated

ADC and LA captured from one hardware trigger, so their timebases align. Both are kept. With trigger_la both streams start on that edge or level. There is one ADC: the analog half is the SMA voltage or, with source current_in, the loop current on J8 (unit "A"), never both.

ParameterTypeDescription
adc_sample_rate_hzSample rate in Hz; omit for the device maximum.
adc_samplesinteger
la_sample_rate_hzSample rate in Hz; omit for the device maximum.
la_samplesinteger
pointsintegerPoints in the returned min/max envelope.
sourceRoute this ADC source first for the analog half; omit to keep routing. current_in captures the 4-20 mA input (J8) and the analog stats are then amps.
stop_dac_after_sSeconds into the capture to cut a running DAC.
trigger_edgestringWhat starts both streams on trigger_la.
trigger_laWait for an edge or level on this LA channel (a number, or a wiring-profile name) before sampling, so t = 0 is that moment. Omit for a free-running capture. Needs the capture_trigger capability.
trigger_timeout_snumberSeconds to wait for the trigger before the capture is abandoned with a TriggerTimeout.

decode_la

Decode I2C (sda, scl), UART (rx, baud), SPI (sclk + mosi/miso/cs, mode), USB (dp, dm, speed), Modbus RTU (rx, baud, tx), CAN/CAN FD (can, bitrate, data_bitrate), PWM (channels), 1-Wire (onewire) or SMBus/PMBus (sda, scl, pec) from LA data. Sample at least ~10x the bit rate; USB full speed needs a 48 MS/s capture, low speed 6 MS/s; CAN 6 samples per data bit; 1-Wire 1 MS/s (4 MS/s in overdrive). USB items are transactions (token, data, handshake; repeated NAKs merged), transfers the control transfers with the SETUP request and descriptors decoded (an enumeration). D…

ParameterTypeDescription
protocol *string
baud
bitratecan: nominal bit rate, bit/s.
cancan: the transceiver's RXD (or the controller's TX/RX).
capturestringlast = decode the previous capture_la; new = capture first (needs samples/sample_rate_hz).
channelspwm: the channels to measure.
cs
data_bitratecan: CAN FD data bit rate, bit/s (left out: the nominal rate).
dmusb: the channel on D-.
dpusb: the channel on D+.
max_itemsinteger
miso
modeinteger
mosi
onewireonewire: the bus line.
pecstringsmbus/pmbus: auto = a trailing byte that matches is a PEC; on = every transaction ends in one.
rx
sample_pointcan: where a bit is read, as a fraction of it (default 0.75).
sample_rate_hznumber
samplesinteger
scl
sclk
sda
servobooleanpwm: also read the high pulses as servo positions (1 ms = 0 %, 2 ms = 100 %).
speedstringusb: full (12 Mbit/s), low (1.5 Mbit/s) or auto (from the idle state).
txmodbus: the other direction on a two-line tap (rx alone for an RS-485 receive output).

la_timing

Timing of one channel of the last capture_la / capture_correlated: edge timestamps, pulse widths, frequency and duty cycle; with to_la, the delay from its first edge to the next edge on to_la (e.g. a trigger pin to a "result ready" pin). Resolution is one sample; no new capture is taken.

ParameterTypeDescription
la *integerLA channel (1-14) the signal is wired to.
afternumberIgnore edges earlier than this many seconds into the capture.
edgestringWhich transitions to list and to time the delay from.
max_edgesinteger
to_edgestring
to_laAlso measure the delay to the next to_edge on this channel.

generate

Drive a sine, square or sawtooth on a DAC output. The pod takes the volts, calibrates them for dac_path and plays the waveform at the DAC's full 16 bits; both peaks must be on the path. dac_path current_out plays it as a current on the 4-20 mA output (J9), with amplitude and offset in amps and steps of about 0.25 uA. See current_out for the wiring it needs. The DAC voltage outputs are switched off for it. dac_stop then leaves the loop where the waveform stopped: call current_out(0.004) to go back to 4 mA.

ParameterTypeDescription
amplitude *numberPeak volts. On dac_path current_out: peak AMPS (0.006 = 6 mA).
freq_hz *number
waveform *string
dac_pathDAC output. Omitted: 3v3, the lowest voltage output (with route false: the output last routed, cal1 = 5v). Pick the one the DUT pin tolerates: 5v and 12v can damage a 3.3 V pin. cal1 = the 5 V stage r…
duration_sSeconds; omit to run until dac_stop.
offsetCenter volts; default mid-range of dac_path. On current_out: center AMPS (0.012 = 12 mA).
on_capturebooleanStart on the next capture's hardware t0 (phase-locked).
routebooleanRoute dac_path first. false = keep the current analog path (e.g. after analog_path('cal1') for a DAC-to-ADC loopback); dac_path then only sets the volts scaling.
sample_rate_hzSample rate in Hz; omit for the device maximum.

dac_stop

Stop any DAC output: generator, replay or control loop. The 4-20 mA output follows the DAC, so after a waveform on current_out the loop stays where it stopped: call current_out(0.004) to return it to 4 mA.

replay

Loop a waveform out of the DAC until dac_stop: agent-provided volts, the last ADC capture, or a waveform from the cloud library (waveform_id). More than 2048 samples need the deep_replay gateware image, switched to automatically (a library waveform with target_samples is downsampled instead). dac_path current_out replays on the 4-20 mA output (J9) in amps. A last capture of current_in, or a library recording with unit mA, replays as the same current; a voltage recording there needs mapping fit. See current_out for the wiring. After dac_stop, call current_out(0.004) to…

ParameterTypeDescription
dac_pathDAC output. Omitted: 3v3, the lowest voltage output (with route false: the output last routed, cal1 = 5v; for waveform_id: the waveform's own, else 3v3). Pick the one the DUT pin tolerates: 5v and 12v…
fault
from_last_capturebooleanReplay the last capture_adc instead of volts.
mappingstringfaithful = reproduce volts (clip); fit = auto-scale.
on_captureboolean
routebooleanRoute dac_path first (false = keep the current analog path).
sample_rate_hzReplay rate; defaults to the capture's own rate.
switch_imagebooleanIf the pod is on the other gateware image, switch it first (~3 s). The switch resets the FPGA, stopping any DAC output, UART session or sensor emulation. false = fail instead.
target_samplesintegerwaveform_id: downsample a shallow replay to this many samples.
voltsWaveform in volts, one value per sample. On dac_path current_out the values are AMPS (0.004 to 0.020).
waveform_idInstead of volts: a waveform from the cloud library (list_waveforms; needs server access).
window_lenintegerwaveform_id: samples to replay; 0 = to the end.
window_startintegerwaveform_id: first recording sample to replay.

list_waveforms

The organisation's cloud waveform library (needs a cloud connection or BENCHPOD_API_KEY).

cloud_list_devices

The BenchPods registered to your embeddedci.com organisation, and whether each is online. Drive one with connect(connection) using the returned `connection` ('embeddedci:<name>'). Needs no pod connection. Authenticates with BENCHPOD_API_KEY, else the session saved by `benchpod login` (~/.config/benchpod-cli/token.json), refreshing it when it has expired.

cloud_runs_list

Test runs uploaded to embeddedci.com (benchpod ci, pytest --embeddedci-upload, build_report), newest first, with their outcome and counts. Needs no pod connection; authenticates like cloud_list_devices.

ParameterTypeDescription
beforeThe next_before of the previous page.
buildOnly the runs linked to this build id.
dutOnly this board under test ('none' for pod-only suites).
limitintegerHow many runs, newest first.
podOnly the runs on this pod (name or id).
refOnly the runs of this git branch or ref of the tests.
suiteOnly this suite (the run's key.suite).

cloud_run_get

One test run: outcome, counts, health, the pod and tests it ran with, the failed cases with the first line of their message, and the measurements outside their limits. cloud_run_trace reads a failed case's pod calls; cloud_run_compare shows what changed since an earlier run.

ParameterTypeDescription
run_id *string
fullbooleanAlso return the whole run.json (every case, inputs, calls).

cloud_run_compare

What changed between an earlier run (a) and this one (b): newly failing and fixed cases, measurements that moved or broke a limit, slower tests and pod calls, and the inputs that differ (pod firmware, wiring, DUT firmware), so the likely cause sits next to the change.

ParameterTypeDescription
run_id *string
compare_withstring'previous' (the newest earlier valid run of the same suite and DUT), a run id, or 'baseline:<branch>' (the newest valid run on that branch).

cloud_run_trace

Every call a test case made to the pod (what it sent, how long it took, what the pod answered), from the trace uploaded with the run. Only failed and error cases have one.

ParameterTypeDescription
case_id *stringThe case id (pytest node id), or a unique end of it ('test_ack').
run_id *string
errors_onlybooleanOnly the calls that failed.
limitintegerHow many lines, from the start.

save_capture_as_recording

Save the last capture_adc to the cloud waveform library as a replayable recording. A capture of current_in (the 4-20 mA input) is stored as a current, unit mA; full_scale_v is then in mA too.

ParameterTypeDescription
name *string
full_scale_vVolts the top code represents; default the peak.

control_loop

Run a tabulated transfer function in the FPGA: each tick out = curve[input], damped and clamped. Needs the loop gateware image, switched to automatically. Poll with loop_probe, move the input with loop_input, stop with dac_stop.

ParameterTypeDescription
curveTransfer function: DAC output codes indexed by input (1-2048 points, spread over the input range).
input_codeinteger
input_map
kintegerDamping, Q15 (32767 = jump straight to the target).
pointsinteger
sharpnessnumberKnee sharpness of the panel preset.
sourceadc = closed loop; fixed = hold input_code (open loop); sweep = advance by step each tick.
stepinteger
switch_imagebooleanIf the pod is on the other gateware image, switch it first (~3 s). The switch resets the FPGA, stopping any DAC output, UART session or sensor emulation. false = fail instead.
tick_divinteger
vmaxinteger
vmininteger
voc_codeInstead of curve: solar-panel I-V preset with this open-circuit code.

loop_input

Re-target the running loop's input without re-arming (hold a point, meter, move on).

ParameterTypeDescription
input_code
source
step

loop_probe

The running loop's live operating point; assert against loop_input, not i, in open-loop runs.

fpga_image

Load another stored gateware image into the pod's FPGA (about 0.1 s from firmware 4.0.6, 2-3 s before; asking for the image that already runs does nothing). Rarely needed: control_loop and replay switch automatically (also back from the emulation image once no I2C/SPI/UART sensor runs). The pod never switches back by itself, and refuses to leave the emulation image while I2C/SPI/UART sensors run (sensor_stop first). The switch resets the FPGA (any DAC output or UART session stops). After a restart or power cycle the pod runs the loop image (firmware 4.0.6+). Gatew…

ParameterTypeDescription
image *stringloop = control-loop image; deep_replay = deep DAC replay from PSRAM; emulation = sensor emulation (sensor_start loads it by itself).

can_open

Bring up the pod's CAN interface (replacing any open CAN session): classic CAN, or CAN FD (up to 64-byte frames) with data_bitrate.

ParameterTypeDescription
bitrateinteger
data_bitrateCAN FD: the data-phase bit rate (bit/s). Omit for classic CAN. Above bitrate, frames switch to it after arbitration; equal to bitrate, FD frames without switching. Exact rates only, e.g. 1, 2, 4, 5 or…
modestringnormal = on a bus with other nodes; internal/external = loopback self-test; listen = silent.
termbooleanEngage the 120 ohm termination.

can_write

Queue one CAN frame (classic, or CAN FD on a bus opened with data_bitrate).

ParameterTypeDescription
can_id *integer
brsCAN FD frames only: false keeps the data phase at the nominal bitrate. Default: switch.
data0-8 data bytes on classic CAN, up to 64 on CAN FD (padded with zeros to 12, 16, 20, 24, 32, 48 or 64).
extboolean29-bit extended identifier.
fdCAN FD bus only: false sends a classic frame. Default: FD frames on an FD bus.
rtrboolean

can_read

Read received CAN frames (id, data, timestamps in pod milliseconds).

ParameterTypeDescription
can_id
max_framesinteger
timeout_snumberWith can_id: wait up to this long for it. Without: collect frames for this long (0 = what is buffered).

can_respond

Make the pod firmware answer a CAN id instantly (ECU simulation), or clear all rules.

ParameterTypeDescription
clearbooleanRemove all responder rules instead of adding one.
match_extboolean
match_id
reply_brsCAN FD replies only: false keeps the data phase at the nominal bitrate.
reply_dataReply bytes: up to 8 on classic CAN, 64 on CAN FD.
reply_extboolean
reply_fdCAN FD bus only: false replies with a classic frame. Default: FD on an FD bus.
reply_id

can_status

CAN link state: mode, bitrate, data_bitrate (CAN FD), error counters, bus-off.

can_close

Clear responder rules, stop CAN and switch the 120 ohm termination off (safe when not open).

la_step

Emit step pulses on an LA channel (step/dir motor drivers); with dir_la, set direction first. The step rate is 1 / (2 x delay_s). The FPGA runs the train by itself; this returns as soon as it starts. More than 65535 steps: send several trains (wait for the pod between them).

ParameterTypeDescription
delay_s *numberHALF the step period in seconds: each pulse is high for delay_s, then low for delay_s, so pulses are 2 x delay_s apart. 4 us to 65.535 ms.
la *integerLA channel (1-14) the signal is wired to.
steps *integerNumber of step pulses (at most 65535).
dir_la
directioninteger

command

Escape hatch for firmware commands no tool covers. Prefer the dedicated tools.

ParameterTypeDescription
request *objectA firmware JSON command with a "cmd" key, e.g. {"cmd": "usb_cc"}.

vision_connect

Open the AI Vision connection (closing a previous one) and report the board's status.

ParameterTypeDescription
connectionhost[:port] or URL of the ai-vision-2 board, 'discover' (mDNS), or 'embeddedci:<name>' for a board on embeddedci.com (vision_cloud_boards lists them). Omit for AIVISION_CONNECTION.
lease_asTake the board's lease under this name, so nobody else drives the camera or the actuator until vision_disconnect.
tokenThe board's API token on the LAN; omit for AIVISION_TOKEN. Over embeddedci.com the `benchpod login` session or BENCHPOD_API_KEY is used instead.

vision_cloud_boards

The AI Vision boards registered to your embeddedci.com organisation, and whether each is online. Connect to one with vision_connect(connection) using its `connection` ('embeddedci:<name>'). Authenticates with BENCHPOD_API_KEY, else the `benchpod login` session.

vision_disconnect

Close the AI Vision connection and release its lease. Safe when not connected.

vision_status

Version, calibration, camera lock, actuators, lease and capabilities, with warnings for what will block the next steps.

vision_look

The screen as an image, so you can read it yourself. With a region: that part at full sensor resolution (small text, icons).

ParameterTypeDescription
overlayDraw what the board recognised on the image.
region[x, y, w, h] in screen pixels (camera pixels before calibration). Omit for the whole screen.
spacestringscreen: the rectified screen in its own pixels (needs a calibration); camera: what the camera sees, to find the screen's corners.

vision_ocr

All text on the screen (or a region) in reading order, with boxes.

ParameterTypeDescription
region[x, y, w, h] in screen pixels (camera pixels before calibration). Omit for the whole screen.
zoomRead at this many image pixels per screen pixel (small text).

vision_find

Elements matching text, a kind or a template, best first. Text inside a button returns the button (its center is where a press taps).

ParameterTypeDescription
labelElement kind instead: button, icon, text.
matchHow text is compared; default exact (case-insensitive).
region[x, y, w, h] in screen pixels (camera pixels before calibration). Omit for the whole screen.
templateName of a template reference instead.
textText to look for.

vision_wait_for

Wait until text appears (or, with gone, disappears). Returns met=false on timeout.

ParameterTypeDescription
text *stringText to wait for.
gonebooleanWait until the text has left the screen instead.
matchHow text is compared; default exact (case-insensitive).
region[x, y, w, h] in screen pixels (camera pixels before calibration). Omit for the whole screen.
timeout_snumber

vision_compare

How close the screen is to a stored reference screen.

ParameterTypeDescription
reference *stringName of a reference screen (vision_add_reference).
maskAreas to ignore: names of the reference's masks ('clock') or [x, y, w, h].

vision_screen_health

Black, dim, frozen, flickering or stuck pixels over a window of frames.

ParameterTypeDescription
expect_motionbooleanCount a frozen screen as a problem.
window_msinteger

vision_calibrate

Map camera pixels to screen pixels; every later box and tap is in screen pixels.

ParameterTypeDescription
cornersThe screen's top-left, top-right, bottom-right, bottom-left corners in camera pixels (read them from vision_look(space='camera')). Or omit and use method.
methodauto: find the bright screen (show white on it); markers: the screen shows markers.png.
screen_sizeThe screen's own resolution [w, h], e.g. [1920, 720].

vision_add_reference

Store the current screen (or a region of it, e.g. an icon as a template) as a reference.

ParameterTypeDescription
name *string
kindstring
overwriteboolean
region[x, y, w, h] in screen pixels (camera pixels before calibration). Omit for the whole screen.

vision_press

Find the element, tap its center with the actuator, and optionally verify the result. Fails with the visible text when the element is not on the screen.

ParameterTypeDescription
text *stringText of the button or element to press.
actuatorActuator id; omit for the first one.
matchHow text is compared; default exact (case-insensitive).
verify_textThen wait for this text to appear.
verify_timeout_snumberSeconds to wait for verify_text; the board caps one request at 90 s.

vision_tap

Tap a point in screen pixels (hold_ms > 0 for a long press).

ParameterTypeDescription
x *numberScreen pixels.
y *numberScreen pixels.
actuatorActuator id; omit for the first one.
hold_msinteger