
EPn_BUF
35
System Level Solutions
January 2013
USB 2.0 (USB20SR) Device IP Core User Guide
Value after Reset:
FFFF0000h(Control EP)
Value after Reset:
FFFFFFFFh(EP1:EP15)
1.
All endpoints except control endpoint support double buffering or
reducing latency on data transmit or receive operation for device. Also
All endpoints except control endpoint supports only in one direction
communication depending on its CSR register configuration. It means
endpoint configured as an OUT endpoint can not support IN operation
over it. This support can be added as per the customer request.
2.
For control endpoint, buffer0 is used for OUT operation while buffer1 is
used for IN endpoint.
3.
During IN endpoint operation, the buffer act as write only register while
in OUT endpoint operation buffer act as read only register.
30:17
RW
BUF_SIZE
These bits of the register is used by the processor to inform the size of the buffer to
device IP Core. The processor can change value of these bits before clearing the used
bit of the register. Device IP Core uses this information, if used bit is cleared by
processor to check how many number of received bytes can be stored inside the buffer
or how many number of bytes can be transmitted from buffer in response of IN token.
Device updates the value of these bits as it progress with its use. e.g. device buffer
register is allocated with size 1024 for OUT endpoint and device receives a 512 byte
successfully. Then after sending ACK handshake it reduces the buffer size with 512
bytes (received number of bytes) space. Similarly for IN operation.
16:0
RW
BUF_PTR
These bits are used to inform the device about the
starting location of the allocated
buffer for endpoint. Processor decides the starting location of the endpoint buffer and
informs about that to the device IP Core through these bits. Device IP Core can store or
transmit data from starting location of the buffer up to its available size, if used bit of
buffer register is cleared. Device IP Core updates buffer pointer with the number of
bytes transmitted from buffer or received inside the buffer to keep track of starting loca-
tion for the next data packet inside the buffer to transmit or receive if its used
bit is
cleared.