Table of Contents

Advertisement

Raw I
2
C read/writes may also be performed as shown below.
USING I2C MASTER TO WRITE TO A DEVICE
Typically byte register read/writes are used to configure external I2C controlled hardware.
As an example, assume there is a device connected at address 0x40 (64) with three, single byte,
registers. The following commands will write 77 to register 0, 48 to register 1 and 33 to register 2.
vfctrl_usb SET_I2C_WITH_REG 64 0 1 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
vfctrl_usb SET_I2C_WITH_REG 64 1 1 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
vfctrl_usb SET_I2C_WITH_REG 64 2 1 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
NOTE: The control protocol does not support variadic (variable number of) arguments.
Hence,
even
when
writing
passed. Unwritten values are ignored.
USING THE I2C MASTER TO READ FROM A DEVICE
To
verify
the
previous
0x40 (64), an I
2
C register read can be performed as follows:
vfctrl_usb SET_I2C_READ_HEADER 64 0 1
vfctrl_usb GET_I2C_WITH_REG
> 77 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The byte read is the first of the 56 return values, which in this case, is 77. The following 55 values are
undefined since the command only performed a read of 1 register.

4.3.9. SPI MASTER

The XVF3510_UA and XVF3510-INT variants provides an SPI master interface which can be used as:
}
a bridge from the USB interface, i.e. VFCTRL_USB commands can be used from the host to
read and write devices connected to the SPI Peripheral Port; and
}
a mechanism to initialise devices connected to the SPI Peripheral Port by incorporating
commands into the data partition (in the external flash), which are executed at boot time.
XM-014232-PC
Figure 4-6 I2C protocol for raw reads and writes
a
single
byte,
the
I
2
C
register
write
full
number
of
arguments
to
register
number
must
be
0
at
address
42

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vocalfusion xvf3510-intVocalfusion xvf3510-ua

Table of Contents