User Manual

spark - InfiniScale® III Firmware Burning ToolRev 1.50
Mellanox Technologies
48
2. Run i2c with the following command line syntax:
where [OPTIONS] can be the following:
-h – Prints this message.
-a <addr_width> – Sets address width (in bytes) to the specified value. May be 0, 1, 2 or 4.
Default: 1.
-d <data_width> – Sets data width (in bytes) to the specified value. May be 1, 2 or 4. Default
is 1.
-x <data_len> – Presents each byte of data as two hexadecimal digits (such as
013C20343B). Note that this option is mutually exclusive with the "-d"
option.
The remaining parameters are:
<device> – Valid MST device.
<cmd> – Command. May be "r[ead]" or "w[rite]".
<i2c_addr> – I2C slave address.
<addr> – Address (of length addr_width) inside I2C target device to read/write
operation.
Note that the <addr> value is ignored if <addr_witdh> = 0.
<data> – Data (bytes of length data_width) to write to target device.
Examples:
1. Read two bytes from address 0 of target I2C device at address 0x56:
2. Write two bytes to the address above then read them:
3. Read (as separate) 16 bytes in hexadecimal format starting from address 0 of the target
device above:
i2c [OPTIONS] <device> <cmd> <i2c_addr> <addr> [<data>]
All parameters are interpreted as hexadecimal values.
> i2c -a 1 -d 2 /dev/mst/mtusb-1 r 0x56 0x00
0000
> i2c -a 1 -d 2 /dev/mst/mtusb-1 w 0x56 0x00 0x1234
> i2c -a 1 -d 2 /dev/mst/mtusb-1 r 0x56 0x00
3412
> i2c -a 1 -x 16 /dev/mst/mtusb-1 r 0x56 0x00
12340000000000000000000000000000