XM-014232-PC
37
COMMAND
TYPE DIR
ARGS DESCRIPTION
GET_GPI_INT_PENDING_PORT uint32 READ
1
Read whether interrupt was triggered for all pins on selected
port. The interrupt pending register for the whole port is
cleared by this command.
SET_GPI_PIN_ACTIVE_LEVEL
uint8
WRITE
3
Set the active level for a specific GPI pin. Arguments are <Port
Index> <Pin Index> <0: active low, 1: active high>. By default,
all GPI pins are set to active high.
SET_GPI_INT_CONFIG
uint8
WRITE
3
Sets
the
interrupt
config
for a specific pin. Arguments are <Port Index> <Pin Index>
<Interrupt
type
0=None,
1=Falling,
2=Rising, 3=Both>.
SET_GPI_READ_HEADER
uint8
WRITE
2
Sets the selected port and pin for the next GPIO read.
Arguments are <Port Index> <Pin Index>.
GET_GPI_READ_HEADER
uint8
READ
2
Gets the currently selected port and pin set by a previous
SET_GPI_READ_HEADER command.
SET_KWD_INTERRUPT_PIN
uint8
WRITE
1
Set gpi pin index to receive kwd interrupt on
GET_KWD_INTERRUPT_PIN
uint8
READ
1
Read gpi pin index to receive kwd interrupt on
For example, a read operation on XVF3510-UA is illustrated below. To read the level of pin 2 of the
input port first set the port index (always 0 for XVF3510) and the pin index (2 in this case):
vfctrl_usb SET_GPI_READ_HEADER 0 2
Next perform the read:
vfctrl_usb GET_GPI
GET_GPI: 13
The returned value, 13 (b‘1101), means pin index 1 (IP_1) is logic low and the other pins 0, 2 and 3
logic high.
EXAMPLE: CONFIGURING AND CAPTURING A FALLING AND RISING EDGE INTERRUPT
An example of configuration of a GPIs to capture edge events is discussed below (XVF3510-INT used
for the example). First, configure IP_1 to trigger a falling edge interrupt and IP_2 to trigger a rising
edge interrupt as shown:
vfctrl_i2C SET_GPI_INT_CONFIG 0 1 1
vfctrl_i2C SET_GPI_INT_CONFIG 0 2 2
For the example, IP_1 & IP_2 are connected to the same source, which is driving low. To check the
ports for interrupts use the following commands:
vfctrl_i2C SET_GPI_READ_HEADER 0 0
vfctrl_i2C GET_GPI_INT_PENDING_PORT
> GET_GPI_INT_PENDING_PORT: 0
NOTE:
The
pin
index
specified
in
SET_GPI_READ_HEADER
is
ignored
by
GET_GPI_INT_PENDING_PORT
The result returned by the
GET_GPI_INT_PENDING_PORT
indicates that no transitions have occurred.
Содержание VocalFusion XVF3510
Страница 1: ...VocalFusion XVF3510 USER GUIDE V4 0...