09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RM0090</strong> Ethernet (ETH): media access control (MAC) with DMA controller<br />

other stations that a collision has occurred. If the collision is seen during the preamble<br />

transmission phase, the MAC completes the transmission of the preamble and SFD and<br />

then sends the jam pattern.<br />

A jabber timer is maintained to cut off the transmission of Ethernet frames if more than 2048<br />

(default) bytes have to be transferred. The MAC uses the deferral mechanism for flow<br />

control (back pressure) in Half-duplex mode. When the application requests to stop<br />

receiving frames, the MAC sends a JAM pattern of 32 bytes whenever it senses the<br />

reception of a frame, provided that transmit flow control is enabled. This results in a collision<br />

and the remote station backs off. The application requests flow control by setting the BPA bit<br />

(bit 0) in the ETH_MACFCR register. If the application requests a frame to be transmitted,<br />

then it is scheduled and transmitted even when back pressure is activated. Note that if back<br />

pressure is kept activated for a long time (and more than 16 consecutive collision events<br />

occur) then the remote stations abort their transmissions due to excessive collisions. If IEEE<br />

1588 time stamping is enabled for the transmit frame, this block takes a snapshot of the<br />

system time when the SFD is put onto the transmit MII bus.<br />

Transmit scheduler<br />

The MAC is responsible for scheduling the frame transmission on the MII. It maintains the<br />

interframe gap between two transmitted frames and follows the truncated binary exponential<br />

backoff algorithm for Half-duplex mode. The MAC enables transmission after satisfying the<br />

IFG and backoff delays. It maintains an idle period of the configured interframe gap (IFG bits<br />

in the ETH_MACCR register) between any two transmitted frames. If frames to be<br />

transmitted arrive sooner than the configured IFG time, the MII waits for the enable signal<br />

from the MAC before starting the transmission on it. The MAC starts its IFG counter as soon<br />

as the carrier signal of the MII goes inactive. At the end of the programmed IFG value, the<br />

MAC enables transmission in Full-duplex mode. In Half-duplex mode and when IFG is<br />

configured for 96 bit times, the MAC follows the rule of deference specified in Section<br />

4.2.3.2.1 of the IEEE 802.3 specification. The MAC resets its IFG counter if a carrier is<br />

detected during the first two-thirds (64-bit times for all IFG values) of the IFG interval. If the<br />

carrier is detected during the final one third of the IFG interval, the MAC continues the IFG<br />

count and enables the transmitter after the IFG interval. The MAC implements the truncated<br />

binary exponential backoff algorithm when it operates in Half-duplex mode.<br />

Transmit flow control<br />

When the Transmit Flow Control Enable bit (TFE bit in ETH_MACFCR) is set, the MAC<br />

generates Pause frames and transmits them as necessary, in Full-duplex mode. The Pause<br />

frame is appended with the calculated CRC, and is sent. Pause frame generation can be<br />

initiated in two ways.<br />

A pause frame is sent either when the application sets the FCB bit in the ETH_MACFCR<br />

register or when the receive FIFO is full (packet buffer).<br />

● If the application has requested flow control by setting the FCB bit in ETH_MACFCR,<br />

the MAC generates and transmits a single Pause frame. The value of the pause time in<br />

the generated frame contains the programmed pause time value in ETH_MACFCR. To<br />

extend the pause or end the pause prior to the time specified in the previously<br />

transmitted Pause frame, the application must request another Pause frame<br />

transmission after programming the Pause Time value (PT in ETH_MACFCR register)<br />

with the appropriate value.<br />

● If the application has requested flow control when the receive FIFO is full, the MAC<br />

generates and transmits a Pause frame. The value of the pause time in the generated<br />

frame is the programmed pause time value in ETH_MACFCR. If the receive FIFO<br />

Doc ID 018909 Rev 3 916/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!