![GigaDevice Semiconductor GD32F10 Series Скачать руководство пользователя страница 760](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f10-series/gd32f10-series_user-manual_2225800760.webp)
GD32F10x User Manual
760
the data buffer, which is controlled by the internal register configured. The received 2-byte
CRC is also copied to the packet memory buffer, immediately following data bytes. If the
length of data is greater than actually allocated length, the excess data are not copied. This
is a buffer overrun situation. A STALL handshake is sent, and this transaction fails.
If an addressed endpoint is not valid, a NAK or STALL handshake packet is sent instead of
the ACK, according to the endpoint status and no data is written to the endpoint data buffers.
Control transfers
Control transfers require that a SETUP transaction be started from the host to a device to
describe the type of control access that the device should perform. The SETUP transaction
is followed by zero or more control DATA transactions that carry the specific information for
the requested access. Finally, a STATUS transaction completes the control transfer and
allows the endpoint to return the status of the control transfer to the client software. After the
STATUS transaction for a control transfer is completed, the host can advance to the next
control transfer for the endpoint.
USBD always use endpoint 0 in two directions as default control endpoint to handle control
transfers. It is aware of the number and direction of data stages by interpreting the contents
of SETUP transaction, and is required to set the unused direction endpoint 0 status to STALL
except the last data stage.
At the last data stage, the application software set the opposite direction endpoint 0 status to
NAK. This will keep the host waiting for the completion of the control operation. If the operation
completes successfully, the software will change NAK to VALID, otherwise to STALL. If the
status stage is an OUT, the STATUS_OUT bit should be set, so that a status transaction with
non-zero data will be answered STALL to indicate an error happen.
According
to USB specification, device isn’t allowed to abort current command and then start
new command, so that device must answer a SETUP packet with an ACK handshake packet,
not with a NAK or STALL handshake packet.
When the configured control endpoint 0 receives a SETUP token, the USBD accepts the data,
performing the required data transfers and sends back an ACK handshake. If there is
unsuccessfully handling data transfer about previously issued request, the USB discard
SETUP token and regard current condition as error, and then urge the host to send the
request token again.
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. 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
Содержание 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 ...