713
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
at the same time, preventing and handling conflicts for medium access management; in full-duplex mode, as long as
the physical medium supports simultaneous transmit and receive operations, and only two stations that are configured
in full-duplex mode access the LAN, they can transmit and receive at the same time without conflict.
MAC frame transmission process
The DMA controller and MAC in the Ethernet module control all Ethernet frame data transmission. After received
the application transmitted instruction, DMA will read the transmit frame from the system storage area and store it
in the TxFIFO with a size of 2K. According to the selected cut-through or store-and-forward mode, the data will be
taken out to the MAC controller, and the data will transmit to Ethernet PHY through MII/RMII interface, optionally
configured to have the MAC controller automatically add a hardware-calculated CRC value to FCS of the data frame.
When the MAC controller receives the EOF signal from the TxFIFO, the transmission process ends, and the
transmission status information is generated by the MAC controller and written back to the DMA controller, and the
transmission status can be queried through the DMA current transmit descriptor.
There are two modes to fetch TxFIFO data to MAC controller:
Cut-Through (Threshold) mode. When the data in the TxFIFO reaches the set threshold or the EOF is written
before the threshold is reached, the data will be taken out of the TxFIFO and transmitted to the MAC controller.
ETH_DMAOPMOD.TTC can set this threshold.
Store-and-Forward mode. After a complete frame is written into TxFIFO, the data in TxFIFO will be transmitted
to MAC controller. If the frame is not completely written into TxFIFO, that is, the size of TxFIFO is smaller
than the length of the Ethernet frame to be transmitted, the data will also be transmitted to MAC controller when
TxFIFO is about to be full.
Special case handling when frame is transmitting
When transferring data, if the ETH_DMAOPMOD.FTF is mis-operated, TxFIFO will be cleared (when this bit is set
to 1, the data in TxFIFO will be cleared and the pointer of the TxFIFO will be reset. After the clearing operation is
completed, this bit will be cleared by hardware), or if the idle DMA transmit descriptor is insufficient, the data cannot
be transmitted continuously in time, and MAC controller will identify the data underflow state. If only the SOF signal
is received and the EOF signal is not received, MAC will consider the SOF signal invalid, and regard this frame of
data as the continuation of the previous frame of data.
If a frame of data to be transmitted occupies two DMA transmit descriptors, the first segment bit (TDES1.FS) and
the last segment bit (TDES1.LS) of the first descriptor should be 10b, and the second descriptor should be 01b. If the
TDES1.FS of the first descriptor and the second descriptor are both set, and the TDES1.LS of the first descriptor is
reset, the TDES1.FS of the second descriptor will be considered invalid, and treat two descriptors as if only one frame
was transmitted.
If the length of the data field of MAC frame to be transmitted is less than 46 or the length of the data field of tagged
MAC frame to be transmitted is less than 42, can choose to configure MAC controller to automatically fill in data 0,
make the length of the frame data field consistent with the relevant definitions of the IEEE802.3 specification. At
this time, MAC will ignore the configuration of the DMA descriptor TDES1.DC, and automatically calculate and
add the CRC value to FCS of the frame.
Jabber timer
The built-in Jabber timer of Ethernet will terminate the transmission of Ethernet frames after more than 2048 bytes