English
Language : 

C8051F326 Datasheet, PDF (97/140 Pages) List of Unclassifed Manufacturers – Full Speed USB, 16 kB Flash MCU Family
C8051F326/7
12.5. FIFO Management
256 bytes of on-chip XRAM are used as FIFO space for USB0. This FIFO space is split between Endpoint0
and Endpoint1 as shown in Figure 12.3. FIFO space allocated for Endpoint1 is split into an IN and an OUT
endpoint.
0xFF
0xC0
0xBF
0x00
Endpoint0
(64 bytes)
IN (64 bytes)
Endpoint1
OUT (128 bytes)
Endpoint0 (IN/OUT)
Control Endpoint
Endpoint1 (Split IN/OUT)
USB Clock Domain
0x03FF
0x0000
User XRAM
(1024 bytes)
System Clock Domain
Figure 12.3. USB FIFO Allocation
12.5.1. FIFO Split Mode
The FIFO space for Endpoint1 is split such that the upper 64 bytes of the FIFO space is used by the IN
endpoint, and the lower 128 bytes is used by the OUT endpoint.
The FIFO space for Endpoint0 is not split. The 64 byte FIFO space forms a single IN or OUT FIFO.
Endpoint0 can transfer data in one direction at a time. The endpoint direction (IN/OUT) is determined by
the DIRSEL bit in the corresponding endpoint’s EINCSRH register (see Figure 12.20).
12.5.2. FIFO Double Buffering
The Endpoint1 FIFO can be configured for double-buffered mode. In this mode, the maximum packet size
is halved and the FIFO may contain two packets at a time. This mode is only available for Endpoint1. Dou-
ble buffering may be enabled for the IN Endpoint and/or the OUT endpoint. See Table 12.3 for a list of
maximum packet sizes for each FIFO configuration.
Endpoint
Number
0
1
Table 12.3. FIFO Configurations
Split Mode Maximum IN Packet Size Maximum OUT Packet
Enabled? (Double Buffer Disabled / Size (Double Buffer Dis-
Enabled)
abled / Enabled)
N/A
64
Y
64 / 32
128 / 64
Rev. 0.5
97