
GD32L23x User Manual
623
Isochronous transfers
Isochronous transfers can guarantee constant data rate and bounded latency, but do not
support data retransmission in response to errors on the bus. A receiver can determine that
a transmission error occurred. The low-level USB protocol does not allow handshakes to be
returned to the transmitter of an isochronous pipe. Normally, handshakes would be returned
to tell the transmitter whether a packet was successfully received or not. Consequently, the
isochronous transaction does not have a handshake phase, and have no ACK packet after
the data packet. Data toggling is not supported, and DATA0 PID is only used to start a data
packet.
The isochronous endpoint status only can be set DISABLED and VALID, any other value is
illegal. The application software can implement double-buffering to improve performance. By
swapping transmission and reception data packet buffer on each transaction, the application
software can copy the data into or out of a buffer, at the same time the USB peripheral handle
the data transmission or reception of data in another buffer. The DTOG bit indicates which
buffer that the USB peripheral is currently using.
The application software initializes the DTOG according to the first buffer to be used. At the
end of each transaction, the RX_ST or TX_ST bit is set, depending on the enabled direction
regardless of CRC errors or buffer-overrun conditions (if errors occur, the ERRIF bit will be
set). At the same time, The USB peripheral will toggle the DTOG bit, but will not affect the
STAT bit.
27.6.3.
USB events and interrupts
Each USB action is always initiated by the application software, driven by one USB interrupt
or event. After system reset, the application needs to wait for a succession of USB interrupts
and events.
Reset events
System and power-on reset
Upon system and power-on reset, the application software should first provide all required
clock to the USB module and interface, then de-assert its reset signal so to be able to access
its registers, last switch on the analog part of the device related to the USB transceiver.
The USB firmware should do as follows:
Reset CLOSE bit in USBD_CTL register.
Wait for the internal reference voltage to be stable.
Clear SETRST bit in USBD_CTL register.
Clear the IFR register to remove the spurious pending interrupt and then enable other
unit.
USB reset (RESET interrupt)