
GD32F403xx User Manual
704
The total data byte number of a transfer.
This field is the total data bytes of all the data packets desired to be transmitted in
an IN transfer. Program this field before the endpoint is enabled. When software
successfully writes a packet into the endpoint’s Tx FIFO, this field is decreased by
the byte size of the packet.
Device OUT endpoint 0 transfer length register (USBFS_DOEP0LEN)
Address offset: 0x0B10
Reset value: 0x0000 0000
This register has to be accessed by word (32-bit)
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
R
e
se
rve
d
S
T
P
C
N
T
[1
:0
]
R
e
se
rve
d
P
C
N
T
R
e
se
rve
d
rw
rw
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
R
e
se
rve
d
T
L
E
N
[6
:0
]
rw
Bits
Fields
Descriptions
31
Reserved
Must be kept at reset value.
30:29
STPCNT[1:0]
SETUP packet count
This field defines the maximum number of back -to-back SETUP packets this
endpoint can accept.
Program this field before setup transfers. Each time a back -to-back setup packet
is received, USBFS decrease this field by one. When this field reaches zero, the
BTBSTP flag in USBFS_DOEP0INTF register will be triggered.
00: 0 packet
01:1 packet
10: 2 packets
11: 3 packets
28:20
Reserved
Must be kept at reset value.
19
PCNT
Packet count
The number of data packets desired to receive in a transfer .
Program this field before the endpoint is enabled. After the transfer starts, this field
is decreased automatically by USBFS after each successful data packet reception