General Purpose Outputs - XMOS VocalFusion XVF3510 User Manual

Table of Contents

Advertisement

Continuing the example, assume now that IP_1 & IP_2 are asserted high, and the port queried again:
vfctrl_i2C GET_GPI_INT_PENDING_PORT
> GET_GPI_INT_PENDING_PORT: 2
The result 2 (b'0010) shows that IP_2 has triggered on a rising edge. Rechecking the port status shows
this event has been cleared.
vfctrl_i2C GET_GPI_INT_PENDING_PORT
> GET_GPI_INT_PENDING_PORT: 0
When IP_1 and IP_2 are driven low and the port status queried again:
vfctrl_i2C GET_GPI_INT_PENDING_PORT
> GET_GPI_INT_PENDING_PORT : 1
result ( b'0001 ) shows that IP_1 has seen a falling edge interrupt.

4.3.7. GENERAL PURPOSE OUTPUTS

The following commands are available to write and control GPOs:
Table 4-5 General Purpose Output commands
COMMAND
SET_GPO_PORT
SET_GPO_PIN
SET_GPO_PIN_ACTIVE_LEVEL uint8
SET_GPO_PWM_DUTY
SET_GPO_FLASHING
NOTE: All GPOs have a weak pull-down (~30kΩ) during reset and initialised to logic low on device
boot and will always drive the pin thereafter.
To illustrate usage of the GPOs the following section considers four common examples. Writing to a
GPO pin, configuring a PWM output, generating a blink sequence and driving a three colour (RGB)
LED.
The following commands toggle OP_2 high then low (XVF3510-UA shown for example):
vfctrl_usb SET_GPO_PIN 0 2 1
vfctrl_usb SET_GPO_PIN 0 2 0
XM-014232-PC
TYPE DIR
ARGS DESCRIPTION
Write a value to all pins of a GPIO port.
uint32 WRITE
2
Arguments are <Port Index> <Value>.
Write to a specific GPIO pin.
uint8
WRITE
3
Arguments are <Port Index> <Pin Index> <Value>.
Set the active level for a specific GPO pin.
Arguments are <Port Index> <Pin Index> <0: active low, 1:
WRITE
3
active high>.
By default, all GPO pins are active high
Set the PWM duty for a specific pin.
uint8
WRITE
3
Value given as an integer percentage.
Arguments are <Port Index> <Pin Index> <Duty in percent>.
Set the serial flash mask for a specific pin. Each bit in the mask
describes the GPO state for a 100ms interval.
uint32 WRITE
3
Arguments
mask>.
are
<Port
Index>
<Pin
Index>
<Flash
38

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vocalfusion xvf3510-intVocalfusion xvf3510-ua

Table of Contents