Download CC253X User Guide
Transcript
Endpoints 1–5 www.ti.com 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. Figure 21-2 b) illustrates the IN and OUT 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 upwards. The second IN buffer also starts from the middle of the memory region but grows downwards. 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. Table 21-2. FIFO Sizes for EP 1–5 EP Number FIFO Size (in Bytes) 1 32 2 64 3 128 4 256 5 512 0 0 IN FIFO (Buffer 1) IN FIFO USBMAXI-1 USBMAXO-1 USBMAXI-1 OUT FIFO (Buffer 2) 0 0 IN FIFO (Buffer 2) USBMAXI -1 USBMAXO-1 USBMAXO-1 OUT FIFO (Buffer 1) OUT FIFO 0 0 a) Single Buffering b) Double Buffering M0106-02 Figure 21-2. IN/OUT FIFOs 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/received every USB frame. However, the data packet may be sent/received at any time during the USB frame period, and there is a chance that two data packets may be sent/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. 192 USB Controller SWRU191B – April 2009 – Revised September 2010 Submit Documentation Feedback Copyright © 2009–2010, Texas Instruments Incorporated