EasyManua.ls Logo

Cypress EX-USB FX3 - Page 61

Cypress EX-USB FX3
192 pages
Print Icon
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...
FX3 Programmers Manual, Doc. # 001-64707 Rev. *C 61
FX3 Firmware
The application can perform the necessary event handling and then return from the callback
function.
If no action is required for a specific event, the application can simply return from the issued call-
back function.
In both cases, the USB driver completes the default handling of the event.
Stall
The USB driver provides a set of APIs for stall handling.
The application can stall a given endpoint
The application can clear the stall on a given endpoint
Re-enumeration
When a reset is issued by the USB host, the USB driver handles the reset and the FX3 device
re-enumerates. If the application has registered a callback for USB event, the callback is issued
for the reset event.
The application can call the ConnectState API to electrically disconnect from the USB host. A
subsequent call to the same API to enable the USB connection causes the FX3 device to
re-enumerate.
When any alternate setting is required, the endpoints must be reconfigured (UVC is an example
where the USB host requests a switch to an alternate setting). The USB on the FX3 can remain in
a connected state while this endpoint reconfiguration is being performed. A USB disconnect,
followed by a USB connect is not required.
The USB connection must be disabled before the descriptors can be modified.
Data Flows
All data transfers across the USB are done by the DMA engine. The simplest way of using the DMA
engine is by creating DMA channels. Each USB endpoint is mapped to a DMA socket. The DMA
channels are created between sockets. The types of DMA channels, data flows, and controls are
described in DMA Mechanism on page 39.
5.2.1.2 Host Mode Handling
If a host mode connection is detected by the USB driver, the previously completed endpoint
configuration is invalidated and the user application is notified. The application can switch to host
mode and query the descriptors on the connected USB peripheral. The desired endpoint
configuration can be completed based on the descriptors reported by the peripheral. When the host
mode session is stopped, the USB driver switches to a disconnect state. The user application is
expected to stop and restart the USB stack at this stage.
5.2.1.3 Bulk Streams in USB 3.0
Bulk streams are defined in the USB 3.0 specification as a mechanism to enhance the functionality
of Bulk endpoints, by supporting multiple data streams on a single endpoint. When the FX3 is in USB
3.0 mode, the bulk endpoints support streams and burst type of data transfers. All active streams are
actually mapped to USB sockets. Additional sockets that are not in use can be mapped to the stream
enabled endpoints.
5.2.1.4 USB Device Mode APIs
The USB APIs are used to configure the USB device mode of operation. These include APIs for
Start and stop the USB driver stack in the firmware
Setting up the descriptors to be sent to the USB host

Table of Contents