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

USB System Architecture

Special Case: Data Toggle During Control Transfer

During control transfers the data toggle sequence is used to ensure that the host and target remain synchronized during the entire control sequence. The setup transaction begins with a DATA0 data phase, and each subsequent data phase will alternate between DATA1 and DATA0 as illustrated in Figure 8-9.

A problem arises when a data toggle error occurs on the last data transaction of the data stage during a control read. If the last IN transaction of the data stage results in a failed handshake, the target believes that the root hub did not receive the last IN transaction successfully and expects a retry. The target does not transition its toggle bit and is prepared to resend the IN data. The root hub, having received the last IN transaction of the data stage without error transitions its toggle bit and proceeds to the status stage by sending an OUT transaction. In this case the data toggle procedure fails since the target is expecting a retry and the root hub has moved on to the OUT status stage.

Figure 8-9: Data Toggle During Control Transfers

 

Setup

 

Data

 

 

Status

 

 

Stage

 

 

 

Stage

 

 

 

Stage

 

 

 

 

 

Control

SETUP

OUT

OUT

OUT

OUT

IN

Write

 

 

DATA0

 

 

 

 

DATA0

DATA1

DATA1

DATA0

DATA1

Control

SETUP

IN

IN

IN

IN

OUT

Read

 

 

 

 

 

 

 

DATA0

DATA1

DATA0

DATA1

DATA0

DATA1

This problem is avoided by a special protocol that requires the host to issue an OUT setup token upon successfully receiving the last IN transaction of the data stage. The target, recognizing that the direction of the data transfer has changed to OUT, interprets the host’s action as verification that the last IN transaction completed successfully. The target transitions its toggle bit and advances to the status phase, along with the root hub.

188

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