GD32F403xx User Manual
649
FIFO successfully and sends ACK handshake on USB bus), PCNT in
USBFS_DOEPxLEN register is decreased by 1 and the ACK flag is triggered, otherwise,
the status flags report the transaction result.
4.
After all the data packets in a transfer are successfully received on USB bus, USBFS
pushes a TF status entry into the Rx FIFO on top of the last packet data. Thus , after
reading and poping all the received data packet, the TF status entry is read, USBFS
generates TF flag to indicate that the transfer successfully is finished and the IN endpoint
is disabled.
23.6.
Interrupts
USBFS has two interrupts: global interrupt and wake-up interrupt.
The source flags of the global interrupt are readable in USBFS_GINTF register and are listed
in
Table 23-2. USBFS global interrupt
Table 23-2. USBFS global interrupt
Interrupt Flag
Description
Operation Mode
SESIF
Session interrupt
Host or device mode
DISCIF
Disconnect interrupt flag
Host Mode
IDPSC
ID pin status change
Host or device mode
PTXFEIF
Periodic Tx FIFO empty interrupt flag
Host Mode
HCIF
Host channels interrupt flag
Host Mode
HPIF
Host port interrupt flag
Host Mode
ISOONCIF/PXNCI
F
Periodic transfer Not Complete Interrupt
flag /Isochronous OUT transfer Not
Complete Interrupt Flag
Host or device mode
ISOINCIF
Isochronous IN transfer Not Complete
Interrupt Flag
Device mode
OEPIF
OUT endpoint interrupt flag
Device mode
IEPIF
IN endpoint interrupt flag
Device mode
EOPFIF
End of periodic frame interrupt flag
Device mode
ISOOPDIF
Isochronous OUT packet dropped interrupt
flag
Device mode
ENUMF
Enumeration finished
Device mode
RST
USB reset
Device mode
SP
USB suspend
Device mode
ESP
Early suspend
Device mode
GONAK
Global OUT NAK effective
Device mode
GNPINAK
Global IN Non -Periodic NAK effective
Device mode
NPTXFEIF
Non-Periodic Tx FIFO empty interrupt flag
Host Mode
RXFNEIF
Rx FIFO non -empty interrupt flag
Host or device mode
SOF
Start of frame
Host or device mode