![ARTERY AT32F435 Series Reference Manual Download Page 493](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592493.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 493
Rev 2.03
from the external memory is written to the transmit FIFO.
The controller decrements this field every time a packet
from the receive FIFO is written to the external memory.
21.6.5.17 OTGFS device IN endpoint-x transfer size register
(OTGFS_DIEPTSIZx) (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 MC
0x0
rw
Multi count
For periodic IN endpoints, this field indicates the number
of packets to be transmitted on the USB for each frame.
The controller uses this field to calculate the data PID
transmitted on synchronous IN endpoints.
01: 1 packet
10: 2 packets
11: 3 packets
Bit 28: 19 PKTCNT
0x000
rw
Packet count
Indicates the total number of USB packets (data transfer
size on the endpoint) this field is decremented every time
a packet is read from the transmit 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
from the external memory is written to the transmit FIFO.
21.6.5.18 OTGFS device IN endpoint transmit FIFO status register
(OTGFS_DTXFSTSx) (x=1
…
7, where x is endpoint number)
This is a ready-only register containing the free space information for the device IN endpoint transmit
FIFO.
Bit
Register
Reset value
Type
Description
Bit 31: 16 Reserved
0x0000
resd
Kept at its default value.
Bit 15: 0
INEPTXFSAV
0x0200
ro
IN endpoint TxFIFO space available
Indicates the amount of free space in the endpoint transmit
FIFO. Values are in terms of 32-bit words.
0x0: Endpoint transmit FIFO is full
0x1: 1 word available
0x02: 2 words available
0xn: n words available (0 < n < 512)
0x200: Remaining 512 words
Others: Reserved