Texas Instruments TNETE211 Network Card User Manual


 
GO Command
6-5
Transmitting and Receiving Frames
forward pointer point to the next available list. The last list should have a for-
ward pointer of 0. You must then initialize the CSTAT fields in the lists.
Opening a receive channel works in much the same way as opening a transmit
channel. You must first write the address of the beginning of the list chain to
CH_PARM and then give the receive open channel (Rx GO) command.
ThunderLAN DMAs the data from its internal FIFO to the receive buffer pointed
to in the list structure.
ThunderLAN writes the data count field with the data size when the frame is
complete. The Frm_Cmp bit in the receive CSTAT complete field is set when
the receive data is completely DMAed into the receive buffer. ThunderLAN
then gives the host an Rx EOF interrupt. The driver looks at the Frm_Cmp bit
to determine when the receive frame is complete and acknowledges the inter-
rupt. The driver frees up the buffer for a new frame.
The driver makes the old list’s forward pointer equal to 0. The previous list’s
forward pointer can be set up to point to this list. If done quickly, ThunderLAN
always has a receive buffer to place frames in and the receive channel remains
open. If ThunderLAN encounters the 0 forward pointer (meaning that it has
filled the last buffer available to it), it gives the host an Rx EOC interrupt and
stops the receive channel.
Implementing continuous receive reduces the possibility of losing frames due
to not having receive buffers. In continuous receive, the driver acknowledges
Rx EOF interrupts as each frame is delivered to the host. The driver manages
the receive lists and buffers so that ThunderLAN always has a free buffer to
place data in.
In case of an Rx EOC interrupt, the driver frees up buffers for the receive pro-
cess, creates a system of linked lists, and restarts the receive channel by issu-
ing an Rx GO command.
The Rx GO command is used to pass a receive list structure to ThunderLAN.
ThunderLAN uses the list structure to DMA the received data from the network.
There are two steps involved in issuing an Rx GO command:
In the CH_PARM register, write the physical address of the beginning of
the list structure. ThunderLAN uses this physical address to DMA data to
host memory.
In the HOST_CMD register, write the appropriate bits to start the channel.
The Rx GO command writes to the GO bit and selects the transmit channel
by writing to the Ch_Sel field. Set R/T to 1, indicating a receive command.