EasyManua.ls Logo

Cypress EZ-USB FX3 SDK - Serial Interface examples

Cypress EZ-USB FX3 SDK
56 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Cypress EZ-USB® FX3™ SDK Quick Start Guide, Version 1.3.1 18
4.7 Serial Interface examples
The serial interface examples demonstrate data accesses to the Serial IOs, I2C,
SPI and UART.
4.7.1 UART examples
In the UART examples, the data is looped from the PC host back to the PC host
through the FX3 device. The loopback can be observed on the PC host. The
examples are provided for both DMA mode and Register mode of data transfers for
the UART.
1. cyfxuartlpdmamode: This example makes use of the DMA MANUAL Channel
for the loopback to the PC host over UART. The DMA buffer is 32 bytes.
2. cyfxuartlpregmode: This example loops back data one byte at a time.
3. cyfxusbuart: This example implements a CDC-ACM compliant USB to UART
bridge device using the UART port on the FX3 device.
4.7.2 I2C examples
In the I2C examples, a USB I2C data loopback is achieved over 2 USB
Isochronous endpoints through an I2C slave device. A DMA MANUAL IN and a
DMA MANUAL OUT channels are used for the Isochronous endpoints. The data is
looped back one I2C page at a time which is 64 bytes. The examples are
implemented for USB 2.0 speeds.
1. cyfxusbi2cdmamode: This example makes use of the DMA MANUAL IN and a
DMA MANUAL OUT channel for the I2C DMA access.
2. cyfxusbi2cregmode: This example reads/writes one page to the I2C device
using the register mode accesses.
4.7.3 SPI examples
In the SPI examples, a USB SPI data loopback is achieved over 2 USB
Isochronous endpoints through a SPI slave device. A DMA MANUAL IN and a DMA
MANUAL OUT channels are used for the Isochronous endpoints. The data is
looped back one page at a time which is 16 bytes. The examples are implemented
for USB 2.0 speeds.
1. cyfxusbspidmamode: This example makes use of the DMA MANUAL IN and a
DMA MANUAL OUT channel for the SPI DMA access.
2. cyfxusbspiregmode: This example reads/writes one page to the SPI device
using the register mode accesses.
3. cyfxusbspigpiomode: This example demonstrates the use of GPIO to build an
SPI master. The example read / writes data to an SPI Flash attached to the FX3
device using FX3 GPIOs.