Hitachi HD64465 User Manual page 299

Windows ce intelligent peripheral controller
Table of Contents

Advertisement

g) Transfer Description Retirement
When a transfer descriptor is complete (all data sent/received), the ErrorCount reaches 3
for a GTD, a fatal error condition occurs for a GTD, or an ITD is late, the Transfer
Descriptor must be retired. A fatal error is classified as the new CompletionCodes of Stall,
DataOverrun, DataUnderrun, and UnexpectedPID.
Several actions are required to retire a Transfer Descriptor.
1. Dequeue the Transfer Descriptor
2. Enqueue the Transfer Descriptor to the Done Queue
3. Update the Endpoint Descriptor
• Dequeue the Transfer Descriptor
To dequeue the Transfer Descriptor, the Host Controller copies the current Transfer
Descriptor NextTransferDescriptor field to the NextTransferDescriptor of the
Endpoint Descriptor.
• Enqueue the Transfer Descriptor
Following the dequeuing of the Transfer Descriptor from the Endpoint Descriptor
Queue, the Transfer Descriptor is enqueued to the Done Queue. To accomplish this, the
Host Controller first writes the value of the HcDoneHead to the
NextTransferDescriptor field of the Transfer Descriptor being enqueued. Second, the
HcDoneHead is written with the address of the Transfer Descriptor being enqueued.
The next step is to potentially update the Done Queue Interrupt Counter. The
InterruptDelay field of the Transfer Descriptor specifies the maximum number of
SOFs that may occur before the Host Controller writes the HcDoneHead to the HCCA
and generates an interrupt. If the value of the InterruptDelay field is 111b, the Host
Controller Driver does not require an interrupt for the Transfer Descriptor and the Done
Queue Interrupt Counter is left unchanged. If the value of the InterruptDelay field is
not 111b, but is greater than or equal to the current value of the Done Queue Interrupt
Counter, the counter is also left unchanged. In this case, another Transfer Descriptor
already on the Done Queue requires an interrupt earlier than the Transfer Descriptor
being retired. If the value of the InterruptDelay field is not 111b, but is less than the
current value of the Done Queue Interrupt Counter, the counter is loaded with the value
of the InterruptDelay field. In this case, the Transfer Descriptor being retired requires
an interrupt earlier than all of the Transfer Descriptors currently on the Done Queue.
If the Transfer Descriptor is being retired with an error, then the Done Queue Interrupt
Counter is cleared as if the InterruptDelay field were zero.
• Update the Endpoint Descriptor
In addition, the Host Controller must update the Endpoint Descriptor to reflect the
changes to the NextTransferDescriptor pointer, the DataToggleCarry field, and
potentially the Halt field. The Halt field is only set for a GTD with an error count of 3
or a fatal error condition.
Rev. 3.0, 03/01, page 280 of 390

Advertisement

Table of Contents
loading

Table of Contents