500
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
19-3 below.
Whether the endpoint is used for receiving or sending, the buffer description table starts with the first entry, which is
the very bottom of the buffer description table. The USB module cannot access/modify the data of other endpoint
packet buffers other than the currently allocated endpoint packet buffer area, For example: when the endpoint 0 packet
receive buffer receives a data larger than the current endpoint 0 packet receive buffer from the PC host, the endpoint
0 only receives data up to the endpoint 0 packet receive buffer size, other redundant data is discarded and a buffer
overflow exception occurs.
Figure 19-3 The relationship between the buffer description table and the endpoint packet buffer
19.4.3
Double-buffered endpoints
Double buffer endpoint function introduction
When a large amount of data needs to be transmitted between the PC host and the USB device, the use of bulk
transmission allows the PC host to transmit data with maximum efficiency within one frame. However, when the
transmission speed is too fast, the USB device will receive a new data packet when the USB device is processing the
previous data transmission. In order to correctly complete the previous data transmission, the USB can only reply the
NAK handshake signal to the PC host. Due to the retransmission mechanism of bulk transfer, the PC host will
continue to retransmit the same data packet until the USB device can process the data packet and reply to the PC host
ADDR0_TX
CNT0_TX
ADDR0_RX
CNT0_RX
ADDR1_TX
CNT1_TX
ADDR1_RX
CNT1_RX
CNT2_TX_1
ADDR2_TX_1
CNT2_TX_0
ADDR2_TX_0
Endpoint 0 TX buffer
in single buffer mode
Endpoint 0 RX buffer
in single buffer mode
Endpoint 1 RX buffer
in single buffer mode
Buffer for IN
endpoint 2 in double
buffer mode
Buffer for OUT
endpoint 3 in double
buffer mode
Buffer description table
Endpoint packet buffer
Offset 0x00
Offset 0x02
Offset 0x04
Offset 0x06
Offset 0x08
Offset 0x0A
Offset 0x0C
Offset 0x0E
Offset 0x10
Offset 0x12
Offset 0x14
Offset 0x16
Offset 0x18
Offset 0x1A
Offset 0x1C
Offset 0x1E
CNT3_RX_1
ADDR3_RX_1
CNT3_RX_0
ADDR3_RX_0
Packet Buffer Memory