Sundance Technology
ST201
PRELIMINARY draft 2
8.Verify EepromBusy is false.
9.Issue WriteRegister command (opcode = 01 aaaa aaaa)
Step 4 through 8 may be skipped for certain types of EEPROM devices.
ADAPTER TXDMA SEQUENCE
Beginning with the host system writing to the TxD- MAListPtr register (when starting from an empty TxDMAList, for instance), the ST201 performs the following procedure during transfers of TxDMA frames.
1.Verifies the TxDMAListPtr is
2.Verifies not in the TxDMAHalt state.
3.Fetches the second dword from the TFD pointed to by TxDMAListPtr and writes this value into the TxFIFO.
4.One by one, fetches the TxDMAFragAddr/TxD- MAFragLen entries from the TFD, and moves the associated data fragments to the TxFIFO.
5.Sets the TxDMAComplete bit in the TFD.
6.If TxDMAHalt is in effect, waits until a TxD- MAResume is issued.
7.If a transmit under run has occurred, waits until the host system sets the TxReset bit.
8.
9.Fetches the TxDMANextPtr from the current TFD. If TxDMANextPtr is zero, the TxDMA Logic becomes idle. If polling is disabled (TxD- MAPollPeriod is zero), the TxDMA Logic waits for a
10.With a new TFD to process, the ST201 returns to step 2.
ADDING TFD’S TO THE END OF THE TXDMALIST
The following sequence describes the process for adding TFD’s to the end of the TxDMAList when TxDMA polling is disabled (TxDMAPollPeriod is zero).
1.Set the TxDMAHalt bit.
2.Wait for the TxDMAHalt to complete by polling on TxDMAHalted bit.
3.Update TxDMANextPtr in the last TFD in the
TxDMAList with the address of the TFD being added.
4.Read TxDMAListPtr.
5.If TxDMAListPtr is zero, write the address of the new TFD to TxDMAListPtr.
6.Resume the TxDMA Logic by setting TxD- MAResume bit. The TxDMA Logic will become idle when it fetches a zero TxDMANextPtr value from a TFD. One way to restart the TxDMA process is by writing a
When polling is enabled (TxDMAPollPeriod is non- zero), TFD’s can be added to the end of the TxD- MAList with no register accesses by writing the address of the new TFD in the last TFD’s TxD- MANextPtr field.
INSERTING A TFD AT THE HEAD OF THE TXDMALIST
TFD’s cannot be added before the active TFD in the TxDMAList, they can only be added after the active (unfinished) TFD. The following sequence describes the process for adding TFD’s to the head of the TxDMAList when TxDMA polling is disabled (TxDMAPollPeriod is zero).
1.Set TxDMAHalt bit.
2.Wait for the TxDMAHalt to complete by polling the TxDMAHalted bit. When halted, the TxD- MAListPtr register will hold the address of the TFD which just completed transfer into the ST201 (the “last TFD in the TxDMAList”).
3.Find the last TFD in the TxDMAList, corre- sponding to the TFD at the address held in the TxDMAListPtr register. This will also be the last TFD in the TxDMAList with the TxDMACom- plete bit set.
4.Copy the value in the “last TFD’s”TxDMANex- tPtr into the TxDMANextPtr field of the TFD to be inserted.
5.Update TxDMANextPtr field in the “last TFD” with the address of the inserted TFD.
6.Read TxDMAListPtr.
7.If TxDMAListPtr is zero, write the address of the inserted TFD to TxDMAListPtr.
8.Resume the TxDMA Logic by setting TxD- MAResume.
When polling is enabled (TxDMAPollPeriod is non- zero), TFD’s can be inserted to the head of the TxDMAList with no register accesses as follows.
1.Find the first TFD in the list with TxDMACom- plete bit cleared (the “first TFD”).
2.Set the “first TFD’s”TxDMANextPtr to zero.
3.Check the TxDMAComplete bit of “the first TFD”. If clear, proceed to the next step. If set, it’s too late to insert the new TFD at the loca-
24