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.

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

RM0008<br />

1. The DMA operates as described in steps 1–6 of the TxDMA (default mode).<br />

2. Without closing the previous frame’s last descriptor, the DMA fetches the next<br />

descriptor.<br />

3. If the DMA owns the acquired descriptor, the DMA decodes the transmit buffer address<br />

in this descriptor. If the DMA does not own the descriptor, the DMA goes into Suspend<br />

mode <strong>and</strong> skips to Step 7.<br />

4. The DMA fetches the Transmit frame from the STM32F107xx memory <strong>and</strong> transfers the<br />

frame until the end of frame data are transferred, closing the intermediate descriptors if<br />

this frame is split across multiple descriptors.<br />

5. The DMA waits for the transmission status <strong>and</strong> time stamp of the previous frame. When<br />

the status is available, the DMA writes the time stamp to TDES2 <strong>and</strong> TDES3, if such<br />

time stamp was captured (as indicated by a status bit). The DMA then writes the status,<br />

with a cleared OWN bit, to the corresponding TDES0, thus closing the descriptor. If<br />

time stamping was not enabled for the previous frame, the DMA does not alter the<br />

contents of TDES2 <strong>and</strong> TDES3.<br />

6. If enabled, the Transmit interrupt is set, the DMA fetches the next descriptor, then<br />

proceeds to Step 3 (when Status is normal). If the previous transmission status shows<br />

an underflow error, the DMA goes into Suspend mode (Step 7).<br />

7. In Suspend mode, if a pending status <strong>and</strong> time stamp are received by the DMA, it<br />

writes the time stamp (if enabled for the current frame) to TDES2 <strong>and</strong> TDES3, then<br />

writes the status to the corresponding TDES0. It then sets relevant interrupts <strong>and</strong><br />

returns to Suspend mode.<br />

8. The DMA can exit Suspend mode <strong>and</strong> enter the Run state (go to Step 1 or Step 2<br />

depending on pending status) only after receiving a Transmit Poll dem<strong>and</strong><br />

(ETH_DMATPDR register).<br />

Figure 312 shows the basic flowchart in OSF mode.<br />

884/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!