USB Transactions
13-61
USB Function Module
Except for control endpoint 0, separate endpoint halt bits are defined for each
direction; so for a given endpoint number, the TX can be halted when the RX
is not.
Packet Errors
If an error (CRC, bit stuffing or PID check) occurs during the token packet of
a USB IN transaction to a non-isochronous endpoint, the USB block ignores
the transaction. No endpoint-specific interrupt to the local host occurs for
transactions with corrupted packets. If the local host clears the TX FIFO during
the data packet of an IN transaction, a bit stuffing error is forced.
If the USB host returns no handshake after an IN transaction (case of error
during transmission), the USB function module detects after a time-out that an
error has occurred. The data to transmit is still in the TX FIFO, and can be
resent during next IN transaction, the FIFO_En bit is not cleared, and no inter-
rupt is asserted to the local host.
13.3.2.3
Non-Isochronous IN Endpoint FIFO Error Conditions
The local host cannot write more data into the TX FIFO than the configured
FIFO size.
13.3.3 Isochronous OUT (USB HOST–> LH) Transactions
Isochronous OUT transactions are USB transactions where a given amount
of data is transferred from the USB host to the USB function module device
every 1-ms USB frame. No USB handshaking is provided, and no endpoint-
specific interrupt to the local host is generated at completion of an isochronous
OUT transaction. The local host is responsible for handling isochronous OUT
data at each start of frame (SOF) interrupt.
At every SOF interrupt, the local host code must select the endpoint for each
isochronous OUT endpoint by writing the appropriate value into the EP_NUM
register and checking the ISO_FIFO_Empty bit. If the RX FIFO contains data,
code must read the RXF_Count value (if the number of bytes to read from RX
FIFO is not known), read all the bytes from RX FIFO via the DATA register, then
clear the EP_Sel bit.
Because the USB transaction for the isochronous endpoint can occur at any
time during the 1-ms USB frame, the USB interface implements double-buffer-
ing of the endpoint receive data FIFO. The endpoint includes two FIFOs, each
of which is the length of the configured isochronous endpoint. At all times, one
of the two FIFOs is foreground and the other is background. The USB interface