User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 397
www.energymicro.com
15.6.60 USB_DOEP0CTL - Device OUT Endpoint 0 Control Register
The application uses this register to control the behavior of each logical endpoint other than endpoint 0.
Offset Bit Position
0x3CB00
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Reset
0
0
0
0
0
0
0x0
0
1
0x0
Access
RW1
R
W1
W1
RW1
RW
R
R
R
R
Name
EPENA
EPDIS
SNAK
CNAK
STALL
SNP
EPTYPE
NAKSTS
USBACTEP
MPS
Bit Name Reset Access Description
31 EPENA 0 RW1 Endpoint Enable
In DMA mode this bit indicates that the application has allocated the memory to start receiving data from the USB. The core clears
this bit before setting any of the following interrupts on this endpoint: SETUP Phase Done, Endpoint Disabled, Transfer Completed.
In DMA mode, this bit must be set for the core to transfer SETUP data packets into memory.
30 EPDIS 0 R Endpoint Disable
This bit is always 0. The application cannot disable control OUT endpoint 0.
29:28 Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
27 SNAK 0 W1 Set NAK
A write to this bit sets the NAK bit for the endpoint. Using this bit, the application can control the transmission of NAK handshakes
on an endpoint. The core can also set bit on a Transfer Completed interrupt, or after a SETUP is received on the endpoint.
26 CNAK 0 W1 Clear NAK
A write to this bit clears the NAK bit for the endpoint.
25:22 Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
21 STALL 0 RW1 Handshake
The application can only set this bit, and the core clears it, when a SETUP token is received for this endpoint. If a NAK bit or Global
OUT NAK is set along with this bit, the STALL bit takes priority. Irrespective of this bit's setting, the core always responds to SETUP
data packets with an ACK handshake.
20 SNP 0 RW Snoop Mode
This bit configures the endpoint to Snoop mode. In Snoop mode, the core does not check the correctness of OUT packets before
transferring them to application memory.
19:18 EPTYPE 0x0 R Endpoint Type
Hardcoded to 0. Endpoint 0 is always a control endpoint.
17 NAKSTS 0 R NAK Status
When this bit is 0 the core is transmitting non-NAK handshakes based on the FIFO status. When this bit is 1 the core is transmitting
NAK handshakes on this endpoint. When either the application or the core sets this bit, the core stops receiving data, even if there
is space in the RxFIFO to accommodate the incoming packet. Irrespective of this bit's setting, the core always responds to SETUP
data packets with an ACK handshake.
16 Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
15 USBACTEP 1 R USB Active Endpoint
This bit is always 1, indicating that a control endpoint 0 is always active in all configurations and interfaces.
14:2 Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
1:0 MPS 0x0 R Maximum Packet Size
The maximum packet size for control OUT endpoint 0 is the same as what is programmed in control IN Endpoint 0.
Value Mode Description
0 64B 64 bytes.
1 32B 32 bytes.
2 16B 16 bytes.