![ARTERY AT32F435 Series Скачать руководство пользователя страница 488](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592488.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 488
Rev 2.03
21.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 endpoints 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 endpoint. The
application can use this bit to control the transmission 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 endpoint. If a
NAK bit, global 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 endpoint 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 followings:
0: The controller is sending non-NAK handshakes based
on the FIFO status
1: The controller is sending NAK handshakes
–
When this bit is set (either by the application or the
controller), the controller stops receiving any data on an
OUT endpoint, even if there is space in the receive FIFO.
The controller always responds to SETUP data packets
with an ACK handshake, regardless of whether this bit is
set or not.
Bit 16
Reserved
0x0
resd
Kept at its default value.
Bit 15
USBACEPT
0x1
ro
USB active endpoint
This bit is always set to 1, indicating that a control endpoint
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
ro
Maximum packet size
The maximum packet size of the control OUT endpoint 0
is the same as that of the control IN endpoint 0.
00: 64 bytes
01: 32 bytes
10: 16 bytes
11: 8 bytes