Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
The DMA in the Ethernet subsystem transfers data based on a linked list of Tx/Rx descriptors using the Ring or Chain structure.
(See attachment)

The Tx/Rx descriptors are located in the RAM area and the base address of the descriptors are initialised in the
- TRANSMIT_DESCRIPTOR_LIST_ADDRESS
- RECEIVE_DESCRIPTOR_LIST_ADDRESS

The descriptor contain a set of Tx/Rx Status and Control bits, 2 Buffer length and 2 Buffer address pointer.

Important descriptor bit field
OWN – Own Bit (1:DMA, 0:CPU)
FS – First Descriptor
LS – Last Descriptor
Buffer 1 or 2 Address Pointer – Points to Tx/Rx buffer
0 Likes
4 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Question and Answer ...

Any body knows the size of a ETH DMA descriptor?
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi all,

A Tx/Rx descriptor is make up of 4 words (32bits) and arrays of Tx/Rx descriptors are normally used for DMA link list purposes.

The declaration of ETH DMA descriptor can be found in "DMA_Descriptors.c" of ETH001

/** Tx DMA Descriptot List */
DmaDesc Eth_TxDMADescList;
uint8_t Eth_TxBuffer[RX_BUFFER_SIZE];


uint8_t Eth_RxBuffer[RX_BUFFER_SIZE];
/** Rx DMA Descriptot List */
DmaDesc Eth_RxDMADescList[RECEIVE_DESC_SIZE];
0 Likes
Not applicable
In version 1.0.22 of ETH001 the DMA_Descriptors are linked to section "ETH_RAM", but there is no such section in the linker file. So the arrays are linked to normal BSS section.

In the linker file (V1.1) there is only the section "Communication_Buffers" which should be used for, or shouldn´t it?


/** Tx DMA Descriptot List */
DmaDesc __attribute__((section ("ETH_RAM"))) Eth_TxDMADescList __attribute__ ((aligned (4)));
uint8_t __attribute__((section ("ETH_RAM"))) Eth_TxBuffer[TX_BUFFER_SIZE] __attribute__ ((aligned (4)));

/** Rx DMA Descriptot List */
DmaDesc __attribute__((section ("ETH_RAM"))) Eth_RxDMADescList[RECEIVE_DESC_SIZE] __attribute__ ((aligned (4)));
uint8_t __attribute__((section ("ETH_RAM"))) Eth_RxBuffer[RX_BUFFER_SIZE] __attribute__ ((aligned (4)));
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi Hissi,

I am not well verse with the linker script, but definitely the DMA descriptor list and Tx/Rx buffer should be allocated in the RAM area.

Best Regards
Travis
0 Likes