EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 68
FX3 DMA Subsystem
uvint32_t intr; /**< Interrupt status register. */
uvint32_t intrMask; /**< Interrupt mask register. */
uvint32_t unused2[2]; /**< Reserved register space. */
CyU3PDmaDescriptor_t activeDscr; /**< Active descriptor information. See cyu3descrip-
tor.h for definition. */
uvint32_t unused19[19]; /**< Reserved register space. */
uvint32_t sckEvent; /**< Generate event register. */
} CyU3PDmaSocket_t;
5.5.5.1 Software Manipulation of Sockets
Sockets are to be initialized, inspected, and modified by firmware as described in this section.
5.5.5.2 Initializing a Socket
Sockets can be initialized only when in the IDLE state, that is, SCK_STATUS.ENABLED=0. If this is not the case, the socket
must first be terminated (see 5.5.5.3 Terminating a Socket on page 68).
The general procedure is as follows:
1. Descriptors are allocated or located and initialized in memory. These descriptors are chained appropriately.
2. The SCK_xxx registers are initialized with the proper configuration values. This includes SCK_DSCR, which contains the
number of the first descriptor to be loaded. DSCR_xxx registers are not initialized - the DMA adapter will load those by
itself.
3. SCK_STATUS.GO_ENABLE is set to '1' to activate the socket (if so desired).
5.5.5.3 Terminating a Socket
Sockets can be terminated at any time. If a socket is active, its activities will be aborted after an unspecified amount of time.
The general procedure is as follows:
1. SCK_STATUS.GO_ENABLE is cleared to '0'. The IP will continue to perform an unspecified amount of its pending activity.
2. It is permissible to write '0' multiple times to SCK_STATUS.GO_ENABLE while the socket is being terminated, but it is ille-
gal to write '1' to it during this time.
3. SCK_STATUS.ENABLED is read back until its value changes to '0'. No further activity emanates from this socket after
SCK_STATUS.enabled is observed as cleared.
5.5.5.4 Modifying or Suspending a Socket
Sockets are normally modified safely only when in the suspend state. A socket that is active or stalled must first be
suspended. A socket that is suspended will not complete an ongoing transfer, but rather go into the suspended state almost
immediately. It is possible though, that going into the suspend state safely takes a noticeable (but small) number of cycles.
The general procedure is as follows:
1. SCK_STATUS.GO_SUSPEND is set to '1'.
2. SCK_STATUS.SUSPENDED is read back until its value changes to '1' or SCK_INTR.SUSPEND is used as the interrupt
source to indicate the the suspend status.
3. Any changes are made to SCK_xxx or DSCR_xxx registers.
4. SCK_STATUS.GO_SUSPEND is cleared. If SCK_DSCR.active_dscr was modified, the socket will load the new descrip-
tor from the memory[ otherwise it will resume the operation using the current contents of DSCR_xxx.
Note that SCK_STATUS.SUSPENDED will only take effect after the transfer of the current buffer completes. This may take a
long time.
Note that it is also possible to modify sockets that are in the stalled state, provided that it is known that no synchronization
EVENT(s) will occur. This is normally the case when the socket is waiting for firmware to generate an event, that is, the socket
is not coupled to another socket in another adapter. In this case it is not necessary to first suspend the socket.