AT32WB415
Series Reference Manual
2022.04.13
Page 357
Ver 2.00
through the SETEVNFR and SETODDFR bits in this
register.
0: Even frame
1: Odd frame
Bit 15
USBACEPT
0x0
rw
USB active endpoint
Indicates whether this endpoint is active in the current
configuration and interface. The controller clears this bit for
all endpoints except for endpoint 0 after detecting a USB
reset. After receiving the SetConfiguration and
SetInterface commands, the application must program the
endpoint registers and set this bit.
0: Inactive
1: Active
Bit 14: 11 Reserved
0x0
resd
Kept at its default value.
Bit 10: 0
MPS
0x000
rw
Maximum packet size
The application uses this field to set the maximum packet
size for the current logical endpoint. The values are in
bytes.
20.6.5.11
OTGFS device control OUT endpoint 0 control register
(OTGFS_DOEPCTL0)
This section describes the control OUT endpoint 0 control register. Non-zero control endpoints use
registers for endponts 1-7.
Bit
Register
Reset value
Type
Description
Bit 31
EPTENA
0x0
rw1s
Endpoint enable
The application sets this bit to start transmitting data on
endpoint 0.The controller clears this bit before setting any
one of the following interrupts on this endpoint:
–
SETUP stage done
–
Endpoint disabled
–
Transfer completed
Bit 30
EPTDIS
0x0
ro
Endpoint disable
The application cannot disable control OUT endpoint 0.
Bit 29: 28 Reserved
0x0
resd
Kept at its default value.
Bit 27
SNAK
0x0
wo
Set NAK
A write to this bit sets the NAK bit for this endpoing. The
application can use this bit to control the transmitssion of
NAK handshakes on an endpoint. The controller sets this
bit on a transfer completed interrupt or when a SETUP
data packet is received.
Bit 26
CNAK
0x0
wo
Clear NAK
A write to this bit clears the NAK for the endpoint.
Bit 25: 22 Reserved
0x0
resd
Kept at its default value.
Bit 21
STALL
0x0
rw1s
STALL handshake
The application sets this bit and the controller clears this
bit when a SETUP token is received for this endpint. If a
NAK bit , glocal non-periodic OIT NAK bit is set along with
this bit, the STALL bit has priority. The controller always
responds to SETUP data packets, regardless of whether
this bit is set or not.
Bit 20
SNP
0x0
rw
Snoop mode
This bit configures the endpint to Snoop mode. In this
mode, the controller does not check the correctness of
OUT packets before transmitting OUT packets to the
application memory.
Bit 19: 18 EPTYPE
0x0
ro
Endpoint type
Hardware sets this bit to 0 to control endpoint type.
Bit 17
NAKSTS
0x0
ro
NAK status
Indicates the followins:
0: The controller is sending non-NAK handshakes based
on the FIFO status
1: The controller is sending NAK handshakes