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.

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

Figure 348. TxDMA operation in OSF mode<br />

No<br />

No<br />

Poll<br />

demand<br />

TxDMA suspended<br />

Previous frame<br />

status available<br />

Time stamp<br />

present?<br />

Yes<br />

Write time stamp to<br />

TDES2 & TDES3<br />

for previous frame<br />

(AHB)<br />

error?<br />

No<br />

Write status word to<br />

prev. frame’s TDES0<br />

(AHB)<br />

error?<br />

Transmit frame processing<br />

The transmit DMA expects that the data buffers contain complete Ethernet frames,<br />

excluding preamble, pad bytes, and FCS fields. The DA, SA, and Type/Len fields contain<br />

valid data. If the transmit descriptor indicates that the MAC core must disable CRC or pad<br />

insertion, the buffer must have complete Ethernet frames (excluding preamble), including<br />

the CRC bytes. Frames can be data-chained and span over several buffers. Frames have to<br />

be delimited by the first descriptor (TDES0[28]) and the last descriptor (TDES0[29]). As the<br />

transmission starts, TDES0[28] has to be set in the first descriptor. When this occurs, the<br />

frame data are transferred from the memory buffer to the Transmit FIFO. Concurrently, if the<br />

last descriptor (TDES0[29]) of the current frame is cleared, the transmit process attempts to<br />

acquire the next descriptor. The transmit process expects TDES0[28] to be cleared in this<br />

descriptor. If TDES0[29] is cleared, it indicates an intermediary buffer. If TDES0[29] is set, it<br />

947/1416 Doc ID 018909 Rev 3<br />

Yes<br />

Yes<br />

No<br />

No<br />

Close intermediate<br />

descriptor<br />

No<br />

Start TxDMA<br />

(Re-)fetch next<br />

descriptor<br />

(AHB)<br />

error?<br />

No<br />

Own<br />

bit set?<br />

Yes<br />

Transfer data from<br />

buffer(s)<br />

(AHB)<br />

error?<br />

No<br />

Frame xfer<br />

complete?<br />

Time stamp<br />

present?<br />

No<br />

Write status word to<br />

prev. frame’s TDES0<br />

(AHB)<br />

error?<br />

Yes<br />

Start<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

No<br />

Stop TxDMA<br />

No<br />

Second<br />

frame?<br />

Yes<br />

Wait for previous<br />

frame’s Tx status<br />

Write time stamp to<br />

TDES2 & TDES3<br />

for previous frame<br />

(AHB)<br />

error?<br />

Yes<br />

ai15640

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

Saved successfully!

Ooh no, something went wrong!