FX22MB_REG0_GETVERSION = 0x01

This command is used to request to the MicroBlaze the return of 4 bytes representing FPGA firmware version.

This command alone is not able to return directly 4 bytes representing the FPGA firmware version. This command should be inserted in the following procedure:

  1. SET_INTERRUPT on MB_I2C_ADDRESS requesting I2C_BYTES
  2. I2C_WRITE with MB_Command FX22MB_REG0_GETVERSION at byte 7
  3. GET_INTERRUPT

This command sets address and number of bytes to read from the I2C bus when an interrupt request is received.

1) SET_INTERRUPT on MB_I2C_ADDRESS requesting I2C_BYTES

Byte

Value

Description

1

0xB0

SET_INTERRUPT FX2 API command ID

2

0x3F

I2C Address
MB_I2C_ADRESS=0x3F

3

0x0C

Number of bytes to write (max 32)

From 4 to 64

-

Not used

Reply packet doesn't contain any usable information.
This command writes data (12 bytes) to requested I2C address.

2) I2C_WRITE with MB_Command FX22MB_REG0_GETVERSION at byte 7

Byte

Value

Description

1

0xAD

I2C_WRITE 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

0x01

MB_Commands.FX22MB_REG0_GETVERSION
It request to the MicroBlaze the return of 4 bytes representing FPGA firmware version

From 8 to 64

-

Not used

Reply packet doesn't contain any usable information.
This command pulls the number of received interrupts and received data (number o bytes set by SET_INTERRUPT command) from USB FX2.

3) GET_INTERRUPT

Byte

Value

Description

1

0xB1

GET_INTERRUPT FX2 API command ID

From 2 to 64

-

Not used

3) Reply packet with desired information

Byte

Description

1, reply[0]

Interrupt number.
If zero means that GET_INTERRUPT has not been able to retry data because the interrupt created by SET_INTERRUPT has not yet been serviced.

2, reply[1]

Interrupt data [0] : Major Version

3, reply[2]

Interrupt data [1] : Minor Version

4, reply[3]

Interrupt data [2] : Release Version

5, reply[4]

Interrupt data [3] : Build Version

From 6 to 64

Not used