Intel PXA255 Personal Computer User Manual


 
12-16 Intel® PXA255 Processor Developer’s Manual
USB Device Controller
1. During the SETUP VENDOR command, software enables the DMA engine and masks the
EP1 interrupt. The DMA start address must be aligned on a 16-byte boundary.
a. If the packet size is 64 bytes, software transfers the all the data in one DMA descriptor
and sets the UDCCS1[TSP] bit in the second DMA descriptor.
b. If the packet size is less than 64 bytes, software sets up a string of descriptors in which the
odd numbered descriptors point to the data and the even numbered descriptors are writes
to the UDCCS1[TSP] bit.
2. The host PC sends a BULK-IN and the UDC sends a data packet back to the host PC.
3. The UDC generates an interrupt that is masked from the Megacell.
4. The DMA engine fills the EP1 data FIFO (UDDR1) with data and sets the UDCCS1[TSP] bit
if the data packet is a short packet.
5. Steps 2 through 4 repeat until all the bulk data is sent to the host PC.
12.5.5.2 Software Enables the EP1 Interrupt
If software enables the EP1 interrupt to allow the Megacell to directly handle the transaction:
1. During the SETUP VENDOR command, software fills the EP1 data FIFO (UDDR1) with data
and clears the UDCCS1[TPC] bit. If the data packet is a short packet, software also sets the
UDCCS1[TSP] bit.
2. The host PC sends a BULK-IN and the UDC sends a data packet back to the host PC and
generates an EP1 Interrupt.
3. Software fills the EP1 data FIFO (UDDR1) with data and clears the UDCCS1[TPC] bit. If the
data packet is a short packet, software also sets the UDCCS1[TSP] bit.
4. Return from interrupt.
5. Steps 2 through 4 repeat until all of the data is sent to the host PC.
12.5.6 Case 6: EP2 Data Receive (BULK-OUT)
This procedure can also be used to operate Endpoints 7 and 12.
When software receives a SETUP VENDOR command to set up an EP2 BULK OUT transaction,
it may take one of two courses of action, as appropriate for the chosen operating model:
Enable the DMA engine to handle the transaction.
Allow the Megacell to directly handle the transaction.
12.5.6.1 Software Enables the DMA
If software enables the DMA engine to handle the transaction:
1. During the SETUP VENDOR command, software sets up the DMA engine and sets the
UDCCS2[DME] bit.
a. If the packet size is 32 or 64 bytes, software sets up a string of descriptors, each with a
length of modulo 32 or 64. Software sets the interrupt bit for the appropriate descriptor.
b. If the packet size is less than 32 bytes, software uses interrupt mode.