HS_USB 2.0 device
RM0082
498/844
Doc ID 018672 Rev 1
23.8.11 Endpoint
control
register
The endpoint control is an endpoint-specific RW register which allows to setup the endpoint
as required by the application. The endpoint control register bit assignments are given in
Note:
If the corresponding endpoint is bidirectional (both in and out), there will be two such
endpoint control registers.
Table 407.
Endpoint control register bit assignments
Bit
Name
Reset value Description
[31:10]
Reserved
-
Read: undefined. Write: should be zero.
[09]
RRDY
1'h0
Receive ready.
This bit is set by the application (at any time), or receiving an
out packet, the DMA sends the packet to system memory.
This bit is cleared at the end of packet if the descriptor
update bit, DU, is set in the
. In contrast, this bit is cleared at the end of
payload if the DU bit is set to 1‘b0. If the DMA is busy
transferring the data, the application cannot clear this bit.
[08]
CNAK
1'h0
Clear NAK.
This bit is used by the application to clear the NAK bit in this
register. For example, after a SETUP packet has been
decoded as a valid command by the application, then the
application must set the CNAK bit to clear the NAK bit. The
application also must clear the NAK bit (through CNAK)
whenever the subsystem sets it (i.e., the STALL bit in this
register is set by the application).
Note: The application is allowed to clear this bit only when
either the RxFIFO is empty (for single RxFIFO
implementation) or when the RxFIFO corresponding to the
same logical is empty (for multiple RxFIFO implementation).
[07]
SNAK
1'h0
Set NAK.
This bit is used by the application to set the NAK bit in this
register.
Note: The application must not set the NAK bit for an in
endpoint until an in token has been received indicating that
the TxFIFO is empty.
[06]
NAK
1'h0
NAK handshake.
If set, this bit forces the endpoint to reply to the USB Host
with a NAK handshake. Setting and clearing of NAK bit are
allowed by SNAK and CNAK bits respectively. For example,
after a SETUP packet (preliminarily decoded by the
application) has been received by the core, the core sets the
NAK bit for all control in and out endpoints. Besides, NAK bit
is also set after a STALL response for the endpoint.
Note: A SETUP packet is sent to the application regardless
of whether the NAK bit is set.