I. Field
The present disclosure relates generally to data communication, and more specifically to techniques for controlling data exchanges via USB.
II. Background
USB is a serial bus that is widely used to interconnect computers with external devices such as keyboards, mouse devices, printers, scanners, memory sticks, disk drives, digital cameras, webcams, etc. USB is also commonly used for other electronics devices such as personal digital assistants (PDAs), game machines, etc.
USB utilizes a host-centric architecture for data exchanges between a USB host and USB devices coupled to the USB host. The USB host may reside on a computer, and the USB devices may be external devices coupled to the computer via USB wire. In the host-centric architecture, the USB host controls communication with all USB devices. Whenever a new USB device couples to the computer, the USB host and the USB device exchange signaling to configure the USB device. Thereafter, the USB host may periodically send token packets to the USB device whenever the USB host desires to send data to, or receive data from, the USB device. The USB device may receive data from, or send data to, the USB host whenever token packets are issued by the USB host.
The USB host may start a transaction by sending a token packet to the USB device. Upon receiving the token packet, the USB device may send a negative acknowledgement (NAK) handshake packet if the USB device temporarily cannot send or receive data. Upon receiving the NAK from the USB device, the USB host may retry the NAK'ed transaction by sending another token packet at a later time.
NAK handshake packets may be used for flow control in USB. The USB device may send NAK handshake packets to adjust/throttle the data rate and prevent its buffers from under-flowing or over-flowing. However, the NAK'ed transactions may consume a significant amount of USB bandwidth and power.
There is therefore a need in the art for techniques to more efficiently perform flow control in USB.