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 />

● 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<br />

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

DMA 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<br />

the 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<br />

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

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

following condition: the DMA uses the configured value for its buffer address generation when the<br />

RDES3 value is used to store the start of frame. The DMA ignores RDES3[3, 2, or 1:0]<br />

(corresponding to a bus width of 128, 64 or 32) if the address pointer is to a buffer where the<br />

middle or last part of the frame is stored.<br />

RTSH: Before it clears the OWN bit 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<br />

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

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

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

Enhanced descriptors (enabled with EDFE=1, ETHDMABMR bit 7), must be used if time<br />

stamping is activated (TSE=1, ETH_PTPTSCR bit 0) or if IPv4 checksum offload is<br />

activated (IPCO=1, ETH_MACCR bit 10).<br />

Enhanced descriptors comprise eight 32-bit words, twice the size of normal descriptors.<br />

RDES0, RDES1, RDES2 and RDES3 have the same definitions as for normal receive<br />

descriptors (refer to Normal Rx DMA descriptors). RDES4 contains extended status while<br />

RDES6 and RDES7 hold the time stamp. RDES4, RDES5, RDES6 and RDES7 are defined<br />

below.<br />

When the Enhanced descriptor mode is selected, the software needs to allocate 32 bytes (8<br />

DWORDS) of memory for every descriptor. When time stamping or IPv4 checksum offload<br />

are not being used, the enhanced descriptor format may be disabled and the software can<br />

use normal descriptors with the default size of 16 bytes.<br />

963/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!