|
From: Tim R. <ti...@pr...> - 2016-03-29 16:59:51
|
Phani Kumar wrote: > Thanks Tim. > > In 9.1.1.5 section of USB 2.0 Specification, it is mentioned as below: > > 9.1.1.5 Configured > Before a USB device’s function may be used, the device must be > configured. From the device’s > perspective, configuration involves correctly processing a > SetConfiguration() request with a non-zero > configuration value. Configuring a device or changing an alternate > setting causes all of the status and > configuration values associated with endpoints in the affected > interfaces to be set to their default values. > *This includes setting the data toggle of any endpoint using data > toggles to the value DATA0*. > > Can you please tell me what is the meaning of "*This includes setting > the data toggle of any endpoint using data toggles to the value DATA0"? > * I'm glad to see you are reading the specification. As specifications go, the USB Specification is quite readable. Have you read the description of PIDs and data synchronization in section 8.6? That's where the DATA0/DATA1/DATA2 terms are defined. Every USB packet has an identifier (PID) that says what kind of packet it is. This list includes SETUP, ACK, NAK, and several others. For data packets on all pipes but isochronous, instead of having a single DATA identifier, they use a pair to detect dropouts. The very first packet after a reset uses DATA0. When that is acknowledged, the next packet uses DATA1, then DATA0, etc. If the host gets a packet with the wrong toggle, it knows there was a packet lost. That sentence just means that, after a device is configured, all endpoints start with DATA0 again. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |