XMOS VocalFusion XVF3510 User Manual page 37

Table of Contents

Advertisement

COMMAND
GET_GPI_INT_PENDING_PORT uint32 READ
SET_GPI_PIN_ACTIVE_LEVEL
SET_GPI_INT_CONFIG
SET_GPI_READ_HEADER
GET_GPI_READ_HEADER
SET_KWD_INTERRUPT_PIN
GET_KWD_INTERRUPT_PIN
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
GET_GPI_INT_PENDING_PORT
The result returned by the GET_GPI_INT_PENDING_PORT indicates that no transitions have occurred.
XM-014232-PC
TYPE DIR
ARGS DESCRIPTION
Read whether interrupt was triggered for all pins on selected
1
port. The interrupt pending register for the whole port is
cleared by this command.
Set the active level for a specific GPI pin. Arguments are <Port
uint8
WRITE
3
Index> <Pin Index> <0: active low, 1: active high>. By default,
all GPI pins are set to active high.
Sets
for a specific pin. Arguments are <Port Index> <Pin Index>
uint8
WRITE
3
<Interrupt
2=Rising, 3=Both>.
Sets the selected port and pin for the next GPIO read.
uint8
WRITE
2
Arguments are <Port Index> <Pin Index>.
Gets the currently selected port and pin set by a previous
uint8
READ
2
SET_GPI_READ_HEADER command.
uint8
WRITE
1
Set gpi pin index to receive kwd interrupt on
uint8
READ
1
Read gpi pin index to receive kwd interrupt on
specified
in
SET_GPI_READ_HEADER
the
interrupt
type
0=None,
is
ignored
config
1=Falling,
by
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vocalfusion xvf3510-intVocalfusion xvf3510-ua

Table of Contents