GD32F10x User Manual
784
supported by Rx FIFO.
4. Set CEN bit in USBFS_HCHxCTL register to enable the channel.
Channel disable sequence
Software can disable the channel by setting both CEN and CDIS bits at the same time.
USBFS will generate a channel disable request entry in request queue after the register
setting operation. When the request entry reaches the top of request queue, it will be
processed by USBFS immediately:
For OUT channels, the specified channel will be disabled immediately. Then, a CH flag will
be generated and the CEN and CDIS bits will be cleared by USBFS.
For IN channels, USBFS pushes a channel disable status entry into Rx FIFO. The software
should handle the Rx FIFO not empty event: read and pop this status entry, and then, a CH
flag will be generated and the CEN and CDIS bits will be cleared.
IN transfers operation sequence
1. Initialize USBFS global registers.
2. Initialize the channel.
3. Enable the channel.
4. After the IN channel is enabled by software, USBFS generates an Rx request entry in the
corresponding request queue.
5. When the Rx request entry reaches the top of the request queue, USBFS begins to
process this request entry. If bus time for the IN transaction indicated by the request entry
is enough, USBFS starts the IN transaction on USB bus.
6. If the IN transaction is finished successfully (ACK handshake received), USBFS pushes
the received data packet into the Rx FIFO and triggers ACK flag. Otherwise, the status
flag (NAK) reports the transaction result.
7. If the IN transaction described in step 5 is successful and PCNT is larger than 1 in step2,
return to step 3 and continues to receive the remaining packets. If the IN transaction
described in step 5 is not successful, return to step 3 to re-receive the packet again.
8. After all the transactions in a transfer have been 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 need, USBFS
generates TF flag to indicate that the transfer been successfully finished.
9. Disable the channel. Now the channel is in IDLE state and is ready for other transfers.
OUT transfers operation sequence
1. Initialize USBFS global registers.
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...