![ARTERY AT32F435 Series Скачать руководство пользователя страница 494](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592494.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 494
Rev 2.03
21.6.5.19 OTGFS device OUT endpoint-x transfer size register
(OTGFS_DOEPTSIZx) (x=1
…
7, where x is endpoint number)
The application must set this register before enabling endpoint x. Once the endpoint x is enabled using
the endpoint enable pin in the device endpoint x control register, the controller modifies this register. The
application can only read this register as long as the controller clears the endpoint enable bit.
Bit
Register
Reset value
Type
Description
Bit 31
Reserved
0x0
resd
Kept at its default value.
Bit 30: 29 RXDPID
0x0
ro
Received data PID
Applies to synchronous OUT endpoints only.
This is the data PID received in the last packet.
00: DATA0
01: DATA2
10: DATA1
11: MDATA
SETUP packet count
Applies to synchronous OUT endpoints only. Indicates the
number of back-to-back SETUP data packets the endpoint
can receive.
01: 1 packet
10: 2 packets
11: 3 packets
Bit 28: 19 PKTCNT
0x000
rw
Packet count
Indicates the number of USB packets transmitted on the
endpoint.
This field is decremented every time a packet is written to
the receive FIFO (maximum packet size and short packet)
Bit 18: 0
XFERSIZE
0x00000
rw
Transfer size
Indicates the transfer size (in bytes) for the current
endpoint. The controller interrupts the application when
the transfer size becomes 0. The transfer size can be set
to the maximum packet size of the endpoint, to be
interrupted at the end of each packet.
The controller decrements this field every time a packet is
read from the receive FIFO and written to the external
memory.
21.6.6 Power and clock control registers
21.6.6.1 OTGFS power and clock gating control register
(OTGFS_PCGCCTL)
This register is available in host and device modes.
Bit
Register
Reset value
Type
Description
Bit 31: 5
Reserved
0x0000000
resd
Kept at its default value.
Bit 4
SUSPENDM
0x0
ro
PHY suspend
Indicates that the PHY has been suspended.
Bit 3: 1
Reserved
0x0
resd
Kept at its default value.
Bit 0
STOPPCLK
0x0
rw
Stop PHY clock
The application uses this bit to stop PHY clock when the
USB is suspended, session is invalid or device is
disconnected. The application clears this bit when the USB
is resumed or a new session starts.