EasyManuals Logo

Cypress EZ-USB FX3 User Manual

Cypress EZ-USB FX3
660 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
Page #151 background imageLoading...
Page #151 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 151
General Programmable Interface II (GPIF II)
This kind of transformation has an impact on the overall latency between states. For example, the actions specified in the
state S1 will now be performed with an additional delay of one cycle. Similarly, the input values that trigger the S0 --> S1
transition now need to stay valid for one additional cycle. Since these system-level timing changes cannot be assumed safely,
such transformations are not automatically performed by the GPIF II Designer tool. This technique can be used as necessary
to reduce state machines to an implementable form.
7.8 Initialization and Configuration of GPIF II Block
The GPIF II block is configured by writing to a set of device registers and configuration memories. The GPIF II Designer utility
generates the configuration data corresponding to the communication protocol to be implemented based on the graphical
state machine. This tool generates the GPIF II configuration information in the form of a C header file that defines a set of
data structures. The FX3 SDK and the GPIF II Designer installation also include a set of header files that have the
configuration data for a number of commonly used protocols.
The CyU3PGpifLoad() API is used by the firmware application to load the configuration generated by the GPIF II Designer
tool. This API, in turn, internally uses the CyU3PGpifWaveformLoad(), CyU3PGpifInitTransFunctions(), and
CyU3PGpifConfigure() APIs to complete the configuration. These APIs can be used directly as a replacement for the
CyU3PGpifLoad() call with the constraint that the CyU3PGpifConfigure() call should be made after the
CyU3PGpifWaveformLoad() and CyU3PGpifInitTransFunctions() calls.
7.8.1 GPIF II State Machine Control
The firmware application may require the GPIF II state machine to be started and stopped multiple times during run time. In
most cases where the FX3 device is functioning as a slave device, there will be a single GPIF II state machine, and the
application needs to start it as soon as the configuration has been loaded. The CyU3PGpifSMStart() API can be used to start
the state machine operation in this case.
If the application uses FX3 as a GPIF II master, there may be multiple disjointed state machines that implement different parts
of the communication protocol. The CyU3PGpifSMSwitch() API can be used to switch between different state machines in
this case.
If the GPIF II state machine operation is to be suspended and later resumed, the CyU3PGpifSMControl() API can be used to
pause or resume state machine operation.
If the state machine operation is to be stopped at some point and restarted from the reset state later, the CyU3PGpifDisable()
API can be used with the forceReload parameter set to CyFalse(0). The CyU3PGpifSMStart() API can then be used to restart
the state machine.
If the active GPIF II configuration is to be changed, the CyU3PGpifDisable() API can be used with the forceReload parameter
set to CyTrue(1). The CyU3PGpifLoad() API can then be used to load a fresh configuration.
7.9 Performing Read and Write Operations Using GPIF II
This section shows you the steps to program the GPIF II block with the help of a simple example that can be implemented
using the FX3 SDK. There is no need to connect any external peripheral to the FX3 GPIF II. In this example, GPIF II performs
a read operation when a DMA buffer is available in FX3, or it performs a write operation when data is available in the FX3
DMA buffers.
To design an interface using GPIF II Designer, start by creating a GPIF II Design project. A new project can be created using
the New Project command from the File menu, or by using the links provided on the start page. The New Project command
pops up the New Project dialog box shown in Figure 7-37. Here the user can enter the project name and choose the location
where the project files will be stored.
An existing project can be opened by choosing the File menu item Open Project. The start page also provides links to open
the most recently used projects.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cypress EZ-USB FX3 and is the answer not in the manual?

Cypress EZ-USB FX3 Specifications

General IconGeneral
BrandCypress
ModelEZ-USB FX3
CategoryController
LanguageEnglish

Related product manuals