FX3 Programmers Manual, Doc. # 001-64707 Rev. *C
77
7.
FX3 Application Examples
The FX3 SDK includes various application examples in source form. These examples illustrate the
use of the APIs and firmware framework putting together a complete application. The examples illus-
trate the following:
■
Initialization and application entry
■
Creating and launching application threads
■
Programming the peripheral blocks (USB, GPIF, serial interfaces)
■
Programming the DMA engine and setting up data flows
■
Registering callbacks and callback handling
■
Error handling
■
Initializing and using the debug messages
■
Programming the FX3 device in Host/OTG mode
7.1
DMA examples
The FX3 has a DMA engine that is independent of the peripheral used. The DMA APIs provide
mechanism to do data transfer to and from the FX3 device.
These examples are essentially bulkloop back examples where data received from the USB host PC
through the OUT EP is sent back through the IN EP. These examples explain the different DMA
channel configurations.
7.1.1
cyfxbulklpauto – AUTO Channel
This example demonstrates the use of DMA AUTO channels. The data received in EP1 OUT is
looped back to EP1 IN without any firmware intervention. This type of channel provides the
maximum throughput and is the simplest of all DMA configurations.
7.1.2
cyfxbulklpautosig – AUTO_SIGNAL Channel
This example demonstrates the use of DMA AUTO_SIGNAL channels. The data received in EP1
OUT is looped back to EP1 IN without any firmware intervention. This type of channel is similar to
AUTO channel except for the event signaling provided for every buffer received by FX3. Even
though the throughput is same as that of AUTO channel, the CPU is involved every time a buffer of
data is received by FX3 due to interrupts received during the buffer generation.
7.1.3
cyfxbulklpmanual – MANUAL Channel
This example demonstrates the use of DMA MANUAL channels. The data received in EP1 OUT is
looped back to EP1 IN after every bit in the received data is inverted. In this type of channel, the
CPU has to explicitly commit the received data. The CPU also gets a change to modify the data
received before sending it out of the device. The data manipulation is done in place and does not
require any memory to memory copy.
Содержание EX-USB FX3
Страница 8: ...8 FX3 Programmers Manual Doc 001 64707 Rev C Contents...
Страница 12: ...12 FX3 Programmers Manual Doc 001 64707 Rev C Introduction...
Страница 48: ...48 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Overview...
Страница 74: ...74 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Firmware...
Страница 76: ...76 FX3 Programmers Manual Doc 001 64707 Rev C FX3 APIs...
Страница 84: ...84 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Examples...
Страница 98: ...98 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Structure...
Страница 148: ...148 FX3 Programmers Manual Doc 001 64707 Rev C FX3 P Port Register Access...
Страница 153: ...FX3 Programmers Manual Doc 001 64707 Rev C 153 FX3 Development Tools 2 Select General Existing projects into Workspace...
Страница 165: ...FX3 Programmers Manual Doc 001 64707 Rev C 165 FX3 Development Tools Click next...
Страница 178: ...178 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools Click on Apply...
Страница 180: ...180 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools d Start the GDB server...
Страница 185: ...FX3 Programmers Manual Doc 001 64707 Rev C 185 FX3 Development Tools...
Страница 186: ...186 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 187: ...FX3 Programmers Manual Doc 001 64707 Rev C 187 FX3 Development Tools...
Страница 188: ...188 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Страница 192: ...192 FX3 Programmers Manual Doc 001 64707 Rev C GPIF II Designer...