Digi NS9750 Computer Hardware User Manual


 
www.digiembedded.com
715
USB Controller Module
Handling USB-IN packet errors
USB-IN packet errors are sent from the USB device to the USB host. The USB host
either responds with an ACK packet to indicate successful transmission or does not
respond at all to indicate that there was an error in transmission.
These are the steps that must be taken to retransmit the packet in error:
1 Determine that the error has occurred through an interrupt. The hardware
places the endpoint FIFO into reset state and flushes the contents.
2 Determine which endpoint is involved, using the FIFO Status registers.
3 Read the valid packets-transmitted-count from the Packet Control register and
use it to compute a new buffer descriptor source address and buffer length.
Update the current buffer descriptor in system memory. The current DMA buffer
descriptor can be determined by reading the index field in the DMA Control
register (see "DMA Control register" on page 514).
4 Write a 1 to the BDR (buffer descriptor refetch) and CE (channel enable) fields in
the DMA Control register to force a refetch of the buffer descriptor when the
channel next wins arbitration.
5 Take the USB device endpoint FIFO out of reset. At this point, the DMA controller
will refetch the buffer descriptor as well as the packet in error and all remaining
data in the DMA buffer.
Handling USB-OUT packet errors
USB-OUT packets are sent from the USB host to the USB device. The USB device
either responds with an ACK packet to indicate successful transmission or does not
respond at all to indicate that there was an error in transmission. If there was an
error, the current DMA buffer is closed and the DMA buffer descriptor status field
indicates that an error has occurred. Through this status information, software knows
to discard the last packet in the buffer, as the USB host will retransmit the packet in
error. The DMA controller fetches the next buffer descriptor, and the retransmitted
packet will be the first packet in the new DMA data buffer.