Serial Interface

Experimental V1 firmware documentation. Koheron products currently ship with V0.x firmware by default. V1 firmware executables are not publicly available yet. Please contact us if you are interested in early access or would like to evaluate V1 on your device.

Koheron V1 firmware is controlled through a UART serial interface. The physical connector is product-specific. Some products expose the interface through USB; others expose UART pins on a board connector. Refer to the product user guide for connector pinout and electrical levels.

Default serial settings

Use these settings unless the baud rate has been changed:

  • Baud rate: 115200
  • Data bits: 8
  • Parity: none
  • Stop bits: 1
  • Flow control: none

Commands are ASCII text. Raw binary payloads are used only by specific advanced commands such as memw and calibration commands.

Prompt and echo

In normal single-controller mode, the controller prints a prompt:

>>

Characters typed from a terminal are echoed. When a known command is executed, the firmware writes a new line, prints the command response, then prints the next prompt.

A terminal session therefore looks like this:

>> version
V1.x
>> tboard
25.45

The exact version string and values depend on the firmware build and measured state.

Line endings

The firmware accepts carriage return or line feed as a command terminator. For scripts, send carriage return and line feed:

\r\n

This is compatible with most serial terminals and with the examples in this documentation.

Separators

Arguments may be separated by spaces, tabs or commas. For clarity, use spaces in scripts and documentation:

>> rtset 12000
12000.000

Unknown commands

In single-controller mode, an unknown non-empty command prints an unknown-command message and sets the command error bit. Use err to read the error mask and errclr to clear it after the problem has been corrected.

Raw binary commands

Most commands are line-oriented text commands. Some commands use raw binary replies or raw binary payloads:

  • $ and logerr return binary status data.
  • memr returns exactly 32 raw bytes.
  • memw receives exactly 32 raw bytes after the command header.

Do not parse these commands with a line-oriented text helper. Use byte-counted reads and writes.

Addressed UART mode

When UART multiplexing is enabled with muxon, the firmware no longer treats plain unaddressed lines as commands. Each command must begin with an address header:

@1 version
@SN12345 version
@* err

See UART Multiplexing for details.

[email protected]