Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
172
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

USB System Architecture

Data Toggle With Handshake Packet Error — IN Transaction

Figure 8-8 on page 186 illustrates an IN transaction that fails due to an ACK packet error.

Figure 8-8: IN Transaction With Data Toggle and Handshake Errors

Transaction 1

Host

 

 

 

Target

 

1

IN Token

2

 

0 1

4

DATA0

3

0 0

5

 

 

 

8

 

6

ACK Handshake

7

 

 

 

(Handshake Corrupted)

 

 

Transaction 2

Host

 

 

1

1

1

4

 

 

5

 

 

 

6

 

 

Target

IN Token

2

 

DATA0

3

0 1

 

 

8

ACK Handshake

7

 

186

Chapter 8: Error Recovery

The sequence of events that occur when detecting and recovering from this error is enumerated below:

Transaction 1

1.The host transmits an IN token to the target device.

2.The target device receives the token without any packet errors.

3.The target then transmits a DATA0 packet to the host.

4.The host receives data packet zero without error and the toggle bit matches DATA0.

5.Having successfully received the DATA0 packet, the host transitions the toggle bit to one.

6.The host then transmits an ACK handshake packet to inform the target that data was received without error.

7.The target receives the ACK packet with errors.

8.Since errors are detected by the target, it cannot verify that the host has successfully received the data. Thus, the target leaves the toggle bit unchanged (zero). The target presumes that the host did not receive the data and therefore will attempt to transmit this transaction again. The target then will return the same data again during the next transaction.

Transaction 2

1.The host sends the IN token to the target to get the next consecutive data.

2.The target device receives the packet without errors.

3.The target retransmits the DATA0 packet (consistent with the state of its toggle bit), since it believes that the host failed to receive the data during the last transaction.

4.The host receives the packet without error, but DATA0 does not match the state of its toggle bit.

5.The host recognizes that it is out of sync with the target and therefore discards the data, knowing that it correctly received this same data during the previous transaction. The host also leaves the toggle bit unchanged (one).

6.The host transmits an ACK handshake packet to inform the target that data was received without error. This is done because the target apparently did not receive the previous ACK handshake.

7.The target receives the ACK packet without error.

8.Having successfully received the ACK packet, the target transitions its toggle bit to one. The host and target toggle bits now agree.

The host and target temporarily disagreed on whether the data had actually been completed. However, the data toggle mechanism ensures that the de-syn- chronization is detected and permits re-synchronization.

187

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]