Digi NS9750 User Manual

Page 735

Advertising
background image

w w w . d i g i e m b e d d e d . c o m

7 1 1

U S B C o n t r o l l e r M o d u l e

Packet and data flow

The device block responds to packets initiated by the host. There are 16 DMA
channels in this block. DMA channels 1 and 2 move data to and from system memory
for control transfers for logical endpoint 0. DMA channels 3 through 13 move data for
logical endpoints 1 through 11, respectively. DMA channels 14 through 16 are not used
in the USB module.

Data for each logical endpoint travels through a four-word FIFO. Logic included with
the FIFOs interface the Master I/F to the DMA channels. The serial interface engine
(SIE) performs the tasks required to receive and send packets to and from a USB host.

The device driver writes the endpoint descriptor, configuration identifier register,
string identifiers, DMA parameters, and the direction of data transmission for logical
endpoints 1–11. From that point, the device driver monitors packet reception/
transmission success, and maintains the DMA descriptor lists. DMA Channel 1 DMA
descriptors are incoming; that is, they move data from USB to memory. DMA channel
2 DMA descriptors are outgoing; that is, they move data from memory to the USB.
The remainder of the DMA descriptors must follow the direction of data flow for the
corresponding logical endpoint, which is also specified in the control/status register
for the channel.

When a packet is received, a DMA descriptor must be available to move the required
data; otherwise, the packet fails. If a descriptor remains unavailable, the FIFOs will
be exhausted and an underrun or overrflow condition occurs. Bits in the
corresponding FIFO Status register are set. DMA channels can be used to signal a DMA
with no descriptors available.

Control in packets

Control in packets require device driver intervention. An “identifier” is stored in the
status field of a retired DMA descriptor doe DMA channel 1. The device driver
constructs a response and moves the response from system memory to the USB with
DMA channel 2. The USB response to the initial reception of the control in packet is to
store the identifier, then NAK the packet; this causes the host to retry the packet. If
the outgoing data has been moved to the USB, the data is output upon retry. Once a
control in packet has been received, all control in packets are NAK’d, and their
identifiers are not stored. The first control in packet received following the
successful transmission of data for the previous “pending” packet becomes the new
“pending” packet.

Advertising