Hello,
I am attempting to run the enet multiport example from the AM6548 PDK, version 8.02.00.21 on an AM65x_IDK_EVM (SR2.x). When I build the example from the PDK, I get the binary
"C:\ti\pdk_am65xx_08_02_00_21\packages\ti\binary\enet_multiport_test_freertos\bin\am65xx_idk\enet_multiport_test_freertos_mcu1_0_release.xer5f"
When I attempt to load this over CCS, after running the launch.js, the application does not even appear to hit an entry point and just sits at memory address 0x0000000C.
I attempted to port the example to my own local toolchain, which uses GCC and a linker based on the PDK, but I only get as far as this when I run the example:
Init Enet's OSAL and utils to use defaults Init memory utils Create clock and task for periodic tick Create periodic tick task Create periodic tick clock Open Main UDMA driver Open MCU UDMA driver Init all peripheral clocks ---------------------------------------------- Enabling clocks! Enabling clocks! Enabling clocks! Enabling clocks! Enabling clocks! Enabling clocks! Init all configs ---------------------------------------------- cpsw-2g: init config icssg0-p1: init config icssg0-p2: init config icssg1: init config icssg2-p1: init config icssg2-p2: init config Open all peripherals ---------------------------------------------- cpsw-2g: Open enet
It seems I get data aborts... and the culprit is more often than not EnetUdma_memMgrAllocTdCqRingMemObj, which attempts to dequeue some data from memory location .bss:ENET_DMA_OBJ_MEM (variable gEnetUdmaTdCqRingObjMem)
First we enter EnetUdma_memMgrAllocTdCqRingMemObj (from the Enet_open functions)
/*! TD Cq Ring memory object allocation function */ void *EnetUdma_memMgrAllocTdCqRingMemObj(void) { void *pTdCqRingMem = NULL; EnetUdma_TdCqRingObjMem *pTdCqRingMemObj; pTdCqRingMemObj = (EnetUdma_TdCqRingObjMem *) EnetQueue_deq(&gEnetUdmaMemMgrObj.tdCqRingObjMemQ); #if ENET_CFG_IS_ON(DEV_ERROR) Enet_assert(NULL != pTdCqRingMemObj); #endif if (pTdCqRingMemObj != NULL) { pTdCqRingMem = (void *)&pTdCqRingMemObj->tdCqRingMemObj[0U]; Enet_assert(ENET_UTILS_IS_ALIGNED(pTdCqRingMem, ENETDMA_CACHELINE_ALIGNMENT)); memset(pTdCqRingMem, 0U, sizeof(uint64_t)); } return pTdCqRingMem; }
EnetQ_Node *EnetQueue_deq(EnetQ *queue) { EnetQ_Node *node; uintptr_t key = EnetOsal_disableAllIntr(); Enet_devAssert(queue->magic == ENET_Q_INIT_DONE, "Queue is not initialized\n"); node = queue->head; if (NULL != node) { queue->head = node->next; if (NULL == queue->head) { queue->tail = NULL; } queue->count--; node->next = NULL; } EnetOsal_restoreAllIntr(key); return node; }
queue->head is located at 0x7002E820 (MSMC), and node->next is located at 0x81D39980 (DDR), why would this be happening?
So my question is... why is the built MCU example not working? And why do I see this error happening in the Enet DMA driver code?
Thanks,
Ben