AT32F425
Series Reference Manual
2022.03.30
Page 415
Ver 2.01
controller interrupts the application when the transfer size
becomes 0. The transfer size can be set to the maximum
packet size of the endpoint at the end of eack packet.
The controller decrements this field every time a packet
from the external memory is written to the transmit FIFO.
20.6.5.16
OTGFS device OUT endpoint 0 transfer size register
(OTGFS_DOEPTSIZ0)
The application must set this register before enabling endpoint 0. Once the endpoint 0 is enabled using
the endpoint enable pin in the device endpoint 0 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 SUPCNT
0x0
rw
SETUP packet count
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: 20 Reserved
0x000
resd
Kept at its default value.
Bit 19
PKTCNT
0
rw
Packet count
This bit is decremented to 0 after a packet is written to the
receive FIFO.
Bit 18: 7
Reserved
0x000
resd
Kept at its default value.
Bit 6: 0
XFERSIZE
0x00
rw
Transfer size
Indicates the transfer size (in bytes) for the endpoint 0. 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
eack packet.
The controller decrements this field every time a packet
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.
20.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).