Skip to main content

smiohp

Configuration of smartIO HP modules via USB

Construction Side The description of this tool is in progress. Currently only the integrated help is printed.

Options on the command line

smiohp - build time Sep 3 2024 09:04:45
smiohp - git version 1.4
Usage: smiohp [options...]
Setup and Diagnostic of High Performance devices
Options:
-h output help

-l, -L list usb devices, ... and quit
-e <filename> feed message output into file
-c <filename> send command batchfile file to fpga-device (no smiohp commands)
-t <seconds> disable interactive mode, set terminate timeout
-n add new/next device to open, starts its config now
-G <level> monitoring libusb, set global debug level

** options to select the device in order of choice:
** prio 1:
-S <serial> only look for devices with serial string/pattern
-N <nodePath> select device by path as one of
'd:<bus>/<addr>'
'i:<vend>:<prod>?:<index>?'
or 's:<vend>:<prod>:<serial>'
** prio 2:
-B <num> select device by bus number, mandatory -A
-A <num> select device by node address, mandatory -B
** prio 3: the best guess mixture, use whatever is defined
-V <vendId> only look for devices with given vendorId (0x6B59)
-P <prodId> only look for devices with given productId (0x0403)
-U <num> select device by USB-Index (devices of same vendorId/productId)
-D <descr> only look for devices with descriptor string/pattern
** connector options:
-I <num> select device interface to connect
-M <level> monitoring libusb, set context debug level
0:NONE, 1:ERROR, 2:WARNING, 3:INFO, 4:DEBUG
** transfer and device options:
-T <time_ms> transfer time-out for data packets
-p <packets> usb: packets per transfer (def. 8)
-q <transf> usb: num transfers in queue (def. 256)
-k <kbyte> size of ring buffer (def. 4096)
-w toggle RAW_IO for WinUSB driver
-z zeroConsume: no processing in consumer thread

** other device options:
-s use device simulation
-r dump raw data stream only (hex)
-b dump raw data stream only (bin)
-d <mask> content in DTS log (+1:Basic, +2:GPS, +4:SyncLine, +8:Corr)
-x <opt> use optimization for PDIs

-m [<magic>,...] list of known magics to enable or 'all'
-o <filename> feed data output into dump file

Sequence commands

smiohp - build time Sep 3 2024 09:04:45
smiohp - git version 1.4
Dev[1] : SerNo: 23005500012, Descr: smartIO 2QENC
Interactive device mode:
!! 'help' lists all commands and syntax
>> help
Interactive device mode:
Footnotes:
[*] depends on device capabilities, see specific documentation
[**] if device is flashed with bootloader and multiboot

Generic hints on syntax:
<...> some parameter value
?<...>? some optional parameter value
[<...>] one or list of values
{ch} set of channels, comma separated list of <int> or range <int>-<int>
"hello world" enclose string value in ' or ", if it containes white space

[<opt> ?<value>?] reassign command line options
-h output help on reassignable command line options
-G <level> monitoring libusb, set global debug level
-M <level> monitoring libusb, set context debug level
0:NONE, 1:ERROR, 2:WARNING, 3:INFO, 4:DEBUG
-d <mask> content in DTS log (+1:basic +2:GPS, +4:SyncLine, +8:Corr)
-z toggle zeroConsume: no processing in consumer thread

smiohp reserved commands:
help output this information
< show command history
<<n> redo comand <n> from history
quit terminate program

new [<opt> ?<value>?] create a new SmioHP and SmioDevice
sel <devId> select device for interaction
warm send 4x<esc> to perform SB_WARMBOOT
boot [**] perform SB_WARMBOOT to latest image
boot <n> [**] perform SB_WARMBOOT to image <n>
stat show statistics from device
mute [0|1] mute all file output (performance checks)
flush flush dump file (automatic with each DTS:)
src ?<filename>? source a command file [def: the previous one]

toAdc {ch} [<input>] convert physical input measures to adc-counts
toIn {ch} ?calc? [<adc>] convert adc-counts to physical input measures
lut {ch} <num> ?<file>? output look up table(s) with ADC | Voltage | Calib,
num rows + one row for each calibration point
Optional <file> to write tsv file, '_ch##.tsv' is appended

cal Output help for cal:-commands
cal:S {ch} ?T=<deg>? <S>tart calibration sequence on channel(s) (or 'all')
optionally set temperature of device (°C)
cal:M <ref> <M>easure and average samples at calibration value
cal:V <V>iew measurement data table
cal:R [<set>] <R>emove noted rows of data table
cal:A <sig> <A>pply and end calibration sequence with signature and flash
cal:U <sig> <U>pdate and end calibration from latest measurement data
cal:X e<X>it from running calibration, delete all measurement data

meta Output help for meta:-commands
meta:V <V>iew device meta information
meta:F <F>eature list of device
meta:M Output help on meta:M keys
meta:M [<key>=<val>] <M>odify/assign device meta information
meta:A <sig> <A>apply device meta information

fpga Output help for fpga:-commands
fpga:V <V>iew fpga image information (all)
fpga:P Output help on fpga:P keys
fpga:P <image> <file> [<key>=<val>]
<P>rogram new image and assign meta data
fpga:M Output help on fpga:M keys
fpga:M <image> [<key>=<val>]
<M>odify/assign meta data only

ftdi Output help for ftdi:-commands
ftdi:V <V>iew ftdi-eeprom content (dump)
ftdi:U <U>pdate ftdi-eeprom content to meta data
ftdi:E <E>rase ftdi-eeprom

dev Output help for device:-commands
dev:S synchronize device to system clock
dev:L ?<vId>? ?<pId>? List all devices of product / vendor ID, '*': any, '=': default
dev_TSM <mode> ?:<value>:?
dev:TSM host ?<enPll>? ?<minCycle>? ?<maxCycle>? ?<k_P>? ?k_D?
dev:TSM gps ?<baudrate>? ?'<satFilt>'?
dev:TSM (sync|line|syncline)
set Time Sync Mode <mode> =(host|gps|line)
dev:TC <freq> ?<gate>? set Telegram Clock <gate> = (stop|cont|snap)
dev:TG <gate> set Telegram Gate <gate> = (stop|cont|snap)
dev:DS <file> <len> [<src>]
setupDataSources <src> = {device specific, see below}
dumps binary data 'SRC:' + arrays[<ch>].type[<len>] into <file>
!!! needs default implementation, do not use -m magics
** smartIO 2QENC ** <src> := <sensor>.<track>.(adc|count|volt|freq|per|pwm|high)
<sensor> := (S1|S2)
<track> := (A|B|Z|ENC|REV)
{ch} := range 0..5
{si} := range 0..1
qenc:TH {ch} <low_V> <high_V>
setHighLowThreshold for {ch} = 0..5
qenc:PPT {si} <ppt> setPulsesPerTurn {si} = 0..1, <ppt> = 1...1023

FPGA command syntax (all case insensitive, [*]):
Each command must be terminated with a ';'!
<command>; // comment (removed by host)
<val> := (<hex>|<str>)
<hex> := [0-9a-f_]+
<str> := '.*', encoding as UTF-8
[*] escaped: \a, \b, \t, \n, \v, \f, \r, \e, \', \\

FPGA commands:
r; // hot reset c<hex>; // [*] call function <hex> (no arguments)
c<hex>: <val> [<val>..]; // [*] call function <hex> with arguments
p<hex>: <val> [<val>..]; // [*] set parameter <hex> and followers