AT32WB415
Series Reference Manual
2022.04.13
Page 355
Ver 2.00
0: The controller is transmitting non-NAK handshakes
based on the FIFO status
1: The controller is transmitting NAK handshakes on this
endpoint
When this bit is set, either by the application or controller,
the controller stops transmitting data, even if there are
space available in the receive FIFO. The controller always
responds to SETUP data packets with an ACK handshake,
irrespective of this bit’s setting.
Bit 16
Reserved
0x0
resd
Kept at its default value.
Bit 15
USBACEPT
0x0
ro
USB active endpoint
This bit is always set to 1, indicating that the control
endpoin 0 is always active in all configurations and
interfaces.
Bit 14: 2
Reserved
0x0000
resd
Kept at its default value.
Bit 1: 0
MPS
0x0
rw
Applies to IN and OUT endpoints
The application uses this bit to program the maximum
packet size for the current logical endpoint.
00: 64 bytes
01: 32 bytes
10: 16 bytes
11: 8 bytes
20.6.5.10
OTGFS device IN endpoint-x control register
(OTGFS_DIEPCTLx) (x=x=1
…
3, where x is endpoing number)
The application uses this register to control the behavior of the endpoints other than endpoint 0.
Bit
Register
Reset value
Type
Description
Bit 31
EPTENA
0x0
rw1s
Endpoint enable
The application sets this bit to start transmitting data on an
endpoint. The controller clears this bit before the
generation one of the following interrupts on this endpoing:
–
SETUP stage done
–
Endpoint disabled
–
Transfer completed
Bit 30
EPTDIS
0x0
rw1s
Endpoint disable
The application sets this bit to stop transmitting data on an
endpoint, even if the transfer on that endpint is incomplete.
The application must wait for the endpoint disabled
interrupt before treating the endpoint as disabled. The
controller clears this bit before setting the endpoint
disabled interrupt. The application must set this bit only
when the endpoint enabled set.
Bit 29
SETD1PID/
SETODDFR
0x0
wo
Set DATA1 PID
Applies to interrupt/bulk IN endpoints only. Writing to this
bit sets the endpoint data PID bit in this register to DATA1.
Set odd frame
Applies to synchronous IN endpoints only. Writing to this
bit sets the Even/Odd frame to odd frame.
0: Disabled Set DATA1 PID disabled or Do not force odd
frame
1: Set DATA1 PID enabled or forced odd frame
Bit 28
SETD0PID/
SETEVENFR
0x0
rw
Set DATA0 PID
Applies to interrupt/bulk IN endpoints only. Writing to this
bit sets the endpoint data PID bit in this register to DATA0.
Set Even frame
Applies to synchronous IN endpoints only. Writing to this
bit sets the Even/Odd frame to even frame.
0:Disabled Set DATA0 PID disabled or Do not force
evem frame
1: Set DATA0PID or set the EOFRNUM to even frame
Bit 27
SNAK
0x0
wo
Set NAK
A write to this bit sets the NAK bit for the endpoint. The
application uses this bit to control the transmission of NAK