Architecture
1664
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Serial Bus 2.0 (USB) Controller
34.2.8.11.3 Generic RNDIS
Generic RNDIS DMA transfer mode is identical to the normal RNDIS mode in nearly all respects, except
for the exception case where the last packet of the transfer can either be a short packet or the
MaxPktSize. Generic RNDIS transfer makes use of a RNDIS EP Size register (there exists a register for
each endpoint) that must be programmed with a value that is an integer multiple of the endpoint size for
the DMA to know the end of the transfer when the last packet size is equal to the USB MaxPktSize. For
example, it the Tx/RxMaxP is programmed with a value of 64, the Generic RNDIS EP Size register for that
endpoint must be programmed with a value that is an integer multiple of 64 (for example, 64, 128, 192,
256, etc.).
In other words, when using Generic RNDIS mode and the DMA is tasked to transfer data transfer size that
is less than a value programmed within the RNDIS EP Size register and this transfer will be resulting with
a short packet, the DMA will terminate the transfer when encountering the short packet behaving exactly
as the RNDIS DMA transfer type.
This means that Generic RNDIS mode will perform data transfer in the same manner as RNDIS mode,
closing the CPPI packet when a USB packet is received that is less than the USB MaxPktSize size.
Otherwise, the packet will be closed when the value in the Generic RNDIS EP Size register is reached.
Using RNDIS EP Size register, a packet of up to 64K bytes can be transferred. This is to allow the host
software to program the USB module to transfer data that is an exact multiple of the USB MaxPktSize
(Tx/RxMaxP programmed value) without having to send an additional short packet to terminate.
NOTE:
As in RNDIS mode, the USB max packet size of any Generic RNDIS mode enabled
endpoints must be a multiple of 64 bytes. Generic RNDIS acceleration should not be enabled
for endpoints where the max packet size is not a multiple of 64 bytes. Only transparent mode
should be used for such endpoints.
Generic RNDIS DMA Transfer Setup
The following will configure all four ports/channels for Generic RNDIS DMA Transfer type.
•
Disable RNDIS Mode globally. RNDIS bit in the control register (CTRLR) is cleared to 0.
•
Configure the DMA Mode Register (MODE) for the Endpoint field in use is programmed for Generic
RNDIS Mode. MODE = 3333 3333h
34.2.8.11.4 Linux CDC
Linux CDC DMA transfer mode acts in the same manner as RNDIS packets, except for the case where
the last data matches the max USB packet size. If the last data packet of a transfer is a short packet
where the data size is greater than zero and less the USB MaxPktSize, then the behavior of the Linux
CDC DMA transfer type is identical with the RNDIS DMA transfer type. The only exception is when the
short packet length terminating the transfer is a Null Packet. In this case, instead of transferring the Null
Packet, it will transfer a data packet of size 1 byte with the data value of 0x00.
In transmit operation, if an endpoint is configured or CDC Linux mode, upon receiving a Null Packet from
the CPPI DMA, the XFER DMA will then generate a packet containing 1 byte of data, whose value is
0x00, indicating the end of the transfer. During receive operation, the XFER DMA will recognize the one
byte zero packet as a termination of the data transfer, and sends a block of data with the EOP indicator
set and a byte count of one to the CPPI DMA controller. The CPPI DMA realizing the end of the transfer
termination will not update/increase the packet size count of the Host Packet Descriptor.
Linux CDC DMA Transfer Setup
The following will configure all four ports/channels for Linux CDC DMA Transfer type.
•
Disable RNDIS Mode globally. RNDIS bit in the control register (CTRLR) is cleared to 0.
•
Configure the DMA Mode Register (MODE) for the Endpoint field in use is programmed for Linux CDC
Mode. MODE = 2222 2222h