These commands differ from USB FX2 API commands because they are executed by the MicroBlaze and shall be sent with the I2C_WRITE USB FX2 API command; more precisely, after it in the Command byte array. I2C_WRITE USB FX2 API command (with the Commmand byte array) is itself a parameter of USB FX2 API function TE_USB_FX2_SendCommand().
The byte array shall be properly initialized using instructions similar to the ones listed below:
Command[0] = I2C_WRITE;
Command[1] = MB_I2C_ADRESS;
Command[2] = I2C_BYTES;
Command[3] = 0;
Command[4] = 0;
Command[5] = 0;
Command[6] = Command2MB;
Command2MB it is one of the commands listed in the table below. This command writes data (from 1 to 32 bytes) to the requested I2C address.

Byte

Value

Description

1

0xAD

I2C_WRITE USB FX2 API command ID

2

0x3F

I2C Address
MB_I2C_ADRESS=0x3F

3

0x0C
(12)

FX2_Parameters.I2C_BYTES=0x0C
Number of bytes to write (max 32)

4

0x00

-

5

0x00

-

6

0x00

-

7

Command2MB

MB_Commands to send to the MicroBlaze

From 8 to 64

-

Not used

MB_Command Packet Layout.

Reply packet doesn't usually contain any usable information (only for Command2MB = MB_Commands =  FX22MB_REG0_PING command the reply is "pong" 0x706F6E67 value).

  • No labels