This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5748: Moving EMAC buffer descriptors from CPPI RAM to external memory (DDR)

Part Number: AM5748

Tool/software:

Hello,

We are in the process of configuring EMAC buffer descriptors from CPPI RAM to external DDR memory in a SYSBIOS-based application. While packet transmission and reception function correctly when the buffer descriptors are allocated in CPPI RAM (0x48486000 - 0x48487FFF), they fail to work when we switch to external DDR memory (0x90000000). I have confirmed memory access by successfully reading from and writing to the external DDR memory at the address 0x90000000.

Additionally, I have attempted to use the translated address as mentioned in the following post:

Using Emac CPPI RAM for Buffer Descriptors - Processors forum - Processors - TI E2E support forums

I have also included the project configuration file and the EMAC Receive API details below.

Project Config File

var attrs0 = new Mmu.DescriptorAttrs();

Mmu.initDescAttrsMeta(attrs0);
attrs0.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor
attrs0.shareable = 2; // shareable
attrs.0attrIndx = 2;

Mmu.setSecondLevelDescMeta(0x90000000, 0x90000000, attrs0);

EMAC Receive API is as follows

int32_t receive_packet(uint8_t* dataPacket)
{


//write zero to RX DMA State head descriptor pointer
*(uint32_t*)(0x48484A20) = 0;

uint32_t bdAddress=0x90000000; //Not working
//uint32_t bdAddress=0x48487000; // Working

EMAC_Desc *pDesc;
pDesc = (EMAC_Desc *)(bdAddress);
pDesc->pNext =0;
pDesc->pBuffer=&dataPacket[0];
pDesc->BufOffLen=1518;
pDesc->pktFlgLen = EMAC_BUF_DESC_OWNER;

//Start Transfer
*(uint32_t*)(0x48484A20) = bdAddress;

while((pDesc->pktFlgLen & EMAC_BUF_DESC_OWNER) == EMAC_BUF_DESC_OWNER)
{
//Wait for completion
       sleep(1);
}
EMAC_osalCacheInv((void*) &dataPacket[0], 1518);

return pDesc->BufOffLen;

}

Suggestions would be helpful 

Thanks,

Sandeep