29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

RM0008<br />

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

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

Start TxDMA<br />

Start<br />

Stop TxDMA<br />

(Re-)fetch next<br />

descriptor<br />

Poll<br />

dem<strong>and</strong><br />

(AHB)<br />

error<br />

No<br />

Yes<br />

TxDMA suspended<br />

Previous frame<br />

status available<br />

No<br />

Own<br />

bit set<br />

Yes<br />

Transfer data from<br />

buffer(s)<br />

Time stamp<br />

present<br />

(AHB)<br />

error<br />

Yes<br />

Yes<br />

No<br />

No<br />

No<br />

Write time stamp to<br />

TDES2 & TDES3<br />

for previous frame<br />

No<br />

Frame xfer<br />

complete<br />

Yes<br />

Second<br />

frame<br />

Yes<br />

Close intermediate<br />

descriptor<br />

Wait for previous<br />

frame’s Tx status<br />

(AHB)<br />

error<br />

No<br />

Yes<br />

Time stamp<br />

present<br />

No<br />

Yes<br />

Write time stamp to<br />

TDES2 & TDES3<br />

for previous frame<br />

Write status word to<br />

prev. frame’s TDES0<br />

Write status word to<br />

prev. frame’s TDES0<br />

No<br />

(AHB)<br />

error<br />

Yes<br />

No<br />

(AHB)<br />

error<br />

No<br />

(AHB)<br />

error<br />

Yes<br />

Yes<br />

ai15640<br />

Transmit frame processing<br />

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

excluding preamble, pad bytes, <strong>and</strong> FCS fields. The DA, SA, <strong>and</strong> 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 <strong>and</strong> span over several buffers. Frames have to<br />

be delimited by the first descriptor (TDES0[28]) <strong>and</strong> 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 />

Doc ID 13902 Rev 9 885/995

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

Saved successfully!

Ooh no, something went wrong!