Skip to content

Reference Adapter AEM VCOM

Espen Hovland edited this page Jun 5, 2026 · 2 revisions

Reference: adapter · aem · vcom · ctune

Command suites for the Silicon Labs adapter, energy monitoring, VCOM, and crystal tuning. All methods return a dict. See Command-Reference for shared conventions.

The adapter, aem and vcom suites require a Silicon Labs adapter; they are not functional with generic J-Link adapters.


commander.adapterAdapterCommand

Commands that affect a debug adapter (kit/debugger).

dbgmode(mode=None, **kwargs)

Get or set the debug mode. mode: MCU, IN, OUT, OFF. Omit to read the current mode.

drivermode(mode=None, **kwargs)

Select driver mode — winusb (driverless) or segger (legacy). Omit to read.

fwupgrade(filename=None, check=True, **kwargs)

Upgrade the kit/adapter firmware. filename is an *.emz package (bundled firmware used if omitted). With check=True, installs only if the bundled version is newer (--nocheck disables this).

fwupgradecheck(**kwargs)

Check whether a firmware upgrade is available for the adapter.

ip(dhcp=False, addr=None, dns=None, gw=None, **kwargs)

Get or set adapter IP configuration. With no options, the current configuration is shown. dhcp auto-configures; addr is CIDR notation; dns/gw set DNS and gateway.

list(net=False, filter_regex=None, connect=True, **kwargs)

List connected kits. net includes network adapters; filter_regex filters results; connect=False adds --noconnect for an unintrusive scan.

nick(nickname=None, clear=False, **kwargs)

Get or set the adapter nickname. clear=True removes it.

power(state=None, **kwargs)

Get or set target power. state: turn target power on/off. Omit to read.

probe(fw=False, kit=False, boards=False, **kwargs)

Retrieve information about the current kit/adapter. fw shows firmware info, kit shows kit info, boards shows the detailed mainboard + connected radio/expansion board list.

reset(**kwargs)

Reset the selected kit/adapter.

voltage(voltage=None, calibrate=True, **kwargs)

Get or set the target voltage. Omit voltage to read. calibrate=False adds --nocalibrate.

Higher-level equivalents live on Adapter-Class (info, reset, upgradeFirmware, getVoltage, setVoltage).


commander.aemAemCommand

Advanced Energy Monitor commands.

calibrate(**kwargs)

Calibrate the AEM.

dump(outfile, duration_s, datarate_hz=None, triggerabove_ma=None, triggerbelow_ma=None, triggertimeout_s=None, pretrigger_ms=None, header=True, calibrate=False, **kwargs)

Log AEM measurements as time-series data to a file. outfile (.csv/.txt) and duration_s are required here (unlike the interactive CLI).

  • datarate_hz — desired logging rate.
  • triggerabove_ma / triggerbelow_ma — start logging when current crosses a threshold.
  • triggertimeout_s — give up if not triggered.
  • pretrigger_ms — capture this many ms before the trigger.
  • header=False--noheader. calibrate=True calibrates first.

For open-ended streaming without a fixed duration, use AemStream.

measure(windowlength_ms=None, calibrate=False, **kwargs)

Measure the average current over a time window (default 100 ms).

analyze(file=None, windowlength_ms=None, get_distribution=False, cluster=False, cluster_filename=None, find_period=False, **kwargs)

Analyze AEM data, either from a live measurement or from file.

  • windowlength_ms — measurement window (default 10000 ms when measuring live).
  • get_distribution--showdistribution.
  • cluster--cluster (Bayesian blocks); cluster_filename saves cluster results.
  • find_period--findperiod (needs at least 5 captured periods).

Adapter.analyzeEnergyUsage() wraps this and returns a typed AemAnalysisResult.


commander.vcomVcomCommand

VCOM configuration (Silicon Labs adapters only).

config(baudrate=None, handshake=None, store=False, **kwargs)

Configure adapter-board VCOM. handshake: none, rtscts, or aux. store=True persists the settings on the adapter.

Adapter.setVcomConfig() provides a typed wrapper using the VcomHandshake enum.


commander.ctuneCtuneCommand

Crystal tuning (CTUNE) get/set.

autoset(**kwargs)

Read the CTUNE value from the board and write it to the CTUNE token.

get(**kwargs)

Get the CTUNE value from DI, board and token.

set(value_hex_string, **kwargs)

Set the CTUNE token to value_hex_string (hex form, bytes).

Target.getCTUNE() / Target.setCTUNE() wrap these and return/accept typed values.

Clone this wiki locally