Hitachi HD64465 User Manual page 296

Windows ce intelligent peripheral controller
Table of Contents

Advertisement

d) General Packet Begin and End Address Calculation
When the Host Controller fetches a General Transfer Descriptor, it gets the address of the
next memory location to be accessed from CurrentBufferPage and CurrentBufferOffset.
If these values are both 0, then the packet size will be zero, regardless of the setting of
MaximumPacketSize in the Endpoint Descriptor. As the data is transferred it might cross a
page boundary. If it does, BufferEndPage is substituted for the current
CurrentBufferPage. This page boundary crossing may occur during a packet transfer (i.e.,
a single packet may cross a page boundary.)
The BeginAddrOffset for a GTD is always CBPOffset. The value of EndAddrOffset is
CBPOffset plus MaxPacketSize unless it is the last packet defined by the buffer, in which
case it will be BEOffset.
e) Transfer Description Size Calculation
The maximum data packet size is that of an ITD, 1023 bytes. Therefore the
DataPacketSize field need only be 10 bits. The DataPacketSize is calculated by
{1,EndAddrOffset[9:0]} - {0,BeginAddrOffset[9:0]}. The concatenation of the 1 and the 0
to the operation accounts for the case of a page crossing where BeginAddrOffset[9:0]
would be larger than EndAddrOffset[9:0].
f) Status Writeback
At the completion of a transaction attempt, the Host Controller performs a status writeback
to the Transfer Descriptor. The information written back differs depending on what type of
Transfer Descriptor is being serviced.
• General Transfer Description Status Writeback
General Transfer Descriptors are updated after every attempted transaction that is
serviced. There are four fields that require updating after a transaction attempt. They
are the CompletionCode field, the DataToggleControl field, the
CurrentBufferPointer field, and occasionally the ErrorCount field.
1. DataToggelControl
The DataToggleControl field consists of two bits. When MSB is set it indicates that
the DataToggle value is obtained from the ED. Otherwise it is obtained from bit 0.
The DataToggleControl field must be updated to reflect the data toggle for the next
transfer. If the packet just transmitted completed successfully, the Host Controller
sets the MSb to 1 and toggles the LSb of DataToggleControl field to reflect a new
value for the next packet. If the current packet did not complete with a proper ACK
or NAK, the field should not be changed.
2. CurrentBufferPointer
The CurrentBufferPointer must be updated if the CompletionCode is NoError,
DataUnderrun, or DataOverrun. For all other cases the CurrentBufferPointer
should not be updated because the Host Controller may retry the current packet.
Rev. 3.0, 03/01, page 277 of 390

Advertisement

Table of Contents
loading

Table of Contents