Double Buffering; In And Out Fifos; Fifo Sizes For Ep - Texas Instruments CC253x User Manual

System-on-chip for 2.4ghz
Table of Contents

Advertisement

Endpoints 1–5
When the IN or OUT endpoint of an endpoint number uses double buffering, the sum of USBMAXI and
USBMAXO must not exceed half the FIFO size for the endpoint.
FIFO memory for an endpoint that uses double buffering. Notice that the second OUT buffer starts from
the middle of the memory region and grows upward. The second IN buffer also starts from the middle of
the memory region but grows downward.
To configure an endpoint as IN-only, set USBMAXO to 0, and to configure an endpoint as OUT-only, set
USBMAXI to 0.
For unused endpoints, both USBMAXO and USBMAXI should be set to 0.
0
USBMAXI-1
USBMAXO-1
0

21.7.2 Double Buffering

To enable faster transfer and reduce the need for retransmissions, double buffering can be used. This
allows two packets to be buffered in the FIFO in each direction. This is highly recommended for
isochronous endpoints, which are expected to transfer one data packet every USB frame without any
retransmission. For an isochronous endpoint, one data packet is sent or received every USB frame.
However, the data packet may be sent or received at any time during the USB frame period, and there is
a chance that two data packets may be sent or received at a few-microseconds interval. For isochronous
endpoints, an incoming packet is lost if there is no buffer available, and a zero-length data packet is sent if
there is no data packet ready for transmission when the USB host requests data. Double buffering is not
as critical for bulk and interrupt endpoints as it is for isochronous endpoints, because packets are not lost.
Double buffering, however, may improve the effective data rate for bulk endpoints.
To enable double buffering for an IN endpoint, USBCSIH.IN_DBL_BUF must be set to 1. To enable
double buffering for an OUT endpoint, set USBCSOH.OUT_DBL_BUF to 1.
186
USB Controller
Table 21-2. FIFO Sizes for EP 1–5
EP Number
1
2
3
4
5
IN FIFO
OUT FIFO
a) Single Buffering
Figure 21-2. IN and OUT FIFOs
Copyright © 2009–2014, Texas Instruments Incorporated
Figure 21-2
b) illustrates the IN and OUT
FIFO Size (in Bytes)
32
64
128
256
512
0
IN FIFO
(Buffer 1)
USBMAXI-1
USBMAXO-1
OUT FIFO
(Buffer 2)
0
0
IN FIFO
(Buffer 2)
USBMAXI -1
USBMAXO-1
OUT FIFO
(Buffer 1)
0
b) Double Buffering
SWRU191F – April 2009 – Revised April 2014
www.ti.com
M0106-02
Submit Documentation Feedback

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents