29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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.

RM0008<br />

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

●<br />

RDES3: Receive descriptor Word3<br />

RDES3 contains the address pointer either to the second data buffer in the descriptor<br />

or to the next descriptor, or it contains time stamp data.<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RBP2 / RTSH<br />

rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw<br />

Bits 31:0 RBAP2 / RTSH: Receive buffer 2 address pointer (next descriptor address) / Receive frame<br />

time stamp high<br />

These bits take on two different functions: the application uses them to indicate to the DMA the<br />

location of where to store the data in memory, <strong>and</strong> then after transferring all the data the DMA<br />

may use these bits to pass back time stamp data.<br />

RBAP1: When the software makes this descriptor available to the DMA (at the moment that the<br />

OWN bit is set to 1 in RDES0), these bits indicate the physical address of buffer 2 when a<br />

descriptor ring structure is used. If the second address chained (RDES1 [24]) bit is set, this address<br />

contains the pointer to the physical memory where the next descriptor is present. If RDES1 [24] is<br />

set, the buffer (next descriptor) address pointer must be bus width-aligned (RDES3[3, 2, or 1:0]<br />

= 0, corresponding to a bus width of 128, 64 or 32. LSBs are ignored internally.) However, when<br />

RDES1 [24] is reset, there are no limitations on the RDES3 value, except for the following condition:<br />

the DMA uses the configured value for its buffer address generation when the RDES3 value is used to<br />

store the start of frame. The DMA ignores RDES3[3, 2, or 1:0] (corresponding to a bus width of 128,<br />

64 or 32) if the address pointer is to a buffer where the middle or last part of the frame is stored.<br />

RTSH: Before it clears the OWN bt in RDES0, the DMA updates this field with the 32 most<br />

significant bits of the time stamp captured for the corresponding receive frame (overwriting the<br />

value for RBAP2). This field has the time stamp only if time stamping is activated <strong>and</strong> if the Last<br />

segment control bit (LS) in the descriptor is set.<br />

Rx DMA descriptors format with IEEE1588 time stamp<br />

Figure 317. Receive descriptor fields format with IEEE1588 time stamp enabled<br />

31 0<br />

RDES 0<br />

O<br />

W<br />

N<br />

Status [30:0]<br />

RDES 1<br />

CT<br />

RL<br />

Reserved<br />

[30:29]<br />

Buffer 2 byte count<br />

[28:16]<br />

CTRL<br />

[15:14]<br />

Res.<br />

Buffer 1 byte count<br />

[12:0]<br />

RDES 2<br />

Buffer 1 address [31:0] / Time stamp low [31:0] (1)<br />

RDES 3<br />

Buffer 2 address [31:0] or Next descriptor address [31:0] / Time stamp high[31:0] (1)<br />

ai15645<br />

1. The DMA updates RDES2 <strong>and</strong> RDES3 with the time stamp value before clearing the OWN bit in RDES0:<br />

RDES2 is updated with the lower 32 time stamp bits (the sub-second field, called RTSL in the RDES2:<br />

Receive descriptor Word2 section) <strong>and</strong> RDES3 is updated with the upper 32 time stamp bits (the Seconds<br />

field, called RTSH in the RDES3: Receive descriptor Word3 section).<br />

Doc ID 13902 Rev 9 903/995

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

Saved successfully!

Ooh no, something went wrong!