GD32W51x User Manual
893
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_DOEPxINTF register w ill be triggered.
00: 0 packet
01: 1 packet
10: 2 packets
11: 3 packets
28:19
PCNT[9:0]
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
on bus.
18:0
TLEN[18:0]
Transfer length
The total data bytes number of a transfer.
This field is the total data bytes of all the data packets desired to receive in an OUT
transfer. Program this field before the endpoint is enabled. Each time after softw are
reads out a packet from the RxFIFO, this field is decreased by the byte size of the
packet.
Device IN endpoint-x transmit FIFO status register (USBFS_DIEPxTFSTAT) (x =
0..3, where x = endpoint_number)
Address offset: (endpoint_number × 0x20)
Reset value: 0x0000 0200
This register contains the information of each endpoint’s Tx FIFO.
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
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
IE
P
T
F
S
[1
5
:0
]
r