GD32F403xx User Manual
696
Software sets this bit to clear NAKS bit in this register.
25:22
TXFNUM[3:0]
Tx FIFO number
Defines the Tx FIFO number of this IN endpoint.
21
STALL
STALL handshake
Software can set this bit to make USBFS sends STALL handshake when receiving
IN token. This bit has a higher priority than NAKS bit in this register and GINS bit
in USBFS_DCTL register. If both STALL and NAKS bits are set, the STALL bit
takes effect.
For control IN endpoint:
Only USBFS can clear this bit when a SETUP token is received on the
corresponding OUT endpoint. Software is not able to clear it.
For interrupt or bulk IN endpoint:
Only software can clear this bit
20
Reserved
Must be kept at reset value.
19:18
EPTYPE[1:0]
Endpoint type
This field defines the transfer type of this endpoint:
00: Control
01: Isochronous
10: Bulk
11: Interrupt
17
NAKS
NAK status
This bit controls the NAK status of USBFS when both STALL bit in this register
and GINS bit in USBFS_DCTL register are are cleared:
0: USBFS sends data or handshake packets according to the status of the
endpoint’s Tx FIFO.
1: USBFS always sends NAK handshake to the IN token.
This bit is read -only and software should use CNAK and SNAK in this register to
control this bit.
16
EOFRM
DPID
Even/odd frame (For isochronous IN endpoints)
For isochronous transfers, software can use this bit to control that USBFS only
sends data packets for IN tokens in even or odd frames. If the parity of the current
frame number
doesn’t match with this bit, USBFS only responses with a zero -
length packet.
0: Only sends data in even frames
1: Only sends data in odd frames
Endpoint data PID (For interrupt/bulk IN endpoints)
There is a data PID toggle scheme in interrupt or bulk trans fer. Set SD0PID to set
this bit before a transfer starts and USBFS maintains this bit during transfers
according to the data toggle scheme described in USB protocol.
0:
Data packet’s PID is DATA0