Q: How does USB protocol detect an error in communication?
A: USB protocol detects error using CRC (Cyclic Redundancy Check). This is done by the SIE (Serial Interface Engine), thus eliminating the need of CRC check in software and reduces the software overhead. For token packet CRC is 5 bit & data packet CRC is 16 bits.
Q: What happens if the SIE receives data that is corrupted?
A: The SIE discards the corrupt packet if the packet fails the CRC checks. No software intervention is required. An error flag is set indicating that a corrupted packet was received. The SIE will not ACK packets that have incorrect CRC values. For interrupt, bulk, and control transfers the host will try to retransmit the packet if it fails to receive the ACK. In this way these transmissions will not have data loss due to a corrupted packet but may suffer from lower application bandwidth.