GD32F10x User Manual
757
Figure 23-2. An example with buffer descriptor table usage (USBD_BADDR = 0)
IN endpoint 1 double buffer 0
IN endpoint 1 double buffer 1
Endpoint 0 reception buffer
Endpoint 0 transmission buffer
COUNT1_TX1
ADDR1_TX1
COUNT1_TX0
ADDR1_TX0
Endpoint 0 buffer descriptor
offset 0x00
offset 0x08
offset 0x1FF
Endpoint 1 buffer descriptor (double buffer)
COUNT0_RX
ADDR0_RX
COUNT0_TX
ADDR0_TX
endpoint buffer
descriptor base
address
Note:
This figure is not drawn on the actual scale, and it is addressed through the USB bus
16-bit mode
.
Double-buffered endpoints
The double-buffered feature is used to improve bulk transfer performance. To implement the
new flow control scheme, the USB peripheral should know which packet buffer is currently in
use by the application software, so to be aware of any conflict. Since in the USBD_EPxCS
register, there are two data toggle bits (TX_DTG and RX_DTG) but only one is used by USBD
for hardware data handling (due to the unidirectional constraint required by double-buffering
feature), the other one can be used by the application software to show which buffer it is
currently using. This new buffer flag is called software buffer bit (SW_BUF). In
Double-buffering buffer flag definition
, the correspondence between USBD_EPxCS
register bits and DTG/SW_BUF definition is explained.
Summary of Contents for GD32F10 Series
Page 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Page 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Page 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Page 427: ...GD32F10x User Manual 427 value ...
Page 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...