Transmit Operation
During a transmit, single-packet or double-packets can reside in the buffer. The following describes
the details of each:
■ Single-packet transmit: During single packet transmission, the DMA controller fetches data from
the CPU memory and forwards it to the TX FIFO and continues to receive data until the
end-of-frame is transferred. The data is transmitted from the TX FIFO to the MAC by the TX/RX
Controller when the threshold level is crossed or a full packet of data is received into the TX
FIFO. When the TX/RX Controller receives acknowledgment from the MAC that it has received
the EOF, it notifies the DMA so another transmit can begin.
■ Two-packet transmit: Because the DMA must update the descriptor status before releasing it to
the CPU, there can be at most two frames inside a transmit FIFO. The second frame is fetched
by the DMA and put into the TX FIFO only if the
OSF
bit is set in the
EMACDMAOPMODE
register
at offset 0xC18. If this bit is not set, the next frame is fetched from memory only after the MAC
has completely processed the frame and the DMA has released the descriptors.
If the
OSF
bit is set, the DMA starts fetching the second frame immediately after completing the
transfer of the first frame to the FIFO. It does not wait for the status to be updated. The TX/RX
Controller receives the second frame into the FIFO while transmitting the first frame. As soon
as the first frame has been transferred and the status is received from the MAC, the TX/RX
Controller sends the acknowledgement to the DMA. If the DMA has already completed sending
the second packet to the TX/RX Controller, it must wait for the status of the first packet before
proceeding to the next frame.
Collision and Retransmission
If a collision occurs at the MAC application interface while the TX/RX Controller is transferring data
to the MAC, the transmission is aborted and the MAC indicates a retry attempt by giving a collision
status before the EOF is transferred to the TX/RX Controller from the DMA. This enables the TX/RX
Controller to retry transmission of the frame data from the FIFO.
After more than 96 bytes are transferred to the MAC, the FIFO controller clears space in the FIFO
and makes it available to the DMA to transfer more data. Retransmission is not possible after this
threshold is crossed or when the MAC indicates a late collision event.
When a frame transmission is aborted because of underflow and a collision event follows, which
initiates a retry, then the retry has higher priority than the abort.
TX FIFO Flush Operation
The TX FIFO can be flushed by setting the
FTF
bit in the
EMACDMAOPMODE
register. The flush
operation is immediate and the TX/RX Controller clears the TX FIFO and the corresponding pointers
to the initial state even if it is in the middle of transferring a frame to the MAC. The data which is
already accepted by the MAC transmitter is not flushed. This data is scheduled for transmission
and results in an underflow event because the TX FIFO did not complete the transfer or the rest of
the frame. As in all underflow conditions, a runt frame is transmitted and observed on the line. The
status of such a frame is marked with both underflow and frame flush events in the Transmit
Descriptor 0 (TDES0) word.
The TX/RX Controller also stops accepting any data from the DMA during the flush operation. It
generates and transfers Transmit Status Words to the application for the frames that are flushed
inside the FIFO, including partial frames. Frames that are completely flushed in the TX/RX Controller
are identified by setting the Flush Status (FF) bit in the Transmit Descriptor 0 (TDES0) word. The
TX/RX Controller completes the flush operation when the DMA accepts all of the status words for
1435
June 18, 2014
Texas Instruments-Production Data
Tiva
™
TM4C1294NCPDT Microcontroller