Posts Tagged ‘detecting’
Detecting an Incoming Data Packet
Posted by Parkzone Corsair in Memory on February 5th, 2010
The data-toggle value enables detecting missed or duplicate data packets in control, bulk, and interrupt transfers. IN and OUT transactions have a data toggle value in the data packet’s PID field. DATA0 is a code of 0011, and DATA is 1011. In controller chips, a register bit often indicates the data-toggle state, so the data-toggle value is sometimes called the data-toggle bit. Each endpoint maintains its own data toggle.
Both the sender and receiver keep track of the data toggle. Host controllers handle data toggles at a low level that is invisible to applications and device drivers. Some device controller chips handle the data toggles completely in hardware, while others require some firmware control. If you’re debugging a device where the correct data is transmitting on the bus but the receiver is ignoring or discarding the data, chances are good that the device isn’t sending or expecting the correct data-toggle value.
When the host configures a device on power up or attachment, the host and device each set their data toggles to DATA for all except some high-speed isochronous endpoints. On detecting an incoming data packet, the host or device compares the state of its data toggle with the received data toggle. If the values match, the receiver toggles its value and returns an ACK handshake packet. The ACK causes the sender to toggle its value for the next transaction.
Tags: attachment, data, detecting, Device, incoming, packet




