|
Hi Scott,
You need not to configure the endpoint to respond it differently to a bulk read request, based on EP condition and received data it will automatically issue a STALL, NAK or data, this is a USB2.0 specisfication requirement.
When the host is ready to receive bulk data, it issues an IN token(Bulk Read). The function endpoint responds by returning either a data packet or, should it be unable to return data, a NAK or STALL handshake.
NAK- indicates that the function is temporarily unable to return data,
STALL- indicates that the endpoint is permanently halted and requires USB System Software intervention.
ACK- If the host receives a valid data packet, it responds with an ACK handshake.
If the host detects an error while receiving data, it returns no handshake packet to the function.
When the host is ready to transmit bulk data(Bulk Write), it first issues an OUT token packet followed by a data packet . If the data is received without error by the function, it will return one of three (or four including NYET, for a device operating at high-speed) handshakes:
• ACK indicates that the data packet was received without errors and informs the host that it may send the next packet in the sequence.
• NAK indicates that the data was received without error but that the host should resend the data because the function was in a temporary condition preventing it from accepting the data (e.g., buffer full).
• If the endpoint was halted, STALL is returned to indicate that the host should not retry the transmission because there is an error condition on the function.
If the data packet was received with a CRC or bit stuff error, no handshake is returned.
Regards
Prajith
|