09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

the frame is dropped and the Rx Status Word is immediately updated (with zero frame<br />

length, CRC error and Runt Error bits set), indicating the filter fail. In Ethernet power down<br />

mode, all received frames are dropped, and are not forwarded to the application.<br />

Receive flow control<br />

The MAC detects the receiving Pause frame and pauses the frame transmission for the<br />

delay specified within the received Pause frame (only in Full-duplex mode). The Pause<br />

frame detection function can be enabled or disabled with the RFCE bit in ETH_MACFCR.<br />

Once receive flow control has been enabled, the received frame destination address begins<br />

to be monitored for any match with the multicast address of the control frame<br />

(0x0180 C200 0001). If a match is detected (the destination address of the received frame<br />

matches the reserved control frame destination address), the MAC then decides whether or<br />

not to transfer the received control frame to the application, based on the level of the PCF bit<br />

in ETH_MACFFR.<br />

The MAC also decodes the type, opcode, and Pause Timer fields of the receiving control<br />

frame. If the byte count of the status indicates 64 bytes, and if there is no CRC error, the<br />

MAC transmitter pauses the transmission of any data frame for the duration of the decoded<br />

Pause time value, multiplied by the slot time (64 byte times for both 10/100 Mbit/s modes).<br />

Meanwhile, if another Pause frame is detected with a zero Pause time value, the MAC<br />

resets the Pause time and manages this new pause request.<br />

If the received control frame matches neither the type field (0x8808), the opcode (0x00001),<br />

nor the byte length (64 bytes), or if there is a CRC error, the MAC does not generate a<br />

Pause.<br />

In the case of a pause frame with a multicast destination address, the MAC filters the frame<br />

based on the address match.<br />

For a pause frame with a unicast destination address, the MAC filtering depends on whether<br />

the DA matched the contents of the MAC address 0 register and whether the UPDF bit in<br />

ETH_MACFCR is set (detecting a pause frame even with a unicast destination address).<br />

The PCF register bits (bits [7:6] in ETH_MACFFR) control filtering for control frames in<br />

addition to address filtering.<br />

Receive operation multiframe handling<br />

Since the status is available immediately following the data, the FIFO is capable of storing<br />

any number of frames into it, as long as it is not full.<br />

Error handling<br />

If the Rx FIFO is full before it receives the EOF data from the MAC, an overflow is declared<br />

and the whole frame is dropped, and the overflow counter in the (ETH_DMAMFBOCR<br />

register) is incremented. The status indicates a partial frame due to overflow. The Rx FIFO<br />

can filter error and undersized frames, if enabled (using the FEF and FUGF bits in<br />

ETH_DMAOMR).<br />

If the Receive FIFO is configured to operate in Store-and-forward mode, all error frames can<br />

be filtered and dropped.<br />

In Cut-through mode, if a frame's status and length are available when that frame's SOF is<br />

read from the Rx FIFO, then the complete erroneous frame can be dropped. The DMA can<br />

flush the error frame being read from the FIFO, by enabling the receive frame flash bit. The<br />

data transfer to the application (DMA) is then stopped and the rest of the frame is internally<br />

read and dropped. The next frame transfer can then be started, if available.<br />

Doc ID 018909 Rev 3 924/1416

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

Saved successfully!

Ooh no, something went wrong!