Lantronix DSTni-EX Computer Hardware User Manual


 
33
Figure 4-1. Buffer Descriptor Table
The microprocessor manages buffers intelligently for the USB by updating the BDT as
necessary. This allows the USB to handle data transmission and reception efficiently while the
microprocessor performs communication-overhead processing and other function-dependent
applications. Because the microprocessor and the USB share buffers, DSTni uses a simple
semaphore mechanism to distinguish who is allowed to update the BDT and buffers in system
memory.
The semaphore bit, also known as the OWN bit, is set to 0 when the microprocessor owns the
BD entry. The microprocessor has read and write access to the BD entry and the buffer in
system memory when the OWN bit is 0.
When the OWN bit is set to 1, the USB owns the BD entry and the buffer in system memory.
The USB has full read and write access and the microprocessor should not modify the BD or its
corresponding data buffer. The BD also contains indirect address pointers to where the actual
buffer resides in system memory.
Rx vs. Tx as a Target Device or Host
The USB core can function as either a USB target device (function) or a USB host, and can
switch operating modes between host and target device under software control. In either mode,
the USB core uses the same data paths and buffer descriptors for transmitting and receiving
data. Consequently, in this section and the rest of this chapter, the following terms are used to
describe the direction of the data transfer between the USB and the USB device.
Rx (or receive) describes transfers that move data from the USB to memory.
Tx (or transmit) describes transfers that move data from memory to the USB.
Table 4-1 shows how the data direction corresponds to the USB token type in host and target
device applications