Target Commands all-titleall-title#

Use target commands to interact with the target MCU.

Commands

Description

Supported on

target button

Get or set the state of the user buttons.

all-tableall-table

target power

Get or set the state of the target voltage rail.

all-tableall-table

target reset

Reset the target.

all-tableall-table

target halt

Halt the target.

all-tableall-table

target go

Resume the target application.

all-tableall-table

target voltage

Get or set the VMCU target voltage.

all-tableall-table

target ledstatus

Get status of LEDs.

wpk-tablewpk-table

target button commands all-headerall-header#

The target button commands support multiple subcommands. Supported subcommands include press, release, read, enable, and disable.

  • enable and disable activate or deactivate the press, release, and read subcommands.

  • press and release emulate button actions.

  • read returns the current state of the selected button.

Command Line Syntax

$ target button <'enable'|'disable'>
$ target button <'press'|'release'|'read'> <0|1>

Command Line Examples

$ target button enable

$ target button press 0
PB0 is pressed

$ target button release 0
PB0 is released

$ target button read 1
PB1 is released

$ target button disable

target power all-headerall-header#

Gets or sets the state of the target voltage rail.

Command Line Syntax

$ target power ['on'|'off']

Command Line Examples

$ target power
Target power is on

$ target power off
Target power off

target reset all-headerall-header#

Sets or clears the target reset.

  • Use the 'set' and 'clear' subcommands to change the state of the reset pin.

  • Use the delay parameter to toggle the reset line for the specified number of milliseconds. If a delay is not specified, the pin will be toggled with a 10 ms delay.

Command Line Syntax

$ target reset <'set'|'clear'|delay_ms>

Command Line Example

$ target reset 100

target halt all-headerall-header#

Halts the target.

Command Line Syntax

$ target halt

Command Line Example

$ target halt
OK

target go all-headerall-header#

Resumes the target application.

Command Line Syntax

$ target go

Command Line Example

$ target go
OK

target voltage all-headerall-header#

Gets or sets the VMCU target voltage. Gets the currently configured and measured voltage by not supplying a voltage.

Only the WPK supports setting the VMCU target voltage. If the voltage changes by more than 0.1 V, the command automatically calibrates the AEM, which resets the target. Use the --nocalibrate option to skip the calibration.

Command Line Syntax

$ target voltage
$ target voltage <voltage> [--nocalibrate]

Command Line Examples

$ target voltage
Configured VMCU : 3.30 V
Measured VMCU   : 3.28 V

$ target voltage 3
Setting VMCU to : 3.00 V
Vmcu has changed by 0.30 V since last calibration
Calibrating AEM
Configured VMCU : 3.00 V
Measured VMCU   : 2.98 V

$ target voltage 2.5 --nocalibrate
Setting VMCU to : 2.50 V
Skipping calibration
Configured VMCU : 2.50 V
Measured VMCU   : 2.81 V

target ledstatus wpk-headerwpk-header#

Gets status of LEDs.

Command Line Syntax

$ target ledstatus

Command Line Example

$ target ledstatus
LED 0: on
LED 1: off